From Drtweets19 at cs.com Fri Aug 1 16:33:20 2003 From: Drtweets19 at cs.com (Drtweets19 at cs.com) Date: Fri, 1 Aug 2003 12:33:20 EDT Subject: variable definition help Message-ID: Hey everyone, First i would like to thank all of you for your help thus far. We have one question. We constantly get the error that states "Variable not defined" Basic question, how do u define variables. We've tried every compilation we could think of and we get the same result; Variable not defined. Please help Thanx, Natalie -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony.zuccolotto at pstnet.com Fri Aug 1 17:04:16 2003 From: anthony.zuccolotto at pstnet.com (Tony Zuccolotto) Date: Fri, 1 Aug 2003 13:04:16 -0400 Subject: variable definition help Message-ID: Natalie, I would expect that the error you get should show you the script line that contains the variable that is not defined. The variable will likely exist in either an Inline object you created or in the 'User Script' area. It is common to get this error if you have either not declared a variable, or perhaps misspelled one instance of a variable that you did declare. For example Dim myVariable As String myVariable = "Hello" mVariable = "Hello" ' mVariable is undeclared If it is the case that you need to declare a variable then you need to use the Dim statement as shown above. If you only need the variable's value to exist within one invocation of a procedure you can declare the variable within an Inline object that you drop on the procedure. If you need to variable to maintain it's value over multiple procedure calls or over the life of the entire experiment then you need to declare it 'globally' by putting your Dim statement for the variable on the User tab of the Script window (i.e. which is there specifically to allow you to define global variables, constants and entire subroutines/functions that can be accessed from anywhere else in your experiment). To show the Script window choose View|Script from the E-Studio menubar. Once the window is shown click on the User tab at the bottom and you can type directly into the window. Note that the other tab is labeled 'Full' and it allows you to see the full/complete script that E-Studio generated from your graphical specification of the experiment when you hit the Generate or Run button (the 'Full' script tab is read-only since E-Studio rewrites the full script every time you generate or run the experiment). Hope that helps. Tony *** DISCLAIMER: ALL VIEWS EXPRESSED ARE MY OWN AND DO NOT NECESSARILY REFLECT THOSE OF PSYCHOLOGY SOFTWARE TOOLS *** Anthony P. Zuccolotto Vice President Psychology Software Tools, Inc. 2050 Ardmore Boulevard Suite 200 Pittsburgh, PA 15221-4610 Phone 412-271-5040 FAX 412-271-7077 Email anthony.zuccolotto at pstnet.com Internet http://www.pstnet.com -----Original Message----- From: Drtweets19 at cs.com [mailto:Drtweets19 at cs.com] Sent: Friday, August 01, 2003 11:33 AM To: eprime at mail.talkbank.org Subject: variable definition help Hey everyone, First i would like to thank all of you for your help thus far. We have one question. We constantly get the error that states "Variable not defined" Basic question, how do u define variables. We've tried every compilation we could think of and we get the same result; Variable not defined. Please help Thanx, Natalie -------------- next part -------------- An HTML attachment was scrubbed... URL: From Drtweets19 at cs.com Fri Aug 1 17:24:24 2003 From: Drtweets19 at cs.com (Drtweets19 at cs.com) Date: Fri, 1 Aug 2003 13:24:24 EDT Subject: script error info Message-ID: This is what we wrote in the User Script 'Update the total trial count 'Set value as an attribute for display g_nTotalTrial = g_nTotalTrial+1 c.SetAttrib "TrialCount", g_nTotalTrial This is what we get in return: Compile Error (Line 372, Col 1) 128: Variable not defined Note: we are trying to install the signal detection theory experiment from mel labs to e-prime. Natalie -------------- next part -------------- An HTML attachment was scrubbed... URL: From anthony.zuccolotto at pstnet.com Fri Aug 1 17:33:27 2003 From: anthony.zuccolotto at pstnet.com (Tony Zuccolotto) Date: Fri, 1 Aug 2003 13:33:27 -0400 Subject: script error info Message-ID: The only thing the User Script area can be used for is declaring variables, constants, or complete functions/subroutines, i.e. you can't execute any code in there that are not inside of a declared function/subroutine. You need to put just the following line in User Script... Dim g_nTotalTrial As Long ...and then the rest of the script you have listed needs to go inside an InLine object that you drop near or at the end of your trial procedure (i.e. wherever else it is appropriate in your paradigm to have g_nTotalTrial incremented). Regards, Tony -----Original Message----- From: Drtweets19 at cs.com [mailto:Drtweets19 at cs.com] Sent: Friday, August 01, 2003 12:24 PM To: eprime at mail.talkbank.org Subject: script error info This is what we wrote in the User Script 'Update the total trial count 'Set value as an attribute for display g_nTotalTrial = g_nTotalTrial+1 c.SetAttrib "TrialCount", g_nTotalTrial This is what we get in return: Compile Error (Line 372, Col 1) 128: Variable not defined Note: we are trying to install the signal detection theory experiment from mel labs to e-prime. Natalie -------------- next part -------------- An HTML attachment was scrubbed... URL: From amy.eschman at pstnet.com Fri Aug 1 18:03:32 2003 From: amy.eschman at pstnet.com (Amy Eschman) Date: Fri, 1 Aug 2003 14:03:32 -0400 Subject: script error info Message-ID: The E-Prime User's Guide has a section on writing script (Chapter 4: Using E-Basic) that discusses declaring and intializing variables, as well as when to use the User Script window versus when to use an InLine. If you are relatively new to writing script in E-Prime, this info may be helpful to you. Amy *** DISCLAIMER: ALL VIEWS EXPRESSED ARE MY OWN AND DO NOT NECESSARILY REFLECT THOSE OF PSYCHOLOGY SOFTWARE TOOLS *** Amy Eschman Manager, Technical Support Psychology Software Tools, Inc. 2050 Ardmore Boulevard Suite 200 Pittsburgh, PA 15221-4610 Phone 412-271-5040 FAX 412-271-7077 Internet http://www.pstnet.com -----Original Message----- From: Tony Zuccolotto Sent: Friday, August 01, 2003 1:33 PM To: eprime at mail.talkbank.org Subject: RE: script error info The only thing the User Script area can be used for is declaring variables, constants, or complete functions/subroutines, i.e. you can't execute any code in there that are not inside of a declared function/subroutine. You need to put just the following line in User Script... Dim g_nTotalTrial As Long ...and then the rest of the script you have listed needs to go inside an InLine object that you drop near or at the end of your trial procedure (i.e. wherever else it is appropriate in your paradigm to have g_nTotalTrial incremented). Regards, Tony -----Original Message----- From: Drtweets19 at cs.com [mailto:Drtweets19 at cs.com] Sent: Friday, August 01, 2003 12:24 PM To: eprime at mail.talkbank.org Subject: script error info This is what we wrote in the User Script 'Update the total trial count 'Set value as an attribute for display g_nTotalTrial = g_nTotalTrial+1 c.SetAttrib "TrialCount", g_nTotalTrial This is what we get in return: Compile Error (Line 372, Col 1) 128: Variable not defined Note: we are trying to install the signal detection theory experiment from mel labs to e-prime. Natalie -------------- next part -------------- An HTML attachment was scrubbed... URL: From staab at Waisman.Wisc.Edu Wed Aug 6 17:56:42 2003 From: staab at Waisman.Wisc.Edu (Ben Staab) Date: Wed, 6 Aug 2003 12:56:42 -0500 Subject: Dual Monitor support in WinXP (solution?!) Message-ID: A while ago I had posted a message asking about using Eprime on a computer with Dual Monitors. We wanted the initial data collection to occur on one screen, while the actual experiment ran on the other screen. Unfortunately the solutions provided here would not work very well in our lab. We needed to stay away from hardware solutions, and there were some options the video driver just wouldn't let us try (mirroring, etc). I did finally come up with a programmatic (yet kludgy!) solution. Basically it involved two things: 1. A WSH-run vbScript that switches the monitor modes before and after ERun is *um* run. At first I had done this using an evaluation version of UltraMon (http://www.realtimesoft.com/ultramon/). I setup two ultramon profiles different only in which monitor was primary, and had the script launch each profile in turn. After the trial period expired, I figured there has to be a way to script that primary switch myself. There is, but it isn't pretty. For posterity's sake, this is the vbscript I came up with to switch monitor 2 to primary: oShell.Run "control desk.cpl,,3" ' open display properties Do Until oShell.AppActivate("Display Properties") ' wait for box to show up WScript.Sleep 100 Loop oShell.SendKeys "2%u~" 'send key combo to set display 2 to primary Of course, using a script to launch ERun had an added advantage: We have different trial lists that are used for the same experiment. The script prompts for which list to use, and copies it to the correct place before the experiment is run. 2. I rewrote the data collection prompts to use InputBoxes instead of the stock AskBoxes. InputBoxes allow you to specify where on the screen the box comes up. If two monitors are set side by side, with the right(as in starboard) being primary, an InputBox set to display at -10080 twips will show up about in the middle of the left monitor. In all the log file juggling this required, I found another blessing in disguise. I can now name the logfiles whatever I want. If anyone would like more detailed information on what exactly I did here, or would like a peek at the source code, let me know. Ben Staab staab at waisman.wisc.edu From Thomas.Soerensen at psy.ku.dk Thu Aug 7 09:48:44 2003 From: Thomas.Soerensen at psy.ku.dk (Thomas Soerensen) Date: Thu, 7 Aug 2003 11:48:44 +0200 Subject: runtime error Message-ID: Hi, I am trying to make a version of Sternbergs fast memory search in e-prime. = During a blank screen while the subject is reporting the answer I get a = periodic error and I cannot seem to find an explanation for that error = number - So I was wondering whether one of you had experienced it or know = why it appears. The following runtime error occurred Input accepted Error number: -998 - Thomas _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ Thomas Alrik Soerensen =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D C. M. Larsens All=E9 5 2770 Kastrup Phone - (+45) 2734 8620 E-mail - tas at psy.ku.dk WWW - http://www.frip.dk/thomsen _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ From anthony.zuccolotto at pstnet.com Thu Aug 7 13:57:58 2003 From: anthony.zuccolotto at pstnet.com (Tony Zuccolotto) Date: Thu, 7 Aug 2003 09:57:58 -0400 Subject: runtime error Message-ID: Hi Thomas, This typically occurs when you are using and extended Time Limit on an input mask with an Input Action set to Jump, but the response comes in after the Jump destination label has already been passed and the handler setup for the jump has been disabled. Jumping is implemented internally using the On Error Goto