# This demo script demonstrates how to include video and picture commands in your script. # This is a sample script that illustrates how zanscript can be written to run an experiment and deliver some example data. # Zantiks Ltd cannot guarantee this is how you want to run your experiments, this script is offered only to demonstrate the # capabilities of the system and assist you in learning how to script for your research. INCLUDE ZSYS DEFINE WAIT_TIME 5 DEFINE ITI 11 # Defines the term 'ITI' which is used below as a certain amount of time in secs. Change the # to any amount of time you # need, in secs. This is then automatically update the time throughout the script where the term is used. ACTION MAIN # ACTION MAIN is the whole experiment's outline/schedule. The actions listed here are further explained below. INVOKE(VIDEOTEST,1) INVOKE(VIDEOINTERRUPT,1) INVOKE(VIDEOSHORTEN,1) COMPLETE ACTION VIDEOTEST VIDEO(10,"videotest") # Record X seconds of video into file with given prefix. Change the name of your file by editing the name inside of the "". # The video time (in this case 14 seconds) is slightly less than the run time of the rest of the experiment, or part of # the experiment you want to record. WAIT(ITI) # System waits the predefined (above) amount time before invoking the next command. PICTURE("ZPIC") # Takes a picture and save in file with given prefix COMPLETE ACTION VIDEOINTERRUPT VIDEO(15,"videointerrupt") WAIT(WAIT_TIME) VIDEOSTOP(0) # This command will stop the video before it has run the full time it has been programmed to run. You need to include a WAIT command # afterwards for at least 1 second. WAIT(1) # Make sure there is always a WAIT time after the command VIDEOSTOP COMPLETE ACTION VIDEOSHORTEN VIDEO(15,"videoshorten") WAIT(WAIT_TIME) # This WAIT_TIME is less than the 15 seconds that the video is programmed to run, as the script will now finish before the 15 seconds # has finished the video will automatically stop when the script / service finishes. COMPLETE