PsyScript — Author Aid


Authoring Aid

Purpose

The authoring aid allows you to use the PsyScript library functions by simply
selecting them from a dialog box. The aid then formats them and inserts them
into your script.

Installation

Download the appropriate scripts,
place the “authoring aid” script into either the “User Scripts”
folder (for Smile) or the “Scripts” folder (script debugger)

Usage

In Script Debugger, pressing cmd-option-H should run the authoring aid.

In Smile, use cmd-shift-A to activate the authoring aid.

Running authoring aid produces a dialog with four options:

File handling contains most of the contents of helper.lib.

The list functions of helper.lib are in “manipulate lists”.

Screen contains functions to create and move rectangles and points on
screen.

Other is miscellany, and eye link is helpers for the eyelink pupil tracker.

Which ever option you choose, you are then presented
with a list of functions for that option. This next figure shows the handlers
for the file handling option (with several function selected) (see figure
on right)

You can select multiple handlers (as shown) by holding down the shift-
or cmd- keys.

When you press “OK”, the authoring aid will insert all of the
selected handlers into your current script window. If needed, the code
to activate PsyScript and load the needed libraries will be inserted for
you.

If there is no script window, one will be created for you, incliding
code to load the libraryies – so this is a quick way to starta whole new
experiment.

Below, you can see the script that would result from pressing Ok from
the dialog on the right, with now current experiment script window open:

tellapplication“PsyScript”
   activate
   begin
experiment

   sethelpertoload scriptfile(“”&Psyscript base folder&”libraries:file.lib”)
   setscreentoload scriptfile(“”&Psyscript base folder&”libraries:screen.lib”)
   tellhelper
      getLibraryVersion()
      initialize()
      setSubjectFileParameters({prefix:””,suffix:””})
      createNewSubjectID()
      readSpreadsheet(theFile)
   endtell
   end
experiment

endtell

MACCS Documentation Downloads FAQ Mailing List Last change:
Advanced Search
Applescript in a Nutshell : A Desktop Quick Reference AppleScript for Applications: Visual QuickStart Guide AppleScript For Dummies Applescript for the Internet Visual Quickstart Guide Applescript Language Guide; English Dialect Danny Goodman’s Applescript Handbook

Leave a Comment