Script too large to compile
Cynthia J DeVore
devo0023 at tc.umn.edu
Wed Oct 15 14:01:25 UTC 2003
Mark,
I've still had problems with this, even running 1.1. You can solve this in
one of two ways (or a combination of the two):
1) Streamline Experiment
* Have you mistakenly created copies of identical display objects (Slide2 =
Slide1) instead of reusing objects?
* Are some display objects more similar than different? Can you possibly
add an attribute to a list to then reuse a display object?
* Can your lists be made into embedded files? It's really easier to
maintain that way and you have access to Spell Check.
2) Break the Experiment into pieces
* You can call a second E-Prime experiment from a first experiment with a
simple call. You can even pass through the same startup information. What
follows is a package I wrote to do just this. It might need some tweaking
as I hurriedly culled it from a larger package.
Cynthia
[Header]
PackageName="ExperimentNavigation"
Description="Move from Experiment to Experiment"
VersionMajor=1
VersionMinor=0
VersionInternal=0
VersionRevision=0
[Global]
[InitPackages]
' *** Package initialization
[UnInitPackages]
' *** Package cleanup
[Desc_ExperimentNavigation_GoToNextProgram]
Overview:
This inline code calls an E-Prime program, supplying selected
session attributes.
Requirements:
* The StartUp Info Parameters for the called program must
match
those in the package call for order.
* Subject number MUST be the first parameter in the called
program
* In the called program, turn OFF the "display of the
summary to confirm
the values".
* E-Run.exe must be located in c:\My
Programs\PST\E-Prime\Program\
Parameters:
c = Context (required)
ProgramName = Name of the program, without the extension (required)
DisplayCall = True/False: If true, a messagebox will show the
call. This
is helpful when debugging.
Path = Path to the program (optional: default is same path as
current program)
InfoParameter, InfoParameter, ... = StartUp Info Parameters needed
by the
called program. All parameters must be in the order in
which they
will be prompted by the called program. The Subject number
is automatically
generated based upon the current subject number. All other
parameters
are optional.
Remarks:
[Info_ExperimentNavigation_GoToNextProgram]
DefaultParameters="c,\"Replace with called program name without
extension\",False"
[PreSub_ExperimentNavigation_GoToNextProgram]
[Sub_ExperimentNavigation_GoToNextProgram]
Public Sub ExperimentNavigation_GoToNextProgram(c as context, _
CalledProgramName as String, _
DisplayCall as Boolean, _
Optional CalledProgramPath as Variant, _
Optional Parm1 as Variant, _
Optional Parm2 as Variant, _
Optional Parm3 as Variant, _
Optional Parm4 as Variant, _
Optional Parm5 as Variant, _
Optional Parm6 as Variant, _
Optional Parm7 as Variant, _
Optional Parm8 as Variant)
Dim Subject as Integer
Dim Parm as String
Dim ebQuote as String
Dim ebSlash as String
Dim TempFileName as string
Dim ParmList (1 to 8) as String
Dim ParmCount as Integer
Dim ParmIndex as Integer
Dim tempparm as String
Dim ProgramPath as String
Dim id as variant
Dim CalledProgramPart1 as string
Dim CalledProgramPart2 as string
Dim MessageToDisplay as string
ebQuote = Chr(34)
ebSlash = Chr(92)
CalledProgramPart1 = ebquote & "c:" & ebSlash & "program files" & _
ebSlash & "pst" & ebSlash & "e-prime" & ebSlash &
"program" & _
ebSlash & "e-run.exe" & ebquote & space(1) & ebquote &
"/a" & _
ebquote & space(1) & ebQuote & "/m" & ebquote & space(1) &
ebquote
' Get the standard parameter
Subject = c.getattrib("Subject")
' Get the path
If ismissing(calledProgramPath) Then
tempparm = c.datafile.filename
ProgramPath = FileParse$(tempparm,2)
Else
ProgramPath = CalledProgramPath
End If
' Fill the ParmList with the optional parameters
If Not IsMissing(Parm1) Then
ParmList(1) = Parm1
MessageToDisplay = "\n" & ParmList(1)
ParmCount = 1
End If
If Not IsMissing(Parm2) Then
ParmList(2) = Parm2
MessageToDisplay = "\n" & ParmList(2)
ParmCount = 2
End If
If Not IsMissing(Parm3) Then
ParmList(3) = Parm3
MessageToDisplay = "\n" & ParmList(3)
ParmCount = 3
End If
If Not IsMissing(Parm4) Then
ParmList(4) = Parm4
MessageToDisplay = "\n" & ParmList(4)
ParmCount = 4
End If
If Not IsMissing(Parm5) Then
ParmList(5) = Parm5
MessageToDisplay = "\n" & ParmList(5)
ParmCount = 5
End If
If Not IsMissing(Parm6) Then
ParmList(6) = Parm6
MessageToDisplay = "\n" & ParmList(6)
ParmCount = 6
End If
If Not IsMissing(Parm7) Then
ParmList(7) = Parm7
MessageToDisplay = "\n" & ParmList(7)
ParmCount = 7
End If
If Not IsMissing(Parm8) Then
ParmList(8) = Parm8
MessageToDisplay = "\n" & ParmList(8)
ParmCount = 8
End If
tempparm = ProgramPath & ebSlash & CalledProgramName & ".ebs"
CalledProgramPart2 = CalledProgramPart1 & tempparm & ebquote
' Display the call if requested
If DisplayCall Then
Msgbox "This program, generating data file " &
c.datafile.filename & " is calling " & _
tempparm & " with the following " & _
format$(ParmCount,"0") & " parameters: " &
MessageToDisplay & "\n" & _
"The following string will be sent to the shell: "
& CalledProgramPart2
End If
If FileExists(tempparm) Then
id = Shell (CalledProgramPart2, ebNormalFocus)
SendKeys Subject, True
SendKeys "{ENTER}", True
For ParmIndex = 1 to ParmCount
tempparm = c.getattrib(ParmList(ParmIndex))
SendKeys tempparm, True
SendKeys "{ENTER}", True
Next ParmIndex
Else
MsgBox "Program " & tempparm & " does not exist."
End If
End Sub
[PostSub_ExperimentNavigation_GoToNextProgram]
' *** no script needed
At 08:22 AM 10/15/2003, Mark G Orr wrote:
>Hello, i searched the archives, but could not find how to solve the
>following problem. THe error message was:
>
>"Complile Error (Line 3118, Col 42)
>76: Script is too large to be compiled"
>
>Any ideas?
>
>
>-Mark Orr
>
>
>
>
>
>
>________________________________
>Mark G. Orr
>Postdoctoral Research Fellow
>Dept. of Psychology, RM 330 Baker
>Carnegie Mellon University
>Pittsburgh, PA 15213
>
>phone: 412.268.4237
>fax: 412.268.2798
>email: morrct at andrew.cmu.edu
Cynthia J. DeVore
Graduate Student
University of Minnesota - Industrial/Organizational Psychology
devo0023 at tc.umn.edu
612-624-3601
Office hours for E-Prime Consultant:
http://online.psych.umn.edu/IS/Elliott160/Calendar/200310.htm
E-Prime @ U of MN http://online.psych.umn.edu/IS/Eprime/index.htm
More information about the Eprime
mailing list