Exemple D'un Script Visual Basic: (Example.vbs) - Vidicode Pico Manuel

Table des Matières

Publicité

Exemple d'un script Visual Basic: (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"
Call Recorder Pico Manual FR © 2011-2014 Vidicode®
and 1 when recording is active
and -1 when device-id is invalid
49

Publicité

Table des Matières
loading

Table des Matières