Example Visual Basic Script: (example.vbs)
Example Visual Basic Script: (example.vbs)
Example Visual Basic Script: (example.vbs)
Example Visual Basic Script: (example.vbs)
sub TestPico()
' When the Pico software is not started, it will be started.
set obj = WScript.CreateObject("SCR.Recording")
' wait until user clicks Ok
' State returns 0 when recording not active,
'
'
msgbox "Pico is started. State: " & obj.State(1)
' Add a number of seconds before the StartRecording signal
' to the recording when available.
' Maximum is 30 seconds.
obj.SetPreStartPeriod 30
' Start recording
' The first parameter is the device id
' 1 = the first enabled recording device
obj.StartRecording 1, "C:\test_pico_output.wav"
' wait until user clicks Ok
msgbox "Pico started recording. State " & obj.State(1)
' Stop the recording
obj.StopRecording 1
' The output file is now created
' (even if the duration is shorter than the minimum duration
specified
' in the settings)
' wait until user clicks Ok
msgbox "Pico stopped recording. State " & obj.State(1)
' Retrieve the duration of the last recording
msgbox "Duration: " & obj.LastDuration(1) & " seconds"
' When the Pico was started by the script, it is closed at this point
end sub
' call sub TestPico (see above)
TestPico()
' wait until user clicks Ok
msgbox "exiting"
46
and 1 when recording is active
and -1 when device-id is invalid
Call Recorder Pico Manual UK © 2009 Vidicode