1 / 12

script commands (2)

script commands (2). 5. Feedback on screen. 8. Waiting for multiple events. SetPencolor SaveScreenToBmp [ V2 ]. DefineTabZone WaitForTabZones ClearZones. 6. Eyetracker control. TestDrift. 9. keywords. %I% %S% [ V2 ]. 7. Jump. Label JumpTo JumpToIfLabelIs.

etan
Download Presentation

script commands (2)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. script commands (2) 5. Feedback on screen 8. Waiting for multiple events SetPencolor SaveScreenToBmp [ V2 ] DefineTabZone WaitForTabZones ClearZones 6. Eyetracker control TestDrift 9. keywords %I% %S% [ V2 ] 7. Jump Label JumpTo JumpToIfLabelIs Hands on scripts… 10-12 April 2012, Mshs, University of Poitiers, France

  2. 5. Feedback on screen 5.1. SetPenColor(ColorValue) Set the color of the trace leaved by the pen on screen. Replace ColorValue with a color number (Internet standard) between #000000 (black) and #FFFFFF (white). Example: SetPenColor(#0000FF)will have the pen to write in blue on screen. Example of use: have a participant to correct a document with a red “ink”. 10-12 April 2012, Mshs, University of Poitiers, France Figure: Command | Display | SetPenColor dialog box

  3. 5.2. SaveScreenToBmp(PictureFileName) [ Eye and Pen 2 ] Saves the content of the screen into a BMP format picture file.Replace PictureFileName with a name for the file. Example: SaveScreenToBmp(FirstPage.bmp) The picture is saved in the Stimuli folder, enabling to use it later as a stimuli. Example of use: have a participant to correct its own production at a later time. 10-12 April 2012, Mshs, University of Poitiers, France

  4. 6. Eyetracker control • 6.1. TestDrift • Pauses the script and launches the eye tracker coordinates drift test procedure, if any. • Eye trackers behaves differently: • Eyelink: the test is run with a single point. • EyePuter: the entire calibration procedure is repeated. For EyePuter, you can also choose to test just one point. • ASL504: the entire calibration procedure is repeated. 10-12 April 2012, Mshs, University of Poitiers, France

  5. 7. Jumps Telling the script interpretor to continue reading script from an other line. 7.1. Label Identifies a particular place in the script to which you will later refer to. It is the point where the script interpretor will return each time the sequence of commands is to be repeated. Example: :Anchor1 Reminder: a label has an internal counter that counts the number of times the scripts interpretor read it. The script interpretor has a memory of the value of the last label counter he “passed by”. Iteration 4 ; Fill the ilst will 16 numbers (from 1 to 16) :Iteration AddToList(%I%) JumpToIfNumberIs(Next,16,FALSE) JumpTo(Iteration,FALSE) :Next 4 Next 1 1 10-12 April 2012, Mshs, University of Poitiers, France

  6. 7.2. JumpTo(Label,MustCloseRec) This command has the script interpretor to “go to” a label. Replace Label with the name of the label to go to. Replace MustCloseRec with TRUE if an acquisition data file should be closed before “jumping” to the label. Example: JumpTo(Start,FALSE) Script interpretor will read and execute: :Start … some commands … JumpTo(Next) … other commands … :Next … more commands … some commands JumpTo(Next) more commands 10-12 April 2012, Mshs, University of Poitiers, France

  7. 7.3. JumpToIfLabelIs(DestLabel,LabelToCheck,Iterations,MustCloseRec) This command has the script interpretor to “go to” the label DestLabel if a condition is met: the label LabelToCheck counter’s value is equal to a given value. Replace iterations with the required value. Replace DestLabel with the name of the label to go to. ReplaceLabelToCheckwith the name of the label to watch. Replace MustCloseRec with TRUE if an acquisition data file should be closed before “jumping” to the label. Example: JumpToIfLabelIs(Start,Next,3,FALSE) Translation: go to the label named “Start” if the counter’s value of the label “Next” is 3. … commands… :Start … other commands … JumpToIfLabelIs(Next,Start,3,FALSE) jumpto(Start) :Next Third “pass” Second “pass” First “pass” 1 3 2 10-12 April 2012, Mshs, University of Poitiers, France

  8. 7.4.Script editor tries to help In script editor dialog boxes, right-clicking on fields requiring a label name shows a list of existing script labels and keywords. 10-12 April 2012, Mshs, University of Poitiers, France

  9. 8. Waiting for multiple events More than one tablet zone can be defined on the tablet, and each one can trigger an action. 8.1. DefineTabZone(x1,y1,x2,y2,Label) Associates a zone on the tablet with a label in script. Replace X1,y1,x2,y2with the tablet coordinates of the new zone to consider. Replace Labelwith the name of the label associated with the new “trigger” (zone). 8.2. WaitForTabZones Stops script execution until the pentip is pressed into one of the zones defined with “DefineTabZone”. The selection of a zone has the script interpretor to “go to” the label associated with the selected zone. This will act as a “JumpTo(Label)” instruction for the script interpretor . 8.3. ClearZones Removes all previously defined zones. 10-12 April 2012, Mshs, University of Poitiers, France

  10. 9. Keywords Keywords are special symbols, replaced with values fixed (calculated) when script is “run”. 9.1. %I% Retrieves the value of the last label counter’s value read by the script interpretor (remember: script interpretor has a memory for this). 9.2. %S% [ Eye and Pen 2 ] This keyword will be replaced with the participant’s Id. 10-12 April 2012, Mshs, University of Poitiers, France

  11. Hands on scripts ! Exercise 3 Write a script such that a participant writes a page, then press the pen in a zone each time he starts a new page. DefineTabZone(35734,4,44697,10325,OneMorePage) DefineTabZone(35949,21193,44697,27932,Finished) :OneMorePage DisplayPic(GreyBkgnd.bmp,-1,-1,-1) OpenRec(_page%I%) WaitForTabZones(TRUE,TRUE,TRUE) :Finished DisplayMsg(Thanks !,3000,-1,-1,TRUE) 10-12 April 2012, Mshs, University of Poitiers, France

  12. Exercise 4 Write a script such that a participant writes a text, reads an instruction to look for spelling errors and corrects its own text in red ink. ; Pen color: black SetPenColor(#000000) DisplayPic(GreyBkgnd.bmp,-1,-1,-1) OpenRec(_text) WaitForTabZoneAt(35725,20987,44697,27932,TRUE,TRUE) CloseRec SaveScreenToBmp(%S%_text) DisplayPic(instructions.bmp,-1,-1,-1) WaitForKeyPress ; Pen color: red SetPenColor(#FF0000) DisplayPic(%S%_Text.bmp,-1,-1,-1) OpenRec(_Correct) WaitForTabZoneAt(35725,20987,44697,27932,TRUE,TRUE) CloseRec HidePicture DisplayMsg(Thanks !,3000,-1,-1,TRUE) 10-12 April 2012, Mshs, University of Poitiers, France

More Related