Presentation is loading. Please wait.

Presentation is loading. Please wait.

A script: what’s that thing ? A sort of language to tell Eye and Pen what he has to do, like a recipe: now do this, then do that, etc.  It allows to use.

Similar presentations


Presentation on theme: "A script: what’s that thing ? A sort of language to tell Eye and Pen what he has to do, like a recipe: now do this, then do that, etc.  It allows to use."— Presentation transcript:

1 A script: what’s that thing ? A sort of language to tell Eye and Pen what he has to do, like a recipe: now do this, then do that, etc.  It allows to use functionalities with a few words (“command language”). No need to learn a full featured programming language.  It allows to give more control over an acquisition than Simple. More sophisticated experiments can be set up.  A command example: DisplayPic(Instruction.bmp,5000,0,0) Translation: display a picture called “Instruction.bmp” for 5000 milliseconds at location 0,0 (X and Y coordinates on screen). 10-12 April 2012, Mshs, University of Poitiers, France

2 What does it look like ? Lines of text in Windows NotePad. Each line “hosts” a command (or nothing). The same script opened in Eye and Pen’s Script Editor. 10-12 April 2012, Mshs, University of Poitiers, France

3 Eye and Pen’s Script editor is a facility, but a script can be edited into Windows Notepad or any other kind of text editor. The only requirement is to save script as text only (“ANSI” encoding) file. Figure: Windows Notepad “Save as” 10-12 April 2012, Mshs, University of Poitiers, France

4 The script interpretor isn’t “case sensitive”: upper- and lower-case letters are the same to it. When a scripted acquisition is started, Eye and Pen’s script interpretor reads the script, line by line, and does what the command he reads tells him to do. A script: how does it work ? During an acquisition:  Pressing the F12 key of the keyboard ends the script.  Pressing the ESC key of the keyboard ends the current task in script (commands that require a specific action to terminate) 10-12 April 2012, Mshs, University of Poitiers, France

5 Script preferences (menu Configuration | Acquisition | Script) Stimuli will be taken in this folder Default folders for scripted acquisition Recordings will be saved here Scripts will be taken in this folder (NetSync) Click here to select the whole screen size Default values for commands using text display A default zone on the tablet. All default values defined here can be overwritten using script commands. Click here to select font Click here to select text background color Click here to select the area on the tablet 10-12 April 2012, Mshs, University of Poitiers, France

6 Eye and Pen’s script editor (menu File | Script editor) Script editor is an enhanced text editor performing syntax highlighting. 10-12 April 2012, Mshs, University of Poitiers, France

7 Classic edition menu: cut, paste, etc. First sight on the menus 10-12 April 2012, Mshs, University of Poitiers, France

8 Script commands (sorted by category). For each command name, a dialog box helps to set options and insert the resulting command into the script. 10-12 April 2012, Mshs, University of Poitiers, France

9 Script checking tools: - “Check syntax” performs an automatic syntax verification. - “Execution test” checks that all the elements involved in the script (syntax, stimuli files, etc.) are ready. Script checking tools: - “Check syntax” performs an automatic syntax verification. - “Execution test” checks that all the elements involved in the script (syntax, stimuli files, etc.) are ready. 10-12 April 2012, Mshs, University of Poitiers, France

10 Script help 10-12 April 2012, Mshs, University of Poitiers, France

11 In dark blue: a command In blue between brackets: a command’s parameters (options) In green: a comment (ignored by script interpretor). Always begins with a semi-colon. In dark cyan: a label (a “flag” in script). Begins with “:” followed by a single word A script is colored 10-12 April 2012, Mshs, University of Poitiers, France


Download ppt "A script: what’s that thing ? A sort of language to tell Eye and Pen what he has to do, like a recipe: now do this, then do that, etc.  It allows to use."

Similar presentations


Ads by Google