Readme for EKick.exe EKick is a small command line utility, which makes it possible to pass start-up information as command line arguments when starting an E-Prime ebs-script. This allows you to bypass some or all of the start-up dialogs in an automated test environment. EKick also allows you to specify a custom output location (and filename) for the data files. This is also very useful when an E-Prime script must be started from another program (such as a PowerPoint presentation or an Authorware script.) Each time EKick is run it will create a copy of the original ebs-script and modify the initialization code to setup the specified attributes. The new file will have the same name as the original, but with an additional suffix: _ekick. After the translation the modified script will automatically be started by calling E-Run (Unless the N-switch was specified on the command line.) This new version also supports including some extra functionality in the converted script by inserting function or subroutine calls for some predefined routines. See also "Start E-Prime from Authorware.doc" history: version 1.1: First official release. Compatible with EPrime 1.1 scripts version 1.2.1: (2007-02-26) Solved compatibility issue with EPrime 1.2 scripts version 1.2.2: (2007-03-07) Fixed a bug, which caused a E-Run compile error in 1.2 scripts when the summary information was disabled in EStudio. The following E-Run error was reported: Encountered: End Sub. Expecting: Else, ElseIf, EndIf USAGE: EKick Version 1.2.2 usage: EKick.exe [attribute1=value1] [...] [[-O path]|[-F filename]] [-N] where: is the name of the parameter whose value is to be changed (i.e. Subject or any other startup parameter) is the new value for the attribute (i.e. 1234) -O is the location (i.e. folder) for the data files (optional) -F is the relative or absolute filepath for the raw data file. (optional) -N is a switch to prevent starting E-Run after the script translation. (I.e. only create translated ebs-script) example: ekick c:\myprime\rttest.ebs subject=999 session=2 /F c:\temp\999_2.asc Note that it is required to put filenames inside quotes if the path or filename contains one or more spaces: ekick "c:\my exp\rttest.ebs" subject=999 session=2 /F c:\temp\999_2.asc CUSTOM STARTUP AND EXIT ROUTINES This new version also supports execution of custom start-up and exit routines in the converted script by defining specific function or subroutine calls in the user section. The following routines are currently recognized: (to be placed in View->Script->User code) Function HandleFilename(c as Context) as String Function PreRun(strTxtFile as string) as boolean Sub AtExit(strTxtFile as string) Example routines: '---------------------------------------------------------------------------- ' Function which will be called to check (or modify) the output filename. ' This example creates a filename with a specific path Function HandleFilename(c as Context) as String dim sExp as String dim sSubj as String dim sSession as String sExp = CStr(c.GetAttrib("Experiment")) sSubj = CStr(c.GetAttrib("Subject")) sSession = CStr(c.GetAttrib("Session")) HandleFilename = "C:\\MyData\\" & sExp & "-" & sSubj & "-" & sSession & ".txt" End Function '---------------------------------------------------------------------------- ' Function which will be called just before starting the test. ' This example runs an external batch file. Function PreRun(strTxtFile as string) as boolean dim id as long id = Shell("prerun.bat """ & strTxtFile & """", ebHide ) PreRun = true ' the experiment will be aborted when false is returned End Function '---------------------------------------------------------------------------- ' Subroutine which will be called just before termination. ' This example runs an external batch file. Sub AtExit(strTxtFile as string) dim id as long id = Shell("postrun.bat """ & strTxtFile & """", ebHide ) End sub The PreRun() and AtExit() examples above, just run an external batch file which will be executed at the beginning and end the E-Prime script itself. Typical usage for running external batch files are: -storing aditional information in log files -calculating checksums (CRC, MD5, ...) on the outputfiles -moving or securing output files -... For example, creating additional log-info, securing files and calculating checksums might be needed in cases where detailed data security and auditing is required. For more info: Paul Groot, mailto:instrumentatie@psy.vu.nl http://www.psy.vu.nl/itm or http://www.psy.vu.nl/download/menu Copyright (c) 2005-2007 Vrije Universiteit -FPP -ITM - Paul F.C. Groot