Record Audio for only 10 seconds?

John Patten johnpatten at mac.com
Mon Apr 12 23:33:28 EDT 2010


Hi All...

I'm attempting to create a little stack that will allow the user to record audio, their voice, for a specific amount of time.

I have the recording scripts down:

 put the long name of current stack into theTargetPath
   put the itemDel into tOrigItemDel
   set the itemDel to "/"
   delete last item of theTargetPath
   delete first item of theTargetPath
   put "/" & theTargetPath & "/Recordings/" into theRecordingTarget
   --create a unique name for the audio file
   convert the date && the long time to seconds 
   put it into tFileName
        hide me 
     show button "Stop Recording"
        record sound file theRecordingTarget&tFilename
        put theRecordingTarget&tFileName into cd fld "recording name"
	set the itemDel to tOrigItemDel

However I'm not sure how to add the timer component. I'm thinking I will need to use a "send" statement, something like, send "stop recording" after 10 seconds to current stack???

Thank you!

John Patten




More information about the use-livecode mailing list