Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
dalkin
- Posts: 183
- Joined: Wed Jul 04, 2007 2:32 am
-
Contact:
Post
by dalkin » Thu Apr 30, 2020 3:18 am
I just can't get my head around using cameraControlSet and cameraControlDo for a Windows version of my app .. I'm trying to enable user recorded audio and playback so the script refers to buttons to enable this. I've got this far but no further. Can anyone spot the blindingly obvious issue? I've obviously been locked in isolation with my wife too long. mergeMicrophone is working fine on OSX.
Code: Select all
on mouseUp
put the cUserDefinedRecordingFolder of this card into tUserFolder
## User did not define a folder yet:
if there is not a folder tUserFolder then
answer folder "Select a folder for the recordings:"
if the result is cancel then
exit to top
end if
## We store the folder also in a custom property:
set the cUserDefinedRecordingFolder of this stack to IT
## We need this in this script:
put it into tUserFolder
end if
set the recordFormat to "wav"
ask "Please name the recording:"
if it = empty then
exit to top
end if
put it into tUserDefinedName
put tUserFolder & "/" & tUserDefinedName & ".wav" into tFile
## Now set two custom properties fo the PLAY1 button, so the button knows what to play when clicked!
set the cAudioFile of btn "play1" to tFile
set the filename of player "P1" to tFile
set the cUserDefinedName of btn "play1" to tUserDefinedName
cameraControlSet "MyCamera", "audioDevice", "default"
cameraControlDo, "MyCamera", "startRecording", "tUserDefinedName"
set the label of button "Record1" to "Recording"
set the backgroundcolor of button "Record1" to orange
##
end mouseUp
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.
-
SparkOut
- Posts: 2944
- Joined: Sun Sep 23, 2007 4:58 pm
Post
by SparkOut » Thu Apr 30, 2020 7:32 am
I have not checked properly and can't test on computer, but first thing I noticed was the cUserDefinedRecordingFolder being checked as a property of "this card" in one place and of "this stack" in another.
Actual playback code I haven't studied.
-
dalkin
- Posts: 183
- Joined: Wed Jul 04, 2007 2:32 am
-
Contact:
Post
by dalkin » Thu Apr 30, 2020 9:01 am
Yep. It's the way it works on the OSX version (and works well) .. Windows may have some snafu but I don't know the system environment well enough. I'm pretty sure that the problem is with cameraControlSet and cameraControlDo but I can't find a combination that works.
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.
-
dalkin
- Posts: 183
- Joined: Wed Jul 04, 2007 2:32 am
-
Contact:
Post
by dalkin » Sat May 02, 2020 9:37 am
Moved to the LC complete beginners board.
The underlying purpose of Al is to allow wealth to access skill
while removing from the skilled the ability to access wealth.