Changes to RSVP 5.1.3
by Lawrence D'Oliveiro, ldo@geek-central.gen.nz:
1998 April 22:
- "open" AppleEvent now takes an optional argument to control behaviour when the output file already exists. Also, it no longer defaults the name of the output file; a put-file dialog is displayed to ask the user for the name instead.
- Checking of whether to quit other applications, and of special key combinations held down at startup, is now done from a common routine called by the "open" and "run" AppleEvent handlers, and can be controlled by an optional argument to those events. The check is only done the first time one of these handlers is invoked.
- removed gSig global and its use with Get/SetFInfo. Instead I now use the simpler _fcreator mechanism provided by the Metrowerks Standard Library to set the correct creator code on output files.
- added "do script" and "end script" AppleEvents. The former lets you directly execute ECL code passed via the AppleEvent, instead of having to read it from a file. Output is also returned directly via the AppleEvent, instead of writing it to a file. The code preserves the ECL context across multiple "do script" events, so that you can build up an experiment incrementally, instead of having to send all the ECL code in a single event. To terminate the context and ready things for a new experiment, send an "end script" event. "end script" is a no-op if there is no script currently being executed, so you can always begin a script sequence with one of these, just to be safe.
- added a new ECL "do" option, "default_folder", to explicitly set the default folder for relative pathnames. This is needed otherwise relative pathnames no longer work if the ECL input is coming from a "do script" event.
- modified SetDefaultPictFolder to support both absolute and relative pathnames.
1998 April 29:
- Fixed LoadAMovie to return the correct function result. It was probably working by accident before.
- Put back ecl_memfree call in endexp. It seems to work.
1998 May 8:
- Added AppleEvent Object Model support for accessing ECL variables. The ECL context is automatically initialized the first time you create or access a variable. Any modifications you make to the context will affect a subsequent sequence of "do script" events ending with an "end script" event, or a subsequent opening and execution of an ECL script file. After either of these happenings, the context is disposed.
- Changed version number to 4.1.
- Built all the rsvp.hdr initializations into the RSVP program itself, so rsvp.hdr is no longer necessary. The initialization is automatically done every time an ECL context is created.
- The variable table is now kept in sorted order, which should speed up searches a bit.
1998 May 19:
- Resource files opened with the "res_file" command are now automatically closed at the end of an experiment.
1998 June 17-23:
- Added AppleEvent Object Model support for essentially all remaining RSVP functionality accessible from ECL, plus some extras. Properties of the application object are used where they make sense, as well as properties of objects representing ECL variables, keyboard keys, BBox keys, screen positions and permanent stimuli. This is filled out with some custom AppleEvents.
- Added "begin experiment" and "end experiment" AppleEvents. These maintain the context (including the on-screen display) for use by other events like "display instructions" and "do trial". Also put in interlocks to try to prevent you from mixing calls to these with calls to the "do script", "end script" and "open" events (not foolproof as yet).
- Fixed intermittent crashes after calls to HandleAlertDialog (for example from RSVPError), due to its calling ReleaseResource on a nil handle.
- Fixed incorrect references to the "all keys" element of the notice_key array in Input.c--this was being confused with the element for the ">" key.
1998 June 26:
- Initialize outfp_shuf to nil in MTShuffle (MacExp.c), so the fclose calls won't crash if there's an error.
1998 August 10:
- Changed name to PsyScript and signature to 'PsyS'.
- Added "declare variable" and "set variable" events as shorter ways of saying "make new variable" and "set value of variable".
1998 August 11:
- Added serial port objects and a "text file creator" application property.
1998 August 12:
- Added support for "!c" in trial strings to output a byte on the currently-selected serial port.
1998 August 23-24:
- Removed separate support for LONG variables (treat as INTEGER instead), ensured INTEGER is 32 bits and SHORT is 16 bits.
1998 September 25:
- Updated to latest (September 22) release of VideoToolbox.
1998 September 26:
- Added support for Navigation Services.
1998 September 28:
- Sizing of message window is done in a more Appearance-friendly fashion.
- No more asking to quit other applications at startup. Instead, this function can be manually invoked via a new menu command.
1998 September 29:
- Colour properties can now be set to any {R, G, B} value.
- Names of keyboard keys are no longer case-sensitive.
1998 October 5-6:
- added a whole lot of extra application properties corresponding to predefined ECL variables.
1998 October 6:
- reworked and simplified Movie.c, and added support for movies as permanent stimuli.
1998 October 12:
- changed the internal ID code for the "as" argument to the "declare variable" command to be the same as other uses of the word "as", and also to be consistent with AppleScript generally. Unfortunately, this will require that you recompile your scripts (sorry about this).
1998 October 12-13:
- added error-recovery logic so the application doesn't quit on errors.
1998 October 13-14:
- disabled error-recovery logic because I can't make it work reliably.
1998 October 14:
- loading a permanent stimulus now replaces any existing stimulus with the same name.
- Put in new option to RSVPError to allow caller to continue, and changed calls to it to use this new option wherever appropriate. This means in particular that the program should not quit as a result of an error in handling any AppleEvent (except for DoTrial!).
- A movie now (re)starts from the begining each time it is played.
1998 October 15:
- modified DoTrial and all the associated event/parser routines it calls so that they will continue after reporting an error.
1998 October 21:
- the "load permanent stimulus" AppleEvent now takes an optional explicit stimulus type argument, as an alternative to using the first character of the file/resource name. Also, the stimulus name may be omitted, in which case the file/resource name will be used for the stimulus name.
1998 October 22:
- All time-valued arguments and properties are now in units of milliseconds instead of seconds: the "for" argument to "display instructions" and the interval for "pause", and the application properties "tick time", "reaction time"/"RT" and "reaction time2"/"RT2".
- All keyboard keys are now initially noticed by default when a new experiment starts.
- instruction display is now done word by word, to allow automatic word wrap, and also does explicit wrap on seeing a newline.
- Added coercions between aliases and strings.
- Setting a font property should now work.
- Added "mouse location" and "mouse location2" properties.
1998 November 2:
- added "word wrap delimiter" application property. The initial value is a single space.
1998 November 4:
- "Set Debug Flag" and "Time Out Instructions/Trials" menu items are finally being kept in sync with the corresponding application properties; changes to one will correctly be reflected in the other.
1999 April 5:
- Make saving/restoration of drawing environment at begin/end of experiment more robust.
- Weak-import shared libraries for optional things such as Navigation Services in PPC version. (Forgot to do this before.)
1999 April 11:
- Synchronized with RSVP 4.0.5: removed "use buffered/unbuffered BBox" menu items and associated code.
1999 April 15:
- Added AppleScript support for click area objects, as per the ECL support added in RSVP 4.0.5.
1999 April 23:
- DoTrial now checks that PsyScript is the foreground process, and reports an error if not. Trouble is, the error alert still comes up in the background.
1999 April 26:
- Changed to new application and document icons (don't forget to update your desktop database), removed unused icon and corresponding incomplete BNDL resource entries (no FREF).
- Fix incorrect comparison routine for value of position objects. This means that constructs like "every position whose value is {-1, -1}" will now work.
1999 April 27:
- "begin experiment" now automatically does an "end experiment" first if not done so already.
- Added new "reset all" event which does initialization that used to be done automatically by every call to "begin experiment", as well as disposing of permanent stimuli. The first "begin experiment" call still automatically does the first initialization if it hasn't already been done.
1999 May 11:
- I think I've finally redirected all possible calls to RSVPError that can be triggered from a "do trial" event so they return an error code to the event, rather than bringing up the error dialog.
- I'm now initializing gPictType (in Draw.c) to 's'. This means the "simple picture type" property now defaults to true.
- "do trial" now ends the experiment if there was an error.
1999 June 10:
- I now return more meaningful error messages to AppleScript on most errors.
- Doing an "end experiment" now reinitializes ECL variables even if there was no experiment in progress.
- User can hit escape at any time to cancel experiment in progress.
1999 June 11:
- "display instructions" can now display single strings longer than 255 characters. Actually, this was supposed to work before, but the bug has been fixed now.
- "set variable" now implicitly declares undefined variables as strings.
- "reaction time" property (and corresponding "reaction_time" ECL variable) is now initialized to -1 rather than being initially undefined.
- Default keyboard key mappings are now the names of the keys rather than empty.
- The "shuffle" command (and "do shuffle_file" in ECL) is now more robust in cleaning up after errors. Also, the AppleScript command returns any error to AppleScript, rather than bringing up an error dialog.
- "get item 1 of (value of every variable..." now works.
1999 June 12:
- Movies can now be positioned like word and picture stimuli.
- Trial commands that take position indexes can now also take direct position coordinates. That is, all the following are now valid: 'www'(p) -- show word www at position p 'www'(h v) -- show word www at coordinates (h, v) !e(p1 p2) -- erase rectangle with top-left at position p1 and bottom-right at position p2 !e(l t b r) -- erase rectangle with bounds (t, l, b, r) !w(p) -- enter wrap mode at position p !w(h v) -- enter wrap mode at coordinates (h, v) asteriks(p) -- display preloaded stimulus at position p asteriks(h v) -- display preloaded stimulus at coordinates (h, v) ¥(p) -- display permanent stimulus at position p ¥(h v) -- display permanent stimulus at coordinates (h, v)
1999 June 14:
- InitPicts in Draw.c is now only called once at program startup. This means the "loading ctab automatically", "background color" and "simple picture type" application properties are never automatically reset to their startup values.
- "graded response" property now set to value of "grade for timeout" when user hits escape.
- Replaced "About..." dialog.
1999 September 6:
- Put back support for specifying a position index of -1 for resuming a word-wrapped sequence. This was overlooked in the changes of June 12.
- Dropped support for "do script"/"end script".
- AppleScript can now access value of every position without errors; previously-undefined positions are now initialized to (-1, -1). ECL access to such positions still causes an error.
1999 September 6-7:
- added a new "reported time" read/write application property, whose value is a list of strings, which is automatically appended to by "!r(comment)" trial commands. Note that this is reinitialized to the empty list when pdgm_init is called.
1999 September 9:
- "do trial" event now supports template substitution. Also added related "wildcard prefix" application property.
1999 November 19:
- changed name of "default folder" property to "Psyscript base folder".
- getting "value of position 0" now works.
- "end experiment" AppleScript command no longer gets rid of ECL variable definitions.
- "reset all" now also includes effect of "initialize positions" and "initialize mappings", as well as getting rid of all ECL variable definitions.
- Word and background colours can now be set to explicit RGB values in trial strings by using the syntax "!s(word_color r,g,b)" and "!s(back_color r,g,b)".
- loading a picture file stimulus will now use QuickTime graphics import components, if available (QuickTime 2.5 or later), to open any file that can be translated to a QuickDraw picture.
1999 November 22:
- "do trial" now allows a list of strings as the trial string argument. The strings are concatenated into one string with spaces in-between.
- Movie stimuli are now displayed directly in the main experiment window, no longer in their own separate window.
1999 December 15:
- corrected description of "load color table" event.
- "reset all" now also ends any experiment in progress.
2000 January 20:
- Build 68K version with 68020 code. So if you try running it on a non-colour-capable Mac, it will probably crash.
2000 January 28:
- added sound response support, Sound Calibration dialog and corresponding sound-related AppleScript objects and properties.
2000 February 22:
- removed message window and all ECL functionality which depended on it--the "record", "echo" and "dumpstate" commands.
2000 February 25:
- Added "Script" menu. This has an entry for every visible item in the "Scripts" folder in the same folder as PsyScript, with submenus corresponding to any subfolders. Selecting an item will execute an AppleScript script loaded from the corresponding file.
- Click areas now have an "index" property.
2000 March 14:
- Script file modification time is now checked before executing a script, so it will be reloaded if it's changed. Allow option-select to edit a script. Only allow files of type 'osas' in Script menu.
2000 March 15:
- "path to me" executed from within a script invoked via the Script menu now returns the path to the script.
- You can now specify a keyboard shortcut for a script file in the Script menu, by appending a sequence beginning with '\' to the name: this may be followed by one or more of the lower-case letters 's', 'o' and 'c' (indicating the shift, option and control modifiers respectively), after which must come the character code for the actual keyboard key (an uppercase letter or some other character).
2000 March 30:
- Scripts in the script menu can now define a handler called "checked" which takes no arguments, and returns a boolean. If present, the corresponding menu item will be checked if this function returns true.
- The "Script" menu is now called "Scripts", as per the AppleScript Scorecard.
2000 April 6:
- All timing now consistently uses the epoch of the Microseconds clock.
2000 April 7:
- Deleted all traces of "do script" and "end script" support.
2000 April 28:
- value of "sound response data" property is now a blob of 16-bit sample values, instead of a list of floating-point values, as the latter was taking too long to build.
- Setting sound recording property to true after an experiment had already begun now works.
- The "!o" command has been dropped, since PsyScript doesn't know how to write output anyway.
- The "Show Data" item in the Experiment menu has been dropped. This ceased being useful when the message window went away.
2000 June 20:
- "!s(back_color ...)" should now correctly set background colour instead of word colour.
2000 July 3:
- Updated to latest (2000 June 22) release of VideoToolbox.
2000 July 17:
- Updated (again) to latest (2000 July 10) release of VideoToolbox.
- Fixed "!r(message)" to include time in saved message as well.
- When running a time-consuming script from the Scripts menu, an animated beachball cursor now appears, and the script can be aborted by hitting command-dot.
- Putting a bad number in a trial string now returns a "no such variable" error, rather than saying "can't get ".
2000 August 14:
- All handling of AppleEvents (ie responding to commands from scripts) will now end the experiment if there was an error.
- Any errors from invoking a script from the Scripts menu will will now be reported and the current experiment ended.
2000 August 14-15:
- Added "save sound response data" command to save sound response data to an AIFF file.
2000 August 15:
- The number of sound channels being recorded is now being explicitly set to 1. Previously it might have defaulted to 2 on some machines, one effect of which was to halve the sample rate on playback.
- endexp no longer calls SetDepth to restore an invalid screen depth if BeginExperiment has not yet been called. This would manifest itself (at least on my machine) by the screen flashing up completely grey for a moment before the normal display reappears.
2000 August 22:
- Fixed a bug which, among other consequences, was causing the response type to revert back to the default keyboard response after the first trial from within a script invoked via the Scripts menu.
2000 November 13:
- Started adding Eyelink support.
2000 November 14:
- New stimulus type: masked stimulus, consisting of three pictures, a foreground, background and mask, and various behaviours. Displaying such a stimulus requires specifying two positions, the old one and the new one, so that the stimulus can be cleanly erased from its old position.
- Added options for specifying stimulus positions as "g" and "p", representing current and previous Eyelink gaze positions respectively. This allows masked stimuli to be dynamically moved around the screen, tracking the subject's gaze.
2000 November 15:
- The default picture folder is now ":picts:".
- Masked stimuli and "p" stimulus positions now work properly.
- Added "eyelink replay command" and eyelink sample and event objects.
2000 December 12:
- Made Eyelink support conditional, so PsyScript can be built without it.
2001 January 4:
- Change implementation of loops in trial strings so there is no no longer any effective limit on the length of a loop and you can now have loops within loops.
2001 January 5:
- Fixed another instance of the 2000 August 22 bug.
- Checking for click areas should work again.
- "!v" instant event now can optionally be followed by an integer specifying the number of refresh intervals to wait for.
2001 January 6:
- Applets are now allowed in the Scripts folder. Option-selecting these will open them with the application specified in the "ScriptEditor" entry in the Internet Config database. The value of this entry may be examined and changed via the new "script editor" application property in PsyScript. For those wishing to support the use of this Internet Config entry in other applications, the format of its value is an ICAppSpec record.
2001 January 7:
- It is now valid to set the background colour when there is no experiment in progress.
- Add drawing commands and associated "default drawing settings" application property.
2001 March 2:
- Removed unnecessary dependency on VideoToolbox.h from various modules.
2001 March 5:
- Removed all use of VideoToolbox from Timing.c, substitute direct use of vertical retrace interrupts including compensation for lost interrupts.
- The only places where VideoToolbox is still needed are Draw.c, MacExp.c, rsvp_4.0.c and the BBox and Eyelink stuff.
- The "given" keyword on the "do trial" AppleScript command used to use a custom ID code; it now uses the standard AppleScript keyASPrepositionGiven ID code. Unfortunately, this will mean updating existing compiled scripts.
2001 March 6:
- I now build "Pro" and "Lite" versions of PsyScript, the former including Eyelink support, the latter omitting it. Fixed my change of 2000 December 12, which actually succeeded in omitting Eyelink support completely!
2001 March 16:
- Fix bug in shuffle command introduced by changes to my standard library routines.
2001 March 16:
- Forgot to actually enable the interrupt-compensation code added on 2001 March 5.
2001 March 20:
- PsyScript Pro is now PowerPC-only, since the Eyelink support libraries are PowerPC-only.
- The "#i" command now waits until gaze is fixated.
2001 March 21:
- All the application properties to do with controlling the current sound input have been grouped into a single record-valued property whose fields correspond to the original individual property values.
- Ditto the current serial port.
2001 March 29:
- Forgot to weak-link MenusLib to allow running on systems without Appearance Manager present.
- Fix bug in filespec-to-string coercion handler introduced by the same change to my ExpandPathname standard library routine that required the shuffle fix of 2001 March 16.
2001 April 2:
- Fixed a bug introduced by a change to computation of click areas introduced way back on 1999 April 27. One manifestation of this was that, if a click area was empty at the time its "noticed" property was set to true, and then it was set to a nonempty rectangle, subsequent clicks in that rectangle would not be noticed.
2001 April 3:
- Drawing commands now take as their origin the top left of the display area.
2001 April 4:
- Serial input is now supported: the old "!o" trial command for serial output is now "!co", with "!ci" for input.
- Serial I/O can also be done from AppleScript using the "write serial" and "read serial" commands.
2001 April 5:
- "set of to " now works for "current sound" and "current serial" application properties.
2001 April 6:
- Draw.c routines no longer leave the current GrafPort set to the experiment window--instead, all drawing routines now save and restore the current GrafPort. As a side effect of this, drawing code in here, rsvp_4.0.c and AppleEvents.c can no longer assume that the current port will be the experiment window; they, too, have to set and restore the drawing context appropriately.
- The "!h" (hide) and "!u" (unhide) commands now work in non-indexed screen depths. In this situation, all drawing is diverted to OffscreenPort, and then displayed when the screen is unhidden.
- Add "draw poly" command.
2001 April 9:
- Internal computation of coordinates for drawing and click recognition is now changed: instead of continually adding or subtracting the top-left of gScreenRect, the coordinate system of gBigWindow is changed so that the top-left of the display area is always at (0, 0). This should not only simplify things, it also allows uniform treatment of generating picture stimuli. There should be no user-visible effect of this change.
- Permanent stimuli now have "dimensions" and "pixel depth" properties. These only make sense for picture stimuli.
- The "make" event can now create new permanent stimuli. This is currently only supported for picture stimuli.
- Added new "drawing target" application property. This can be set to a picture stimulus, after which all the drawing commands can be used to draw into that picture stimulus. You don't have to have an experiment in progress in order to do this.
- Added "save" event to save the contents of a permanent stimulus to a file. This is currently only supported for picture stimuli.
- "set of to " now works for "default drawing settings" application property.
2001 April 10:
- Eyelink gaze-fixation timeout ("#i" trial event) should now work properly.
2001 April 11:
- Add "draw curve" command, and corresponding "path point" type for representing curve control points. Path points can also be passed to "draw poly", though it ignores the off-curve flag.
2001 April 12:
- changed the internal code used for the "value" property of ECL variables and screen positions, so it is now different from the one for the standard AppleScript "contents" property. This means it is now possible to access the "contents" of an ECL variable or screen position and get all its properties at once, just as for other PsyScript objects.
2001 April 12:
- template substitutions in "do trial" strings can now use more than 9 arguments. An argument number with more than one digit must be enclosed in parentheses.
- Positions now have an "index" property.
- There is a new "word wrap position" application property, specifying the position where the next bit of wrapped text will be drawn.
- Serial settings now include parity, data bits and stop bits.
2001 April 19:
- Fixed LoadPermStim stimulus name confusion.
- Errors from "load permanent stimulus" and "load color table" AppleScript commands should now be correctly returned back to the script, rather than causing the display of the old RSVPError dialog followed by the application quitting on you.
- The "current serial" now includes a "buffer size" field to allow control of serial buffering.
2001 May 28:
- "do drift correct" now no longer calls Eyelink graphics setup routines unless it's actually doing drawing.
- A new application property "eyelink target background color" lets you set the background colour for the Eyelink calibration target (PsyScript Pro only).
2001 May 29:
- replaced "sound mapping" application property with "mapping of current sound" (should have done this before).
2001 May 30:
- Added support for the ActiveWire USB device (PsyScript Pro only). This means a new possible value of "activewire response" for response types, "activewire pin" objects representing the 16 data pins on the ActiveWire, and a "current activewire" application property.
2001 July 10:
- Always try to open ActiveWire on startup (PsyScript Pro only), though I don't report an error if I fail. This is to try to get around a problem where PsyScript Pro will crash on quit if the ActiveWire is not used, probably caused by accessing uninitialized data within the ActiveWire library.
- Did a couple of hacks to the ActiveWire library, one in a further attempt to get around the crash-on-quit problem, the other to prevent an unwanted console window from coming up if an error occurs.
- Add "bitand", "bitor" and "bitnot" bit-manipulation events, which can be useful for manipulating ActiveWire masks among other things.
- Add "convert base" event for converting integers from one base to another.
2001 July 11:
- Got ActiveWire responses working correctly.
2001 July 13:
- Finally (I think) got interrupt-compensation code actually doing compensation. While I was at it, I changed the synchronization method from disabling/enabling interrupts to using deferred tasks instead (safer).
2001 July 16:
- "convert base" event can now convert a list of numbers.
- Picture and movie stimuli filespecs can now be those of alias files, which are resolved to find the actual files.
2001 July 17:
- Sound resource filespecs can now be those of alias files, which are resolved to find the actual files.
- "delete" command can now be used to delete individual permanent stimuli, specified by name or index. As a result, indexes of permanent stimuli are subject to change, and are now a deprecated way of referring to permanent stimuli; use their names instead.
- Related to above, permanent stimuli are now stored in a dynamically-sized hash table, rather than a fixed-size array. Thus there is no more fixed limit of 128 permanent stimuli loaded at one time; the only limit is available memory.
- Parsing of integers in trial strings now specifically looks for a following decimal point and reports an error saying that real numbers are not allowed.
2001 July 18:
- The Control Strip is now hidden if visible at the start of an experiment, and restored afterwards.
- The number of items per script menu is now limited to 31. This is the maximum number of items for which the Menu Manager allows selective enabling/disabling.
2001 July 18:
- Shuffle (both menu item and AppleScript command) is now gone. This is part of the removal of all ECL support.
2001 July 26:
- Got rid of all the files in the ECL subfolder, including some stuff which was never used. Reimplemented a more efficient replacement for ECL variables, based on hash tables, in the new module Variables.[ch]. This completes the removal of all ECL support. In total over 6000 lines of source and 24 source files were dumped.
2001 July 27:
- The predefined variables ("good_response" etc) are now protected, so the user cannot delete them. They will still get reinitialized, for example as a result of a "reset all" command.
- The "Run" menu item now lets the user choose an AppleScript script to run.
2001 August 8:
- Movie stimuli can now be positioned again like word stimuli (I broke this when I got rid of the movie window).
2001 August 13:
- USBServicesLib (needed for ActiveWire support) is now weak-linked, so PsyScript can again run on systems without USB.
- OTClientUtilLib, OTClientLib and OTInetClientLib (needed for Eyelink support) are now weak-linked, so PsyScript can again run on older systems.
- When saving a picture stimulus to a PICT file, the creator code for the file is now obtained from Internet Config, so you can set it to something other than SimpleText.
- Permanent movie stimuli now have an animation path property. If non-empty, the movie will move along this path while playing, instead of being placed at the current drawing position.
2001 August 20:
- PsyScript now provides its own list-to-string coercion, which inserts a space between items of the list. This is to allow convenient use of lists within wildcard substitutions in trial strings.
2001 August 21:
- Moved implementation of masked picture stimuli from rsvp_4.0.c into Draw.c, with the rest of the picture stimuli handling code.
2001 August 22:
- The "second_response_type" ECL variable is now of integer type, and is set to the AppleEvent enumeration code of the response type, rather than a string response name. The "second response type" application property also returns the enumeration, same as it did before.
2001 August 28:
- Support for the "mouse mapping" application property has been dropped. There has been no way of noticing such clicks since the removal of AllKeyTypeID support on 1999 April 27.
2001 August 29:
- It is now valid to invoke "do trial" with a drawing target defined but no actual experiment in progress. In this situation, the trial will ignore commands that expect user input. This allows the image generated by the trial to be captured into the current drawing target.
2001 September 3:
- template substitutions in "do trial" strings are now specifiable by name, eg do trial "?a ?(arg_b) ?c" given {a:"...", arg_b:"...", c:"..."} If the substitution arguments are given as a simple list (as before), then the list items are automatically assigned the names "1", "2" etc, which also gives backward compatibility.
2001 September 6:
- The names used for template substitutions are now automatically converted to lowercase, because AppleScript will do the same with the field names in the substitution list.
- rationalized some trial commands: "!b" (wait for keyboard input) now becomes "#b", while "!x" (wait for BBox input) becomes "#x", and "!x" is redefined as a new "invoke extension command" prefix, while "#" becomes a general "wait for something" prefix. Thus, the old "!i" Eyelink command prefix is now "!xi", and "!b" (wait for keyboard input) is now "#b". Add "#a" (wait for ActiveWire input) command.
2001 September 7:
- More rationalization of trial commands: "!ci" and "!co" for serial input & output are now "!is" and "!os", being special cases of the new general "!i" and "!o" input and output command prefixes. Add "!oa" (ActiveWire output) and "!ob" (set BBox line) commands, the latter restoring functionality which was lost when Eyelink support was introduced.
2001 September 14:
- The parentheses around multicharacter names used for "do trial" template substitutions are now optional, provided no confusion can arise with following letters or numbers.
- "set drawing target to null" now sets the drawing target back to the experiment window if an experiment is in progress.
- Disabled the "text file creator" property, since PsyScript no longer creates text output files now that ECL support is gone.
2001 September 21:
- Cursor visibility no longer gets out of sync if "!a" is invoked an odd number of times during a trial.
2001 September 24:
- Cutting a trial short if a response is pending should now work for all response types.
- replace different variations on time-to-end-trial condition in various places with calls to single TimeToEndTrial routine. This means in particular that a trial with a fixed duration specified via "!l" should always run for that duration, with loop and pause events cut short if necessary.
- Response types now include "eyelink response" which is triggered on pressing a button on the Eyelink. To go with this, there are now "eyelink button" application elements, with the usual "noticed" and "mapping" properties.
2001 September 25:
- Eyelink responses now respect the buttons' "noticed" setting.
- Change "!xim" and "!xic" Eyelink trial commands to "!oim" and "!oic".
- The response type character code (used in the "!s(response_type ...)" trial command) for the ActiveWire is now "a", same as the code used in the trial I/O commands.
2001 October 5:
- Sound stimuli are now detached from the resource files they came from when loaded. This means that multiple attempts to load the same sound will now work properly, creating multiple copies of the sound in memory.
- Playback of sound stimuli now tries to use a preallocated sound channel, rather than having the Sound Manager create a temporary channel every time a sound is played. As a result, the time it takes to play the built-in "soft_click" sound on my beige G3/266 under MacOS 9.0.4 has been reduced from 196 milliseconds to 5 milliseconds.
2001 October 11:
- Replaced XTUtils code with my own Handler application framework routines. This is to make it easier to keep the event loop running during potentially time-consuming operations, such as I/O on slow devices.
2001 October 16-18:
- Implemented I/O connection objects, replacing the old serial I/O interface. Instead of a single serial connection, you can have multiple connections open at once, with the potential to support other kinds of connections in future (eg TCP). In trial strings, the previous serial-specific "!is" and "!os" commands have been replaced with "!ci(name [nrbytes] [timeout])" for input and "!co(name data)" for output, where name is the connection name assigned when the connection was created with the "make new" command from AppleScript.
2001 November 26:
- Fixed bug in handling of relative paths for picture stimuli.
2002 January 7:
- Changed text-drawing mode from srcCopy to srcOr.
- Use 64 bits for all millisecond-based times to avoid problems on machines which have been running for 25 days or longer.
2002 January 11:
- Setting the screen size property now erases the correct portion of the screen to the current background colour.
- Colour properties were returning incorrect values for other than the 8 classic QuickDraw colours.
2002 January 15:
- Serial I/O now uses Open Transport if available. This allows for port speeds higher than 57600 bits per second.
2002 January 21:
- Sound and movie stimuli can now be played asynchronously in trial strings. To do this, use Ò¡Ó instead of Ò¥Ó for permanent stimuli, and ÒàÓ instead of ÒasteriksÓ for temporary stimuli.
2002 January 30:
- Each loaded sound now has its own channel to allow for asynchronous playback of multiple sound stimuli at once.
2002 January 31:
- Loading movie stimuli now treats the supplied string as a pathname in the same way as when loading picture stimuli; that is, relative paths are interpreted relative to the default folder filespec and the default picture folder string. The pathnames can now also be longer than 255 characters.
2002 February 11:
- "response data of current sound" is again a list of floating-point numbers, rather than a blob. The new code for constructing its value only takes a few milliseconds to return a few seconds' worth of sound data.
2002 February 12:
- drop support for combo response type.
- drop support for mouse_h and mouse_v application properties.
- drop support for secondary responses.
2002 March 13:
- fix bug with trials not terminating when a stimulus is received (introduced when going to 64-bit times).
2002 March 28:
- drop support for "graded response", "grade for correct response" and "grade for bad response" application properties. "grade for timeout" is still returned as the subject response in case of a timeout: perhaps it should be renamed "response for timeout"?
2002 April 5:
- add support for recording multiple responses per trial, controlled by the new "responses per trial" property. Responses are recorded in the new "response" application element class. The old application-level properties "RT"/"reaction time", "subject response", "subject reply", and "mouse location" continue to return information for the first response, though their use is deprecated in new code.
- add new "mouse up response" and "mouse moved response" response types. There is also a "timeout response" response type, which is automatically generated if the specified trial timeout is reached before the minimum expected number of responses has been received.
2002 April 10:
- "reset all" command also resets "responses per trial" to 1.
2002 April 11:
- Note that a maximum of one reply response will be collected per trial.
- Fixed a bug which was causing occasional crashes inside loop constructs in trial strings.
2002 May 2:
- The title of the "Scripts" menu changes to "Edit Scripts" when the option key is down.
2002 May 10:
- Changed the names of some source files: rsvp_4.0.c is now Trials.c; AppleEvents.c is now Scripting.c; macExpAppleEvents.h is now Scripting.h; RSVPSuite.h is now PsyScriptSuite.h; RSVPObjects.h is now Trials.h; RSVP.r is now PsyScript.r; RSVP.Rsrc is now PsyScript Resources. Moved some declarations between .h files to be consistent with their definitions in the corresponding .c files.
- "align" is now a valid synonym for the "justify" trial variable. The name "align" is to be preferred, the technically correct term for the property it controls is "alignment", not "justification". The corresponding AppleScript property has always been called "word alignment".
2002 May 30:
- Add "uncounted response types" application property, which is the list of response types which do not count towards "responses per trial". Initial value is "{mouse moved response}".
- "reset all" now also resets "responses per trial" to 1 and restores the default state of device responses: only keyboard responses enabled, and only mouse-moved responses do not count towards responses per trial.
2002 July 3, 5:
- A movie displayed with no path is now centred at the specified position, rather than having its top-left corner at that position. This is consistent with the positioning of pictures, as well as with the positioning of movies when a path is specified.
- Movies are no longer loaded in their entirety into RAM (this was a waste of memory, given QuickTime's ability to work from disk). They are now loaded into the system heap to reduce the need to resize the application partition when dealing with lots of movies.
- Change meaning of "initialize eyelink with dummy open" to invoke a new mode where Eyelink eye movements can be simulated with the mouse. Note that this pre-empts the use of the mouse for normal mouse response types. Also note that proper recording of dummy Eyelink data is dependent on periodic use of the "g" and "p" (current and previous gaze) coordinate specifiers in trial strings.
- Add "close eyelink" event, which is useful if Eyelink was opened in dummy mode, to allow restoring of normal mouse response types without quitting PsyScript.
2002 July 19:
- Fixed a problem with Eyelink dummy mode where it would wait for one more mouse movement after the trial ends.
- Add new "current eyelink replay" application property that specifies settings to use for drawing the "eyelink replay" display.
back to the top
back to the manual