Presentation is loading. Please wait.

Presentation is loading. Please wait.

Pre-workshop session Poitiers, july 1 st 2015 Pre-workshop session Poitiers, july 1 st 2015.

Similar presentations


Presentation on theme: "Pre-workshop session Poitiers, july 1 st 2015 Pre-workshop session Poitiers, july 1 st 2015."— Presentation transcript:

1 Pre-workshop session Poitiers, july 1 st 2015 Pre-workshop session Poitiers, july 1 st 2015

2 2 July 1 st 2015 Mshs, University of Poitiers, France

3 3 A script uses a “language” to tell Eye and Pen what it has to do ImageList.txt contains Use Simple recording, with pictures taken from the randomized list If there is still an item to play with then “start” again July 1 st 2015 Mshs, University of Poitiers, France

4 The script interpretor isn’t “case sensitive”: upper- and lower-case letters are the same to it. When an 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. 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 4 A script: how does it work ? July 1 st 2015 Mshs, University of Poitiers, France

5 Script editor is an enhanced text editor performing syntax highlighting 5 Script Editor July 1 st 2015 Mshs, University of Poitiers, France

6 Classic edition menu: cut, paste, etc. 6 First view of the menus July 1 st 2015 Mshs, University of Poitiers, France

7 Script commands (sorted by category). For each command name, a dialog box helps to set options and insert the resulting command line into the script. 7 July 1 st 2015 Mshs, University of Poitiers, France

8 8 Dialog box for the selected command July 1 st 2015 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. 9 July 1 st 2015 Mshs, University of Poitiers, France

10 Script help 10 July 1 st 2015 Mshs, University of Poitiers, France

11 In dark blue: a command In blue between brackets: a command’s 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 11 A script is colored July 1 st 2015 Mshs, University of Poitiers, France

12 Openning an acquisition while another is already in progress will close the current one before opening the new one. Once recording is started, it is performed in parallel with script execution. 2.1. OpenRec (AddToParticipantName) Starts tablet (and optionally eye tracker) data recording. Recording will go on until a command explicitly stop it or script is over. Data will be recorded into files named from the participant’s Id. Replace optional parameters AddToParticipantName with something you want to add to the participant’s Id to name data files. 12 Start / stop recording July 1 st 2015 Mshs, University of Poitiers, France

13 The recording timer starts immediately when the command OpenRec is activated or when the “Simple” acquisition (RecStandard, etc.) is executed. Time Data files (Acquisition starts) “Go” “OpenRec” 0 0 “CloseRec” 7814 “CloseRec” 4898 Each new data file (i.e. recording) starts at time zero. 13 OpenRec / CloseRec and timing July 1 st 2015 Mshs, University of Poitiers, France

14 3.1. DisplayPic (PictureFileName,Duration,X,Y) Displays the picture PictureFileName on screen at location X,Y for Duration milliseconds. Example: DisplayPic(MyPicture.bmp,5000,0,0) Translation: the picture MyPicture.bmp is displayed on screen in the upper left hand corner of the screen (coordinates 0,0) for 5 seconds. Magic values  Duration : “-1” means “forever”  Screen coordinates: “-1” means “auto-center in screen” Magic values  Duration : “-1” means “forever”  Screen coordinates: “-1” means “auto-center in screen” 3.2. HidePicture Removes pictures previously displayed with DisplayPic. Screen background is restored. Example : DisplayPic(MyPicture.bmp,-1,-1,-1) Translation: the picture MyPicture.bmp is displayed centered on screen. Script execution will go on, leaving the picture on screen. 14 Playing a stimulus July 1 st 2015 Mshs, University of Poitiers, France

15 These commands do not pause an acquisition / recording but only the script interpretor. Some commands tells the script interpretor to pause (stop reading script ) until a certain event happens. These commands are mainly grouped into the “Wait” category. 4.1. WaitForkeypress Stops script execution until a key of the keyboard is pressed. 4.2. WaitForTabZoneAt (x1,y1,x2,y2,CanDraw,MustLeave) Pauses script until the pentip is pressed into the area located at tablet coordinates x1,y1,x2,y2. If option CanDraw is set to “TRUE”, the participant's writing is displayed on screen. If MustLeave is set to “TRUE”, the pentip must be removed from the area before the script can resume. 15 Waiting for an event (participant action) July 1 st 2015 Mshs, University of Poitiers, France

16 Simple is better: complex scripts are prone to errors. Dirty-and-effective: sometimes, a good old cut-and-paste of blocs of script is more effective and secure than spending hours building complex loops. Do not wait until the whole script is written to test it. Probing for errors will be easier. Carefully check what data will be recorded. For example, should time spend to watch a picture be included in pre-writing pause or not (it may also depend whether eye movements are recorded or not). This will determine where OpenRec command will be inserted in script. Display writing on screen is not always desirable. This is resources and time consuming for the computer and it may disturb participant. 16 A few advices July 1 st 2015 Mshs, University of Poitiers, France

17 17 Let’s read a true experiment script WaitForKeyPress ;-----Exp List in lowercase ResetList LoadList(list_1_low.txt) RandomizeList :ExpBlockLowcase DisplayPic(graybackgnd.bmp,-1,0,0) WaitFor(2000) TestDrift PlaySound(beep-8.wav,FALSE) DisplayPic(%L%.bmp,-1,0,0) OpenRec(_%L%_low) WaitForTabZoneAt(6570,1960,7200,3480,TRUE,TRUE) CloseRec LoopIfLabelIsBelow(ExpBlockLowcase,%M%,FALSE) July 1 st 2015 Mshs, University of Poitiers, France

18 18 Hands on 1.Execute script for multiple copies of a word 2.Have a look at recorded data (set a background picture for analysis) 3.Read the script to understand what it does July 1 st 2015 Mshs, University of Poitiers, France SetFont(MS Sans Serif,18,#000000,#000000) DisplayMsg(Welcome !,2000,-1,-1,TRUE) DisplayMsg(Wait...,-1,-1,-1,TRUE) WaitForKeypress HideMessage ResetList LoadList(wordslist.txt) :Start ; displays a ”star” and waits for the pen to be pressed in the left side area of the tablet DisplayPic(croix.jpg,-1,-1,-1) WaitForTabZoneAt(3000,5500,5810,26600,FALSE,FALSE) WaitFor(500) openrec(_%L%) ; displays the item until writing starts in the “handwriting area” DisplayPic(%L%.jpg,-1,-1,-1) WaitForTabZoneAt(5500,0,47700,31800,FALSE,FALSE) HidePicture ; Waits for pen press in the “end” zone WaitForTabZoneAt(47700,5500,50500,26600,FALSE,TRUE) closerec JumpToIfNumberIs(Stop,%M%,TRUE) JumpTo(Start,TRUE) :Stop HidePicture DisplayMsg(Thanks to you !,1000,-1,-1,TRUE)


Download ppt "Pre-workshop session Poitiers, july 1 st 2015 Pre-workshop session Poitiers, july 1 st 2015."

Similar presentations


Ads by Google