From evelina at illinois.edu Tue Jan 4 18:13:42 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Tue, 4 Jan 2011 10:13:42 -0800 Subject: Track trigger timing Message-ID: Hi, I am creating an experiment where a TMS is triggered at various points during a trial sequence (where several stimuli are presented). I have InLine code at the very beginning of the experiment that randomizes the onset of the trigger. What I want to be able to do is to timestamp the execution of the trigger -- in other words, I want a timestamp when the line of code in InLine for trigger TMS is begun/completed and I want to log that data together with other information in the final .edat file. For that purpose I have declared 2 global variables "PulseOn" and "PulseOff" under the User tab in the Script window. In my InLine code right after trigger is executed (and I know that the trigger works just as it should) I have added PulseOn = Clock.Read c.SetAttrib "PulseOnset", PulseOn and similar code is placed after the port is turned off for trigger offset time stamp. However, when I run this code, the variables PulseOnset/Offset are not saved in the data file. I have also tried to use c.Log in this InLine but then only one line of data (one trial) is saved and although trigger onset/offset are marked, there is no more any data about the objects presented during the trial. In the documentation I have found that "a variable must be set as an attribute of the context object in order to be logged in the data file" so I assume that the issue here is that PulseOn/Off aren't really "attached" to any object in the experiment... Is there a way around that? Or another way to log the onset/offset of the trigger? THANK YOU! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jan 4 19:10:18 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 4 Jan 2011 19:10:18 +0000 Subject: Track trigger timing In-Reply-To: <075d52bc-8ec7-483b-8756-fe5b92cad223@30g2000yql.googlegroups.com> Message-ID: Hiya, What you're saying doesn't sound like anything E-Prime should omit. The only reason I can see your data is not being saved is that for some reason, these lines are skipped. There can be many reasons for this (say, a button-press causes a goto to fire), but what you would need to find out is whether you are actually logging anything. That is, just move the inline thingy forward/backwards along the procedure and see whether anything is logged. I'd also recommend shortening the line to c.SetAttrib "PulseOnset", clock.read so that you don't even have to declare any variable. One question though: is _nothing_ being saved, or is PulseOnset found somewhere in your edat file, but with nothing in there? If the former, then the line is presumably skipped (as i had assumed based on what you write). If the latter, then a number of other things may be going on (e.g. it's saved under a sub-trial level thus easily overlooked). One final thought: I'd first get everything running, THEN start thinking about adding TMS triggers and whatnot. It's far easier to add advanced bits to the working basics than vice versa. Can you, for instance, get a Stroop experiment (or any of the tutorial experiments) running with a c.SetAttrib "MyExtraLoggedData", clock.read added? cheers, Mich ________________________________________ From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf Of Evelina Tapia [evelina at illinois.edu] Sent: 04 January 2011 18:13 To: E-Prime Subject: Track trigger timing Hi, I am creating an experiment where a TMS is triggered at various points during a trial sequence (where several stimuli are presented). I have InLine code at the very beginning of the experiment that randomizes the onset of the trigger. What I want to be able to do is to timestamp the execution of the trigger -- in other words, I want a timestamp when the line of code in InLine for trigger TMS is begun/completed and I want to log that data together with other information in the final .edat file. For that purpose I have declared 2 global variables "PulseOn" and "PulseOff" under the User tab in the Script window. In my InLine code right after trigger is executed (and I know that the trigger works just as it should) I have added PulseOn = Clock.Read c.SetAttrib "PulseOnset", PulseOn and similar code is placed after the port is turned off for trigger offset time stamp. However, when I run this code, the variables PulseOnset/Offset are not saved in the data file. I have also tried to use c.Log in this InLine but then only one line of data (one trial) is saved and although trigger onset/offset are marked, there is no more any data about the objects presented during the trial. In the documentation I have found that "a variable must be set as an attribute of the context object in order to be logged in the data file" so I assume that the issue here is that PulseOn/Off aren't really "attached" to any object in the experiment... Is there a way around that? Or another way to log the onset/offset of the trigger? THANK YOU! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 4 22:30:02 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 4 Jan 2011 17:30:02 -0500 Subject: Track trigger timing In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20BCCE68@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Evelina, Mich pretty much covered it. I will add only the following: For debugging purposes, you can sprinkle the code with MsgBox or Debug.Print statements so that you can trace execution flow and see if the code really goes where you think it does. MsgBox will mess up the program timing, but will show at run time where your code is, and will work outside of E-Studio; Debug.Print requires running from E-Studio, but offers some other niceties. I would not use a c.Log anywhere except in exceptional circumstances (e.g., a loop within a Procedure where I want to add extra log lines). The Procedure already supplies a c.Log where needed, each extra c.Log that you add also adds another line to the log, which is rarely what you want. More to the point, simply using c.SetAttrib already does everything needed to added an attribute to the log, since EP automatically addes the required c.Log (don't take my word for that, look at the generated code just before End Sub of your Procedure). The PulseOn/Off need not be "attached" to any object in the program (and as Mich pointed out, you don't really need the variables at all). As described it looks like you are doing everything correctly, so we must be missing something. Which brings us back to the general debugging tips offered by Mich & me to see if the program flow really goes where you think it does. Good luck, -- David McFarlane, Professional Faultfinder Michiel Spape wrote: >Hiya, >What you're saying doesn't sound like anything E-Prime should omit. >The only reason I can see your data is not being saved is that for >some reason, these lines are skipped. There can be many reasons for >this (say, a button-press causes a goto to fire), but what you would >need to find out is whether you are actually logging anything. That >is, just move the inline thingy forward/backwards along the >procedure and see whether anything is logged. I'd also recommend >shortening the line to >c.SetAttrib "PulseOnset", clock.read >so that you don't even have to declare any variable. > >One question though: is _nothing_ being saved, or is PulseOnset >found somewhere in your edat file, but with nothing in there? If the >former, then the line is presumably skipped (as i had assumed based >on what you write). If the latter, then a number of other things may >be going on (e.g. it's saved under a sub-trial level thus easily overlooked). > >One final thought: I'd first get everything running, THEN start >thinking about adding TMS triggers and whatnot. It's far easier to >add advanced bits to the working basics than vice versa. Can you, >for instance, get a Stroop experiment (or any of the tutorial >experiments) running with a c.SetAttrib "MyExtraLoggedData", clock.read added? >cheers, >Mich > >________________________________________ >From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf >Of Evelina Tapia [evelina at illinois.edu] >Sent: 04 January 2011 18:13 >To: E-Prime >Subject: Track trigger timing > >Hi, > >I am creating an experiment where a TMS is triggered at various points >during a trial sequence (where several stimuli are presented). I have >InLine code at the very beginning of the experiment that randomizes >the onset of the trigger. What I want to be able to do is to timestamp >the execution of the trigger -- in other words, I want a timestamp >when the line of code in InLine for trigger TMS is begun/completed and >I want to log that data together with other information in the >final .edat file. For that purpose I have declared 2 global variables >"PulseOn" and "PulseOff" under the User tab in the Script window. In >my InLine code right after trigger is executed (and I know that the >trigger works just as it should) I have added > >PulseOn = Clock.Read >c.SetAttrib "PulseOnset", PulseOn > >and similar code is placed after the port is turned off for trigger >offset time stamp. However, when I run this code, the variables >PulseOnset/Offset are not saved in the data file. I have also tried to >use c.Log in this InLine but then only one line of data (one trial) is >saved and although trigger onset/offset are marked, there is no more >any data about the objects presented during the trial. > >In the documentation I have found that "a variable must be set as an >attribute of the context object in order to be logged in the data >file" so I assume that the issue here is that PulseOn/Off aren't >really "attached" to any object in the experiment... Is there a way >around that? Or another way to log the onset/offset of the trigger? > >THANK YOU! > >Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Wed Jan 5 09:24:40 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 01:24:40 -0800 Subject: "Binding" images together Message-ID: Hi, I'm still quite new to e-prime and am trying to create an experiment where a constant stream of faces is presented to the participant. The faces consist of emotionally neutral and emotional expressive faces. The plan is to have a "train" of neutral faces with a random presentation of an emotional face and then a second same emotional face shown directly after then back to the neutral train for x repeats. So something like: n n n n n n E E n n n n n n E E n n n n n n n n E E. While relatively simply in theory, working with the list method is arduous as (and please correct me if I'm wrong) the presentation method can't be set to random and keep the double E faces shown together. My question then: is it possible to have a random presentation of E faces during a block while keeping the presentation of the two E faces together? Is there a way to "bind" them together while "jumping" back to the n faces after both have been presented or do I need to create a manual psuedo-random list? Any comments are appreciated, and thanks in advance. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jan 5 10:27:00 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 5 Jan 2011 10:27:00 +0000 Subject: "Binding" images together In-Reply-To: <32ca45fe-417e-4bbd-bb19-1329432abc4c@z26g2000prf.googlegroups.com> Message-ID: Hi, If I understand correctly, what you would ideally want is a way to randomise the NUMBER of presentations (as opposed to, what would be more normal in E-Prime, the ORDER)? You could easily do this with one (or more) lists and the setweight method. That is, if you want to First present random number of neutral faces Then present 2 emotional faces Then present random number of neutral faces And you have one List, say List1, you could just enter two levels (one for each of the above), and just before the list, have this small inline: List1.SetWeight 1, random(1,80) List1.SetWeight 3, random(1,80) List1.Reset Et voila, your first and third level shall be presented a random number (between 1 and 80) of times. Job done, I think, and probably more elegant than jumping back and forth (as you suggested, which would obviously also be possible). ...unless you want to go back to THE SAME emotional faces, although that could be managed using Attribute:level syntax. Cheers, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Orcasha Sent: 05 January 2011 09:25 To: E-Prime Subject: "Binding" images together Hi, I'm still quite new to e-prime and am trying to create an experiment where a constant stream of faces is presented to the participant. The faces consist of emotionally neutral and emotional expressive faces. The plan is to have a "train" of neutral faces with a random presentation of an emotional face and then a second same emotional face shown directly after then back to the neutral train for x repeats. So something like: n n n n n n E E n n n n n n E E n n n n n n n n E E. While relatively simply in theory, working with the list method is arduous as (and please correct me if I'm wrong) the presentation method can't be set to random and keep the double E faces shown together. My question then: is it possible to have a random presentation of E faces during a block while keeping the presentation of the two E faces together? Is there a way to "bind" them together while "jumping" back to the n faces after both have been presented or do I need to create a manual psuedo-random list? Any comments are appreciated, and thanks in advance. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Wed Jan 5 18:37:39 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Wed, 5 Jan 2011 10:37:39 -0800 Subject: Track trigger timing In-Reply-To: <4d239f6d.9915e70a.37cb.688fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Michiel and David, Thank you very much for your suggestions. My program worked as it should without the TMS trigger. I have finally figured out the solution to this problem and will post it here in case someone else has a similar issue. Originally, the InLine script that sent the trigger to the TMS was placed at the very beginning of the experiment. That is where I also coded my variables (right after trigger code I had [PulseOn = Clock.Read]). So, it turns out, probably not surprisingly, that this InLine is read only once during the experiment (although if anyone could explain how the trial procedure knows when to execute the triggers which are specified and read only once at the beginning of the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ Offsets will have the same value on a trial-by-trial basis. In order to update PulseOn/Off variable I had to move the InLine with triggers to the beginning of the trial procedure (which I didn’t do originally due to some other issues with the trigger). I also created empty columns (called PulseOnset/Offset) in the trial List because that is where the variables will be stored. The code is printed below. Happy programming! Evelina ************************************************ ‘Here PulseSOAs is a List with trial parameters 'For zero SOA trigger on Target If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then Target.OnsetSignalEnabled = True Target.OnsetSignalPort = &H378 Target.OnsetSignalData = 128 'Timestamp pulse onset ‘PulseOnset is a blank column in PulseSOAs List c.SetAttrib "PulseOnset", Clock.Read 'Resets port Target.OffsetSignalEnabled = True Target.OffsetSignalPort = &H378 Target.OffsetSignalData = 0 'Timestamp pulse offset ‘PulseOffset is a blank column in PulseSOAs List c.SetAttrib "PulseOffset", Clock.Read 'For positive SOAs trigger on Blank ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then Blank3.OnsetSignalEnabled = True Blank3.OnsetSignalPort = &H378 Blank3.OnsetSignalData = 128 'Timestamp pulse onset c.SetAttrib "PulseOnset", Clock.Read 'Resets port Blank3.OffsetSignalEnabled = True Blank3.OffsetSignalPort = &H378 Blank3.OffsetSignalData = 0 'Timestamp pulse offset c.SetAttrib "PulseOffset", Clock.Read End If -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Wed Jan 5 21:32:49 2011 From: pquain at une.edu.au (Peter Quain) Date: Thu, 6 Jan 2011 08:32:49 +1100 Subject: Track trigger timing In-Reply-To: <6b15b4e4-0e38-4b7f-b2fe-a0da14eb008f@z9g2000yqz.googlegrou ps.com> Message-ID: you don't need any blank columns in a List (PulseOnset/Offset), no values are writen there at runtime. SetAttrib sets the value of an attribute, and stores that value in the LogFile in a column for that attribute, not in any List. At 05:37 AM 6/01/2011, you wrote: >Michiel and David, > >Thank you very much for your suggestions. My program worked as it >should without the TMS trigger. I have finally figured out the >solution to this problem and will post it here in case someone else >has a similar issue. > >Originally, the InLine script that sent the trigger to the TMS was >placed at the very beginning of the experiment. That is where I also >coded my variables (right after trigger code I had [PulseOn = >Clock.Read]). So, it turns out, probably not surprisingly, that this >InLine is read only once during the experiment (although if anyone >could explain how the trial procedure knows when to execute the >triggers which are specified and read only once at the beginning of >the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ >Offsets will have the same value on a trial-by-trial basis. In order >to update PulseOn/Off variable I had to move the InLine with triggers >to the beginning of the trial procedure (which I didn't do originally >due to some other issues with the trigger). I also created empty >columns (called PulseOnset/Offset) in the trial List because that is >where the variables will be stored. The code is printed below. > >Happy programming! > >Evelina > >************************************************ >'Here PulseSOAs is a List with trial parameters >'For zero SOA trigger on Target >If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then > Target.OnsetSignalEnabled = True > Target.OnsetSignalPort = &H378 > Target.OnsetSignalData = 128 > > 'Timestamp pulse onset > 'PulseOnset is a blank column in PulseSOAs List > c.SetAttrib "PulseOnset", Clock.Read > > 'Resets port > Target.OffsetSignalEnabled = True > Target.OffsetSignalPort = &H378 > Target.OffsetSignalData = 0 > > 'Timestamp pulse offset > 'PulseOffset is a blank column in >PulseSOAs List > c.SetAttrib "PulseOffset", Clock.Read > > >'For positive SOAs trigger on Blank >ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then > Blank3.OnsetSignalEnabled = True > Blank3.OnsetSignalPort = &H378 > Blank3.OnsetSignalData = 128 > > 'Timestamp pulse onset > c.SetAttrib "PulseOnset", Clock.Read > > 'Resets port > Blank3.OffsetSignalEnabled = True > Blank3.OffsetSignalPort = &H378 > Blank3.OffsetSignalData = 0 > > 'Timestamp pulse offset > c.SetAttrib "PulseOffset", Clock.Read > >End If > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Thu Jan 6 02:20:07 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 18:20:07 -0800 Subject: "Binding" images together In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20B598E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi Michiel, Thanks for getting back to me so quickly. If I understand this correctly, that's kind of what I want (and I apologise for not being as indepth about the method) but it seems only deals with a single set of emotional faces. Basically I want to use 5 kinds of emotional faces shown twice in a row then a random number of neutral faces, and after each face presentation have a blank screen come up. So a more accurate way of explaining it would be (n = neutral, b = blank, E(x) = emotion): n b n b n b n b n b n b E1 b E1 b n b n b n b n b E2 b E2 b n b n b n and so forth. Can your method do this too? Thanks again. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Thu Jan 6 04:32:37 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 20:32:37 -0800 Subject: "Binding" images together In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20B598E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi Michiel, Thanks for getting back to me so quickly. If I understand the code correctly, this will show a random amount of neutral faces, then the two emotional faces (the second possibly being shown a random amount of times too?) then resetting back to neutral faces. But this seems only deals with a single set of emotional faces then going back to the neutral face. The problem comes as I want to use 5 randomly selected paired emotional faces (sad + sad, happy + happy etc) then a random number of neutral faces, and after each face presentation have a blank screen come up (and I apologise for not being as indepth about the method in my earlier post). So a more accurate way of explaining it would be (n = neutral, b = blank, E(x) = emotion): n b n b n b n b n b n b E1 b E1 b n b n b n b n b E2 b E2 b n b n b n... When I try doing a method similar to yours it doesn't always go back to the neutral for random presentation but sometimes has two lots of emotional pairs running back to back. So the revised question is: How can I create a protocol that allows me to go back to a random number of neutral faces, but prevents E pairs from occasionally being presented consecutively? Thanks again. On Jan 5, 9:27 pm, Michiel Spape wrote: > Hi, > If I understand correctly, what you would ideally want is a way to randomise the NUMBER of presentations (as opposed to, what would be more normal in E-Prime, the ORDER)? You could easily do this with one (or more) lists and the setweight method. That is, if you want to > First present random number of neutral faces > Then present 2 emotional faces > Then present random number of neutral faces > And you have one List, say List1, you could just enter two levels (one for each of the above), and just before the list, have this small inline: > List1.SetWeight 1, random(1,80) > List1.SetWeight 3, random(1,80) > List1.Reset > Et voila, your first and third level shall be presented a random number (between 1 and 80) of times. > Job done, I think, and probably more elegant than jumping back and forth (as you suggested, which would obviously also be possible). > > ...unless you want to go back to THE SAME emotional faces, although that could be managed using Attribute:level syntax. > Cheers, > Mich > > Michiel Spapé > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Orcasha > Sent: 05 January 2011 09:25 > To: E-Prime > Subject: "Binding" images together > > Hi, > > I'm still quite new to e-prime and am trying to create an experiment > where a constant stream of faces is presented to the participant. The > faces consist of emotionally neutral and emotional expressive faces. > > The plan is to have a "train" of neutral faces with a random > presentation of an emotional face and then a second same emotional > face shown directly after then back to the neutral train for x > repeats. So something like: n n n n n n E E n n n n n n E E n n n n n > n n n E E. > > While relatively simply in theory, working with the list method is > arduous as (and please correct me if I'm wrong) the presentation > method can't be set to random and keep the double E faces shown > together. > > My question then: is it possible to have a random presentation of E > faces during a block while keeping the presentation of the two E faces > together? Is there a way to "bind" them together while "jumping" back > to the n faces after both have been presented or do I need to create a > manual psuedo-random list? > > Any comments are appreciated, and thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it.   Please do not use, copy or disclose the information contained in this message or in any attachment.  Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Thu Jan 6 17:22:25 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Thu, 6 Jan 2011 09:22:25 -0800 Subject: Track trigger timing In-Reply-To: <201101052132.p05LWiBl000573@mail13.tpg.com.au> Message-ID: Peter is most likely correct about not really needing the empty columns in the list. I just went by some examples off of E-Prime's website and didn't test the code without those empty columns. Also, I should add that the timestamp in the code I posted earlier will be for the moment E-prime reads/executes a specific line of code but the timestamp itself will NOT reflect when the trigger was sent. The trigger is always sent at the osnet of an object on which the signaling is enabled so the TimeOnset of that object is the timestamp of when the trigger was executed. It took me sometime to figure that out =] Evelina On Jan 5, 3:32 pm, Peter Quain wrote: > you don't need any blank columns in a List (PulseOnset/Offset), no > values are writen there at runtime. SetAttrib sets the value of an > attribute, and stores that value in the LogFile in a column for that > attribute, not in any List. > > At 05:37 AM 6/01/2011, you wrote: > > > > >Michiel and David, > > >Thank you very much for your suggestions. My program worked as it > >should without the TMS trigger. I have finally figured out the > >solution to this problem and will post it here in case someone else > >has a similar issue. > > >Originally, the InLine script that sent the trigger to the TMS was > >placed at the very beginning of the experiment. That is where I also > >coded my variables (right after trigger code I had [PulseOn = > >Clock.Read]). So, it turns out, probably not surprisingly, that this > >InLine is read only once during the experiment (although if anyone > >could explain how the trial procedure knows when to execute the > >triggers which are specified and read only once at the beginning of > >the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ > >Offsets will have the same value on a trial-by-trial basis.  In order > >to update PulseOn/Off variable I had to move the InLine with triggers > >to the beginning of the trial procedure (which I didn't do originally > >due to some other issues with the trigger). I also created empty > >columns (called PulseOnset/Offset) in the trial List because that is > >where the variables will be stored. The code is printed below. > > >Happy programming! > > >Evelina > > >************************************************ > >'Here PulseSOAs is a List with trial parameters > >'For zero SOA trigger on Target > >If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then > >         Target.OnsetSignalEnabled = True > >         Target.OnsetSignalPort = &H378 > >         Target.OnsetSignalData = 128 > > >                 'Timestamp pulse onset > >                 'PulseOnset is a blank column in PulseSOAs List > >                 c.SetAttrib "PulseOnset", Clock.Read > > >         'Resets port > >         Target.OffsetSignalEnabled = True > >         Target.OffsetSignalPort = &H378 > >         Target.OffsetSignalData = 0 > > >                 'Timestamp pulse offset > >                                 'PulseOffset is a blank column in > >PulseSOAs List > >                 c.SetAttrib "PulseOffset", Clock.Read > > >'For positive SOAs trigger on Blank > >ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then > >         Blank3.OnsetSignalEnabled = True > >         Blank3.OnsetSignalPort = &H378 > >         Blank3.OnsetSignalData = 128 > > >                 'Timestamp pulse onset > >                 c.SetAttrib "PulseOnset", Clock.Read > > >         'Resets port > >         Blank3.OffsetSignalEnabled = True > >         Blank3.OffsetSignalPort = &H378 > >         Blank3.OffsetSignalData = 0 > > >                 'Timestamp pulse offset > >                 c.SetAttrib "PulseOffset", Clock.Read > > >End If > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jan 6 18:31:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 6 Jan 2011 13:31:36 -0500 Subject: Track trigger timing In-Reply-To: <59af1074-1e43-4c25-abf4-7db6629bc56f@l8g2000yqh.googlegrou ps.com> Message-ID: Evelina Tapia wrote: >Peter is most likely correct about not really needing the empty >columns in the list. I just went by some examples off of E-Prime's >website and didn't test the code without those empty columns. This might be a moment to remind folks that generally the examples provided by PST are rather sloppy and cannot be taken as models of proper programming practice. Take the PST examples merely as hints and exercises and then use your own judgment. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jennaology at yahoo.com Fri Jan 7 09:51:48 2011 From: jennaology at yahoo.com (RB209) Date: Fri, 7 Jan 2011 01:51:48 -0800 Subject: Response triggers with accurate timing In-Reply-To: <4d07d8bf.9915e70a.3d58.0c63SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I wanted to update this thread in case anyone else finds themselves with a similar problem. Before I decided to send triggers the basic design was as follows: 300ms fixation followed by slide1 object to display an image for 2500ms, followed by a blank screen for 1000ms. Participants can respond as soon as slide 1 appears but I also wanted responses to be collected for 1000ms afterwards. So although the duration for slide1 was initially set to 2500ms the time limit was 3500ms and end action was none. My need to send accurate response triggers was complicated by 2 factors. 1.) The response should not terminate the slide1 object 2.) Response triggers should be collected during the running of 2 different objects but I didn't want to leave open the possibility that participants could respond twice within a single trial. Eprime support have been extremely helpful and have come up with a solution that I would be happy to send to anyone. I will briefly cover the details: Trial procedure is as follows: 1. Inline1 loads the blank screen (imagedisplay1) so that this is ready to go when needed. Imagedisplay1 is an unreferenced object. 2.) Slide1: duration = 0, timelimit = 3700, end action = none. This displays the image and sets an input mask for 3700ms 3.) Inline2: Firstly, certain variables are declared. Then, a loop runs while the input mask ispending and breaks when a response is made or the time limit (3500) is reached. During this time, Eprime checks to see if 2500ms has elapsed and if so, presents imagedisplay1 (which has already been loaded to minimise delays). When the loop breaks, a trigger is sent. A second loop is needed to control for participants responding before 2500ms has elapsed and breaking the loop too soon. (See below for the actual code). 4.) Imagedisplay1 is held as an unreferenced object and has a duration set to 1200ms 5.) A final inline object sends a 0 to the parallel port. I have tried this and it all seems to work perfectly. INLINE2 CODE: Dim nStartTime As Long nStartTime = Slide1.OnsetTime Dim nImageTime As Long nImageTime = nStartTime + 2500 Dim boolImageShown As Boolean Dim nDrawTime As Long Dim nTriggerTime As Long 'This checks to see if it is time to put up the image. Do While Slide1.InputMasks.IsPending() If Clock.Read >= nImageTime And boolImageShown = False Then 'cnvs.Copy offScreenCnvs, src, dest Display.WaitForVerticalBlank ImageDisplay1.Draw nDrawTime = Clock.Read - nStartTime boolImageShown = True End If Loop If slide1.resp = "" then writeport &H378, 5 nTriggerTime = Clock.Read else writeport &H378, slide1.resp nTriggerTime = Clock.Read end if 'This checks to see if it is time to put up the image if the subject replied before the image 'was displayed. Do While Clock.Read < nStartTime + 3700 If Clock.Read >= nImageTime And boolImageShown = False Then 'cnvs.Copy offScreenCnvs, src, dest Display.WaitForVerticalBlank ImageDisplay1.Draw nDrawTime = Clock.Read - nStartTime boolImageShown = True End If Loop If slide1.resp = c.getattrib ("cr1") or slide1.resp = c.getattrib ("cr2") or slide1.resp = c.getattrib ("cr3") then slide1.acc = 1 end if 'Save the trigger time and the time that ImageDisplay1 was drawn as an attribute relative to the 'onset of Slide1 c.SetAttrib "TriggerSendTime", nTriggerTime c.SetAttrib "ImageDrawTime", nDrawTime 'Debug.Print "Slide: " & Slide1.OnsetTime & ebTab & "Trigger: " & nTriggerTime & ebTab & "RTTime: " & Slide1.RTTime & ebTab & "Image: " & nImageShowTime -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Mon Jan 10 02:00:06 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Sun, 9 Jan 2011 18:00:06 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) Message-ID: Hello, I have learned so much about E-Prime through this group and through butting my head against E-Prime's metaphorical wall (i.e. scripting). It is now time for me to post a question. *My experiment:* This memory experiment asks participants to study a list of pictures. At test, they are presented with both the pictures they just studied and new pictures. Their job is to discriminate between studied and non-studied pictures (e.g. "Was this old or new?"). In this experiment, there are 5 such study-test blocks. My manipulation is to use five different payoff matrices which correspond to the five study-test blocks. Each study-test block (and thus, each payoff matrix) will be presented in random order to each new participant. *My question:* I am trying to create a feedback counter to present to participants after each trial. I can do it, but my script requires many nested "If...Then" statements and "Select Case" statements. The reason for this is because of the following: 1) I have two experiment startup conditions. I have an "Old New" Condition and a "PDP" condition (not important what these actually mean). As a result, I also have two different SlideObjects (TestSlideOLDNEW and TestSlide) that correspond to each condition. The TestSlide objects collect trial responses. 2) I have 5 different "Payoff Matrix" conditions (I call them A, B, C, D, and E). 3) I need to assign different 'points' to each correct and incorrect response. 4) For each correct and incorrect response, I need to assign different point values based on the type of picture presented (e.g. old/studied or new/non-studied). This corresponds to Hits, Misses, False Alarms, and Correct Rejections. I will try to explain what I have in the following script: ********************************************************************************************************************** *********************************************************************************************************************** 'This If...Then statement refers to (1) above If c.getattrib ("TestType") = "OldNew" then Select Case MasterList.getattrib ("Payoff") ' This refers to the five different Payoff Matrices Case "A" 'First payoff matrix If MasterList.getattrib ("StatusOldNew") = "Old" then If TestSlideOLDNEW.ACC = 1 then 'Hit Rate AccuracyDisplay = AccuracyDisplay+1 'counter c.setattrib "Accuracy", AccuracyDisplay 'Sets Accuracy attribute so that I can display up-to-date point system per trial Elseif TestSlideOLDNEW.ACC = 0 then 'Miss Accuracy Display = AccuracyDisplay-1 c.setattrib "Accuracy", AccuracyDisplay Else MsgBox "Conservative A condition payoff matrix error Status Old" End if Elseif MasterList.getattrib("StatusOldNew") = "New" then If TestSlideOLDNEW.ACC = 1 then 'Correct Rejection AccuracyDisplay = AccuracyDisplay+5 c.setattrib "Accuracy", AccuracyDisplay Elseif TestSlideOLDNEW.ACC = 0 then ' False Alarm AccuracyDisplay = AccuracyDisplay-5 c.setattrib "Accuracy", AccuracyDisplay Else MsgBox "Conservative A condition payoff matrix error Status New" End if Else MsgBox "StatusOLDNEW payoff matrix error" Case "B" . . . Case "E" Elseif c.getattrib("TestType") = "PDP" then Select Case......... . . . *********************************************************************************************************************** *********************************************************************************************************************** You can see that much of my script seems redundant, but I cannot figure out how to condense the script any further. I am familiar with For...Next loops, SubRoutines, Arrays, If...Then, IIf, and Select...Case functions as I've read the E-Basic help on these functions and used them in the past. However, my personal experience with Subroutines and Arrays is limited, but I understand them enough to have been able to use them in the past effectively. The solutions I've thought of merely require rearranging everything in IIF, If...Then, or Select...case functions, but this seems like a rather unnecessary rearrangement. I've also thought of declaring an array so that I can just add values to the counter within a For...Next loop, but this also seems unnecessary because I could just as easily input the actual integer values. Therefore, my question is, how can I condense this script further? I will continue to try to innovate, but I would also like to hear any comments/suggestions that any of you might have. I plan to post my (hopefully, elegant) solution once I reach it. If anything seems unclear, please let me know. Thank you! Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbzgtfan4ever at gmail.com Mon Jan 10 02:44:38 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Sun, 9 Jan 2011 18:44:38 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <5557192.1261.1294624806779.JavaMail.geo-discussion-forums@prie35> Message-ID: Please note that there are two errors within my posted script. The first error is "Accuracy Display" should be "AccuracyDisplay" 9 lines down. The second error is that I left off an "End If" statement after "Else MsgBox "StatusOLDNEW payoff matrix error"" Thank you. Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Mon Jan 10 19:32:47 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 10 Jan 2011 14:32:47 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <5557192.1261.1294624806779.JavaMail.geo-discussion-forums@ prie35> Message-ID: Caleb, I commend you for taking an interest in improving your code, instead of simply settling for the first bit of code that gives the appearnce of working (and which almost always fails on close inspection). I hope my comments below don't seem too harsh, if so just consider that they come from a grouchy old man. First, some style issues -- Your code appeared in my e-mail reader with indentations of *12* spaces! That is *way* too much indentation, it makes the code quickly run off the edge of the screen and makes it unreadable. Please learn to use the well-documented industry standard indentation of 4 spaces. Also, *please* resist the urge to double-space your code, that only reduces how much of your code will fit into view on my screen and does nothing to aid understanding. I had to take your code into my own text editor and edit it down to make it readable, do not expect me to do that again. Now, a few comments on the code itself. First, I wonder if you really need two different Slide objects? If they perform essentially the same function only with different content, then I would just use one Slide and change the content using attribute references. That could simplify the code right there. Next, ignoring the MsgBox statements, it seems to me that all that changes in the various conditions is the number of points by which AccuracyDisplay changes. In that case, I would use a variable to hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" AccuracyDisplay), so that the calculation becomes merely AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay Yes, you might still need a mess of code to compute dAccuracyDisplay, but I like to separate the mess that computes dAccuracyDisplay from the operation that actually uses it, I find such separation aids my comprehension. Next, once I have graduated to using a variable (instead of literal values) in the computation, I would consider using a multi-dimensional array to hold a table of the possible point values, and use numeric codes that will act as indices into the table for each condition. E.g., I might use 0 instead of "OldNew" for that TestType, 0 instead of "Old" for that StatusOldNew, etc. This admitedly adds a bit of indirection, but indirection that will could greatly simplify our computation. I would of course still need some code to set up the table at the start of the session, but with that done my computaton during the run might reduce to a single line, e.g., AccuracyDisplay = AccuracyDisplay + PointTable( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) But I have probably missed something really obvious, so I hope someone else here will chime in and set me straight. One more style point, then a homework assignment. Of course, it is good practice to end every Select Case with a Case Else to catch unforeseen cases, e.g., Case Else MsgBox "Invalid option." I trust you left this out of your example simply because it was not germane to your question. And now your homework: Work through Chapter 4, "Using E-Basic", of the User's Guide that came with E-Prime, and study any edition of "VBA for Dummies" (still available at Amazon.com, get a used copy). Regards, -- David McFarlane, Professional Faultfinder "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman, Nobel prize-winning physicist) At 1/9/2011 09:00 PM Sunday, you wrote: > I have learned so much about E-Prime through this group and > through butting my head against E-Prime's metaphorical wall (i.e. > scripting). It is now time for me to post a question. > > My experiment: > > This memory experiment asks participants to study a list of > pictures. At test, they are presented with both the pictures they > just studied and new pictures. Their job is to discriminate > between studied and non-studied pictures (e.g. "Was this old or > new?"). In this experiment, there are 5 such study-test > blocks. My manipulation is to use five different payoff matrices > which correspond to the five study-test blocks. Each study-test > block (and thus, each payoff matrix) will be presented in random > order to each new participant. > > My question: > > I am trying to create a feedback counter to present to > participants after each trial. I can do it, but my script requires > many nested "If...Then" statements and "Select Case" > statements. The reason for this is because of the following: > > 1) I have two experiment startup conditions. I have an "Old New" > Condition and a "PDP" condition (not important what these actually > mean). As a result, I also have two different SlideObjects > (TestSlideOLDNEW and TestSlide) that correspond to each > condition. The TestSlide objects collect trial responses. > >2) I have 5 different "Payoff Matrix" conditions (I call them A, B, >C, D, and E). > >3) I need to assign different 'points' to each correct and incorrect response. > >4) For each correct and incorrect response, I need to assign >different point values based on the type of picture presented (e.g. >old/studied or new/non-studied). This corresponds to Hits, Misses, >False Alarms, and Correct Rejections. > > I will try to explain what I have in the following script: > > >********************************************************************************************************************** > >*********************************************************************************************************************** > >'This If...Then statement refers to (1) above > >If c.getattrib ("TestType") = "OldNew" then > >Select Case MasterList.getattrib ("Payoff") ' This refers to the >five different Payoff Matrices > > Case "A" 'First payoff matrix > > If MasterList.getattrib ("StatusOldNew") = "Old" then > > If TestSlideOLDNEW.ACC = 1 then 'Hit Rate > > AccuracyDisplay = > AccuracyDisplay+1 'counter > > c.setattrib > "Accuracy", AccuracyDisplay 'Sets Accuracy attribute so that I can > display up-to-date point system per trial > > Elseif TestSlideOLDNEW.ACC = 0 then 'Miss > > Accuracy Display = > AccuracyDisplay-1 > > c.setattrib > "Accuracy", AccuracyDisplay > > Else MsgBox "Conservative A > condition payoff matrix error Status Old" > > End if > > Elseif MasterList.getattrib("StatusOldNew") > = "New" then > > If TestSlideOLDNEW.ACC = 1 then > 'Correct Rejection > > AccuracyDisplay = > AccuracyDisplay+5 > > c.setattrib > "Accuracy", AccuracyDisplay > > Elseif TestSlideOLDNEW.ACC = 0 > then ' False Alarm > > AccuracyDisplay = > AccuracyDisplay-5 > > c.setattrib > "Accuracy", AccuracyDisplay > > Else MsgBox "Conservative A > condition payoff matrix error Status New" > > End if > > Else MsgBox "StatusOLDNEW payoff matrix error" > > Case "B" > >. > >. > >. > >Case "E" > > > >Elseif c.getattrib("TestType") = "PDP" then > > Select Case......... > >. > >. > >. > >*********************************************************************************************************************** > >*********************************************************************************************************************** > >You can see that much of my script seems redundant, but I cannot >figure out how to condense the script any further. I am familiar >with For...Next loops, SubRoutines, Arrays, If...Then, IIf, and >Select...Case functions as I've read the E-Basic help on these >functions and used them in the past. However, my personal >experience with Subroutines and Arrays is limited, but I understand >them enough to have been able to use them in the past >effectively. The solutions I've thought of merely require >rearranging everything in IIF, If...Then, or Select...case >functions, but this seems like a rather unnecessary >rearrangement. I've also thought of declaring an array so that I >can just add values to the counter within a For...Next loop, but >this also seems unnecessary because I could just as easily input the >actual integer values. > >Therefore, my question is, how can I condense this script >further? I will continue to try to innovate, but I would also like >to hear any comments/suggestions that any of you might have. I plan >to post my (hopefully, elegant) solution once I reach it. > >If anything seems unclear, please let me know. > >Thank you! > >Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 07:46:21 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Mon, 10 Jan 2011 23:46:21 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2b5f1a.4972e70a.512e.ffffb908SMTPIN_ADDED@gmr-mx.google.com> Message-ID: David, Thank you for your amazing advice. Please see below as I still have more questions. Also, if you keep reading past this, I will show you another solution I came to. I really really hope that this formatting thing has been fixed. I'm so sorry if it hasn't as this is a long reply and I spent a good 20 minutes trying to make the formatting to your specifications. Caleb On Monday, January 10, 2011 11:32:47 AM UTC-8, dkmcf wrote: Caleb, I commend you for taking an interest in improving your code, instead of simply settling for the first bit of code that gives the appearnce of working (and which almost always fails on close inspection). I hope my comments below don't seem too harsh, if so just consider that they come from a grouchy old man. Thank you. I appreciate constructive criticism. First, some style issues -- Your code appeared in my e-mail reader with indentations of *12* spaces! That is *way* too much indentation, it makes the code quickly run off the edge of the screen and makes it unreadable. Please learn to use the well-documented industry standard indentation of 4 spaces. Also, *please* resist the urge to double-space your code, that only reduces how much of your code will fit into view on my screen and does nothing to aid understanding. I had to take your code into my own text editor and edit it down to make it readable, do not expect me to do that again. This only happened because I had copied and pasted my post into Word in order to save a draft as I was typing so that in case I lost my post, I could retrieve it. This may have happened again. I'm sorry that Google Groups isn't so friendly with this. Now, a few comments on the code itself. First, I wonder if you really need two different Slide objects? If they perform essentially the same function only with different content, then I would just use one Slide and change the content using attribute references. That could simplify the code right there. I took your advice and basically created script that changed the slide based upon the Test Type condition. This necessarily reduced the amount of code by half (and for your Array example, it decreases the array by one dimension). Next, ignoring the MsgBox statements, it seems to me that all that changes in the various conditions is the number of points by which AccuracyDisplay changes. In that case, I would use a variable to hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" AccuracyDisplay), so that the calculation becomes merely AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay Yes, you might still need a mess of code to compute dAccuracyDisplay, but I like to separate the mess that computes dAccuracyDisplay from the operation that actually uses it, I find such separation aids my comprehension. I was not quite sure what you meant by this. From my understanding, I would declare a new variable "dAccuracyDisplay". dAccuracyDisplay would equal the change in point value between my Payoff conditions. For example, in Condition "A", let's say that for a Hit, the participant would receive 1 point and for a Correct rejection, the participant would receive 5 points. In Condition "B", Hit = 2 points; CR = 4 points. Thus, dAccuracyDisplay = 2-1; 5-4. The change in points would thus be 1 between A and B. This is my actual point system, by the way. Hit points increase by 1 each time and CR points decrease by 1 (from A to E). In this scenario, I'm not sure how to implement this variable because it seems unnecessary. Something like: ************************************************************************************************************ Dim dAccuracyDisplay as Integer ' Represents change in points between payoff conditions Select Case c.getattrib ("Payoff") Case "A" dAccuracyDisplay=AccuracyDisplay+1 If c.getattrib("StatusOldNew")="Old" then If TestSlideOLDNEW.ACC = 1 then AccuracyDisplay=dAccuracyDisplay . . . Case "B" . . dAccuracyDisplay=AccuracyDisplay+2 ******************************************************************************* Doesn't doing this defeat the purpose of using a variable in the first place? Next, once I have graduated to using a variable (instead of literal values) in the computation, I would consider using a multi-dimensional array to hold a table of the possible point values, and use numeric codes that will act as indices into the table for each condition. E.g., I might use 0 instead of "OldNew" for that TestType, 0 instead of "Old" for that StatusOldNew, etc. This admitedly adds a bit of indirection, but indirection that will could greatly simplify our computation. I would of course still need some code to set up the table at the start of the session, but with that done my computaton during the run might reduce to a single line, e.g., AccuracyDisplay = AccuracyDisplay + PointTable( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) But I have probably missed something really obvious, so I hope someone else here will chime in and set me straight. Okay. This is where I get really confused. I understand that a multidimensional array can hold different values within each dimension (I did look over the VBA for Dummies Chapter on Arrays and Collections - Google Books). If I understand you correctly, you are saying that I should create such an array with three dimensions. The first dimension is my Test Type, the second is StatusOldNew, and the third is TestSlide.ACC. I should code each dimension with all of the possible values as integers. So for example, for TestType dimension: 1 = "oldnew" and 0 = "PDP". This coding system can then be called upon later in the script (like you gave in your example). I get confused on how to set this up and implement it, but I think I understand it conceptually. For example (this is what I understand): ********************************************************************************** dim PointSystem(1,1,1) as variant 'do this for each of the other attributes (e.g. StatusOldNew) if c.getattrib("TestType") = "OldNew" then c.setattrib("TestType"), "0" Elseif c.getattrib("TestType") = "PDP" then c.setattrib("TestType"), "1" Else MsgBox "TestType attribute set error" End if 'I would set this to the actual and proper point values PointSystem(0,0 ,0 ) = 1 PointSystem(0 ,1,0 ) = 2 PointSystem( 0,0 ,1) = 3 . . . PointSystem(1,1,1,) = 5 'Then I would use your example and all I would need is this one line. AccuracyDisplay = AccuracyDisplay + PointSystem( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) ********************************************************************************* The solution I came to: I added two attributes to my MasterList List object: Points_HR and Points_CR. For each trial, I input the proper point values. Then, for my payoff matrix, I simply referenced these point values. Script: ************************************************************************** Select Case TestSlideOLDNEW.ACC Case "1" If c.getattrib("StatusOldNew") = "Old" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits Elseif c.getattrib("StatusOldNew") = "New" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct Rejection Else MsgBox "Accuracy display case 1 error" End if c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") Case "0" AccuracyDisplay=AccuracyDisplay c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Incorrect Accuracy: " & c.getattrib("Accuracy") Case Else MsgBox "TestSlideOLDNEW Accuracy Error" End Select *********************************************************************************** Please also note that I am actually not deducting points anymore for incorrect answers so I do not need a counter for Misses and False Alarms. Although this is one solution I reached, I still want to understand what you meant by your suggestions. Once again, thank you! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 07:47:48 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Mon, 10 Jan 2011 23:47:48 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <73ef9451-2ede-4ab7-81ad-77113a419b0c@k13g2000vbq.googlegroups.com> Message-ID: Let me try to repost my solution at end of page below. Select Case TestSlideOLDNEW.ACC Case "1" If c.getattrib("StatusOldNew") = "Old" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits Elseif c.getattrib("StatusOldNew") = "New" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct Rejection Else MsgBox "Accuracy display case 1 error" End if c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") Case "0" AccuracyDisplay=AccuracyDisplay c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Incorrect Accuracy: " & c.getattrib("Accuracy") Case Else MsgBox "TestSlideOLDNEW Accuracy Error" End Select Once again, sorry. Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.bernhardsson at gmail.com Tue Jan 11 16:39:10 2011 From: jens.bernhardsson at gmail.com (jens) Date: Tue, 11 Jan 2011 08:39:10 -0800 Subject: Repeat command blocks Message-ID: Hello Does anyone have an idea on how to repeat a block of commands a number of times? I have gone through the E-Basic but I can't get the Do...Loop or For...Next commands to work for me. Example: IF c.getAttrib("bet") = 1 THEN WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 *repeat 5 times ELSEIF c.getAttrib("bet") = 2 THEN WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 *repeat 5 times END IF -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jan 11 16:58:21 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 11 Jan 2011 16:58:21 +0000 Subject: Repeat command blocks In-Reply-To: <1b3c05c4-cc32-4994-b282-9a31c9b75ff5@p8g2000vbs.googlegroups.com> Message-ID: Ha, Sorry to other people whom I haven't replied to yet. I saw loads of code and my flu told my brain that I shouldn't bother. Perhaps the flu is rampant at the PST headquarters too? Anyway, this however, we have sorted out quickly. DIM I as INTEGER IF c.GetAttrib("bet") = 1 THEN FOR I = 1 to 5 WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 NEXT I 'thus repeats 5 times ELSE FOR I = 1 to 5 WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 NEXT I 'thus repeats 5 times END IF There's prettier ways to code this, such as Dim I as integer FOR I = 1 to 5 WritePort &H378,64 sleep cInt(c.GetAttrib ("bet")) * 5 WritePort &H378,0 sleep cInt(c.GetAttrib ("bet")) * 5 NEXT I 'thus repeats 5 times NEXT I But one might question the soundness of why you'd want this in the first place, but there you go. (as an aside to David: I'm going for tab indentation, you can see windows has set that to 6 spaces, but I'm addicted to emacs style tab indentation) Cheers, Mich Michiel Spapé Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of jens Sent: 11 January 2011 16:39 To: E-Prime Subject: Repeat command blocks Hello Does anyone have an idea on how to repeat a block of commands a number of times? I have gone through the E-Basic but I can't get the Do...Loop or For...Next commands to work for me. Example: IF c.getAttrib("bet") = 1 THEN WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 *repeat 5 times ELSEIF c.getAttrib("bet") = 2 THEN WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 *repeat 5 times END IF -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 11 17:02:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 12:02:33 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <73ef9451-2ede-4ab7-81ad-77113a419b0c@k13g2000vbq.googlegro ups.com> Message-ID: Caleb, First the punchline: What I had in mind was that you might do this with no If..Then or Select Case at all. Further comments in line below... At 1/11/2011 02:46 AM Tuesday, you wrote: >David, >Thank you for your amazing advice. Please see below as I still have >more questions. Also, if you keep reading past this, I will show you >another solution I came to. I really really hope that this formatting >thing has been fixed. I'm so sorry if it hasn't as this is a long >reply and I spent a good 20 minutes trying to make the formatting to >your specifications. > >Caleb > >On Monday, January 10, 2011 11:32:47 AM UTC-8, dkmcf wrote: >Caleb, >I commend you for taking an interest in improving your code, instead >of simply settling for the first bit of code that gives the appearnce >of working (and which almost always fails on close inspection). I >hope my comments below don't seem too harsh, if so just consider that >they come from a grouchy old man. > >Thank you. I appreciate constructive criticism. > >First, some style issues -- Your code appeared in my e-mail reader >with indentations of *12* spaces! That is *way* too much >indentation, it makes the code quickly run off the edge of the screen >and makes it unreadable. Please learn to use the well-documented >industry standard indentation of 4 spaces. Also, *please* resist the >urge to double-space your code, that only reduces how much of your >code will fit into view on my screen and does nothing to aid >understanding. I had to take your code into my own text editor and >edit it down to make it readable, do not expect me to do that again. > >This only happened because I had copied and pasted my post into Word >in order to save a draft as I was typing so that in case I lost my >post, I could retrieve it. This may have happened again. I'm sorry >that Google Groups isn't so friendly with this. This is why I edit my code in a professional text-editing program. I like EditPadPro (http://www.editpadpro.com/ ), which you can get for $50 or use the trial version for free, or you can find other programs out there. Many of these, including EditPadPro even do syntax highlighting for you, and with some tweaks it will properly highlight syntax for VBA and E-Basic. I regular pull my E-Basic code into EditPadPro for editing, documentation, and printout, then copy & paste it back into E-Studio as needed, it is so much better than editing in E-Studio. (BTW, I am not just making up the "indent four spaces" convention -- lore has it that long ago a university study found that this was the optimal indentation for program code, but I can't find the reference offhand. In any case, you can search the web and find lots of debates over these fine points.) >Now, a few comments on the code itself. First, I wonder if you >really need two different Slide objects? If they perform essentially >the same function only with different content, then I would just use >one Slide and change the content using attribute references. That >could simplify the code right there. > >I took your advice and basically created script that changed the slide >based upon the Test Type condition. This necessarily reduced the >amount of code by half (and for your Array example, it decreases the >array by one dimension). Cool. Glad that suggestion did some good. >Next, ignoring the MsgBox statements, it seems to me that all that >changes in the various conditions is the number of points by which >AccuracyDisplay changes. In that case, I would use a variable to >hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" >AccuracyDisplay), so that the calculation becomes merely > >AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay > >Yes, you might still need a mess of code to compute dAccuracyDisplay, >but I like to separate the mess that computes dAccuracyDisplay from >the operation that actually uses it, I find such separation aids my >comprehension. > >I was not quite sure what you meant by this. From my understanding, I >would declare a new variable "dAccuracyDisplay". dAccuracyDisplay >would equal the change in point value between my Payoff conditions. >For example, in Condition "A", let's say that for a Hit, the >participant would receive 1 point and for a Correct rejection, the >participant would receive 5 points. In Condition "B", Hit = 2 points; >CR = 4 points. Thus, dAccuracyDisplay = 2-1; 5-4. The change in >points would thus be 1 between A and B. This is my actual point >system, by the way. Hit points increase by 1 each time and CR points >decrease by 1 (from A to E). In this scenario, I'm not sure how to >implement this variable because it seems unnecessary. > >Something like: >************************************************************************************************************ >Dim dAccuracyDisplay as Integer ' Represents change in points between >payoff conditions > Select Case c.getattrib ("Payoff") > Case "A" > dAccuracyDisplay=AccuracyDisplay+1 > If c.getattrib("StatusOldNew")="Old" then > If TestSlideOLDNEW.ACC = 1 then > AccuracyDisplay=dAccuracyDisplay >. >. >. > Case "B" > . > . > dAccuracyDisplay=AccuracyDisplay+2 >******************************************************************************* >Doesn't doing this defeat the purpose of using a variable in the first >place? Depends on the purpose of using the variable. Here, for the purpose of clarity (paving the way to further code improvement), I merely meant to separate the "what" from the "how much", even if it meant adding an extra line or two of code. Here the "what" means "sum something into the AccuracyDisplay", and the "how much" means how much to sum into the AccuracyDisplay. Your code combines those two conceptually separate ideas, and sometime I find it helps to separate these. It is the difference between If in Michigan go to Meijer and buy milk Else if in Alabama go to Winn Dixie and buy milk Else if in Connecticut go to A&P and buy milk ... and If in Michigan go to Meijer Else if in Alabama go to Winn Dixie Else if in Connecticut go to A&P ... Wherever you end up, now buy milk So I guess it is still largely a matter of taste & style. And admittedly, at another time I might have advised exactly the opposite, but in this case, just making the mental leap of separating "what" from "how much" then prepares us for the next steps... >Next, once I have graduated to using a variable (instead of literal >values) in the computation, I would consider using a >multi-dimensional array to hold a table of the possible point values, >and use numeric codes that will act as indices into the table for >each condition. E.g., I might use 0 instead of "OldNew" for that >TestType, 0 instead of "Old" for that StatusOldNew, etc. This >admitedly adds a bit of indirection, but indirection that will could >greatly simplify our computation. I would of course still need some >code to set up the table at the start of the session, but with that >done my computaton during the run might reduce to a single line, e.g., > >AccuracyDisplay = AccuracyDisplay + PointTable( _ > CInt(c.getattrib ("TestType")), _ > CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) > >But I have probably missed something really obvious, so I hope >someone else here will chime in and set me straight. > >Okay. This is where I get really confused. I understand that a >multidimensional array can hold different values within each dimension >(I did look over the VBA for Dummies Chapter on Arrays and Collections >- Google Books). If I understand you correctly, you are saying that I >should create such an array with three dimensions. The first >dimension is my Test Type, the second is StatusOldNew, and the third >is TestSlide.ACC. That is pretty much correct, but just to express this accurately, each element of the array would hold the point value for that combination of TestType, StatusOldNew, and Accuracy. So, PointSystem( 0, 0, 0 ) would hold the number of points for the case of, say, TestType = OldNew, StatusOldNew = Old, and Accuracy = 0 (e.g., 0 points), and PointSystem( 0, 0, 1 ) would hold the number of points for the case of, say, TestType = OldNew, StatusOldNew = Old, and Accuracy = 1, etc. (e.g., 5 points), much as you show below. > I should code each dimension with all of the >possible values as integers. So for example, for TestType dimension: >1 = "oldnew" and 0 = "PDP". This coding system can then be called >upon later in the script (like you gave in your example). I get >confused on how to set this up and implement it, but I think I >understand it conceptually. > For example (this is what I understand): >********************************************************************************** >dim PointSystem(1,1,1) as variant > >'do this for each of the other attributes (e.g. StatusOldNew) >if c.getattrib("TestType") = "OldNew" then > c.setattrib("TestType"), "0" >Elseif c.getattrib("TestType") = "PDP" then > c.setattrib("TestType"), "1" >Else > MsgBox "TestType attribute set error" >End if [For the sake of others who might stumble across this, I will just correct the syntax of this code a little, should read >if c.getattrib("TestType") = "OldNew" then > c.setattrib "TestType", "0" >Elseif c.getattrib("TestType") = "PDP" then > c.setattrib "TestType", "1" >Else > MsgBox "TestType attribute set error" >End if ] >'I would set this to the actual and proper point values >PointSystem(0,0 ,0 ) = 1 >PointSystem(0 ,1,0 ) = 2 >PointSystem( 0,0 ,1) = 3 >. >. >. >PointSystem(1,1,1,) = 5 > >'Then I would use your example and all I would need is this one line. >AccuracyDisplay = AccuracyDisplay + PointSystem( _ > CInt(c.getattrib ("TestType")), _ > CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) >********************************************************************************* I think that is pretty close to what I had in mind, except that instead of using the If..Then..ElseIf to reassign the TestType index values, I would just go directly to whereever TestType gets defined in the first place (your Startup Info, or some List or c.SetAttrib, etc.) and put my index values there. >The solution I came to: > >I added two attributes to my MasterList List object: Points_HR and >Points_CR. For each trial, I input the proper point values. Then, >for my payoff matrix, I simply referenced these point values. > >Script: >************************************************************************** >Select Case TestSlideOLDNEW.ACC > Case "1" > If c.getattrib("StatusOldNew") = "Old" then > >AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits > Elseif c.getattrib("StatusOldNew") = "New" then > >AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct >Rejection > Else MsgBox "Accuracy display case 1 error" > End if > c.setattrib "Accuracy", AccuracyDisplay > Set x = >CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) > If Not x Is Nothing Then > x.Text = "Running Total: " & c.getattrib("Accuracy") > End if > Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") > Case "0" > AccuracyDisplay=AccuracyDisplay > c.setattrib "Accuracy", AccuracyDisplay > Set x = >CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) > If Not x Is Nothing Then > x.Text = "Running Total: " & c.getattrib("Accuracy") > End if > Debug.Print "Debug Incorrect Accuracy: " & > c.getattrib("Accuracy") > Case Else > MsgBox "TestSlideOLDNEW Accuracy Error" >End Select >*********************************************************************************** >Please also note that I am actually not deducting points anymore for >incorrect answers so I do not need a counter for Misses and False >Alarms. > >Although this is one solution I reached, I still want to understand >what you meant by your suggestions. Once again, thank you! I hope I made things a little clearer. Of course, I am assuming that your point system remains static, if it becomes dynamic then you could not use the array method. And sometimes you really do have to settle for a cascade of If..Then and Select Case statements, and then sometimes just applying some theorems from Boolean logic will help to simplify this. And for no particular reason, I will take this opportunity to close with my previously unpublished "Heirarchy of Goals for Excellent Programs": 1) Works correctly (i.e., free of errors). 2) Works soon enough to be of use -- an ugly program that works now is better than a beautiful program that works too late to be of use. 3) Efficiently uses time and resources. 4) Source code is readable, understandable, clear. 5) Source code is beautiful. Personally, I find my quest to achieve goal #5 often interferes with meeting the higher-priority goal #2, which is why I wrote this up as a reminder to myself. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 11 19:44:43 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 14:44:43 -0500 Subject: Indents, spaces, and tabs Message-ID: [Continued from "Repeat command blocks" (http://groups.google.com/group/e-prime/browse_thread/thread/828df2e990ee7270 )] At 1/11/2011 11:58 AM Tuesday, Michiel Spape wrote: >Sorry to other people whom I haven't replied to yet. I saw loads of >code and my flu told my brain that I shouldn't bother. Sorry to hear you were ill, I missed you (was hoping you would have better advice for a few folks here). Glad to have you back. >(as an aside to David: I'm going for tab indentation, you can see >windows has set that to 6 spaces, but I'm addicted to emacs style >tab indentation) I'll take tab indentation. That does have the virtue that in many environments everybody can adjust the tab size in their viewing program as desired (and it also results in slightly smaller file sizes). In fact, because E-Studio uses a tab size of 4, I just go ahead and use tabs there. But outside of E-Studio I like to use spaces in place of tabs, that way I never have to fuss with setting tab stops when I move from viewer to viewer (as long as the viewer honors strings of spaces, which many HTML-oriented viewers do not). It also means that I impose my will upon other readers. I could also accept a tab size of 6, but probably no larger. When I started with Pascal I tried using 2 spaces, and found that too small for my tastes, then tried other sizes until I read of a study that claimed to find the "optimum" (whatever that is) tab size is 4, and I have found that works for me. But 12 was really way too much. Cheers, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 20:45:43 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 12:45:43 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2c8d44.01e72a0a.5dc9.3a40SMTPIN_ADDED@gmr-mx.google.com> Message-ID: David, Thank you so much for your advice! My programming tends to lean toward your "Hierarchy of Goals". I agree that 1-3 of most value to any scientist, but achieving these goals should still never fully negate goals 4 and 5. This is because goals 4 and 5 could necessarily lead to future achievement of goals 1-3! It is for this reason that I posted on this group in the first place. I want to make a final comment on your "dAccuracyDisplay" reply. When you talk about separating the "how much" from the "why", you mean to say that this is good practice, correct? This is good practice because it allows you to think more lucidly within the moment. For example, if the code representing these concepts were muddled/mixed, then it might be more difficult to change/diagnose any problems that arise from said code. However, if these codes were separate, it makes it easier to pinpoint the problem. If this is correct, then I understand what you mean. Writing code is like writing a story, you have an object/character that has a goal. The code itself is how the character achieves that goal. Therefore, writing good code is like writing a clear, easy-to-understand story. Although it can be achieved, it just takes practice and diligence. Thank you, Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Tue Jan 11 21:15:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 16:15:36 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <30196654.985.1294778743283.JavaMail.geo-discussion-forums@ vbi8> Message-ID: Caleb, >David, > >Thank you so much for your advice! My programming tends to lean >toward your "Hierarchy of Goals". I agree that 1-3 of most value to >any scientist, but achieving these goals should still never fully >negate goals 4 and 5. This is because goals 4 and 5 could >necessarily lead to future achievement of goals 1-3! It is for this >reason that I posted on this group in the first place. > >I want to make a final comment on your "dAccuracyDisplay" >reply. When you talk about separating the "how much" from the >"why", you mean to say that this is good practice, correct? "Good practice" is a litlte stronger than I meant. I only meant that in many cases it helps to separate the concepts, and I felt this might be one of those cases. The rest of your comments still follow well. Programming is very much an "art", and requires a fair amount of judgment and sometimes even imagination, and as in a good story, different storytelling styles may each have different benefits and shortcomings. > This is good practice because it allows you to think more lucidly > within the moment. For example, if the code representing these > concepts were muddled/mixed, then it might be more difficult to > change/diagnose any problems that arise from said code. However, > if these codes were separate, it makes it easier to pinpoint the > problem. If this is correct, then I understand what you > mean. Writing code is like writing a story, you have an > object/character that has a goal. The code itself is how the > character achieves that goal. Therefore, writing good code is like > writing a clear, easy-to-understand story. Although it can be > achieved, it just takes practice and diligence. > >Thank you, > >Caleb -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From nitz.david at googlemail.com Tue Jan 11 23:16:34 2011 From: nitz.david at googlemail.com (Dave) Date: Tue, 11 Jan 2011 15:16:34 -0800 Subject: Indents, spaces, and tabs In-Reply-To: <4d2cb32f.9915e70a.2b74.ffffd7a8SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Re. that study, my bet is on Miara et al. (1983), abstract reproduced here: http://wiki.inkscape.org/wiki/index.php/ProgramIndention -David On Jan 11, 8:44 pm, David McFarlane wrote: > [Continued from "Repeat command blocks" > (http://groups.google.com/group/e-prime/browse_thread/thread/828df2e99... > )] > > At 1/11/2011 11:58 AM Tuesday, Michiel Spape wrote: > > >Sorry to other people whom I haven't replied to yet. I saw loads of > >code and my flu told my brain that I shouldn't bother. > > Sorry to hear you were ill, I missed you (was hoping you would have > better advice for a few folks here).  Glad to have you back. > > >(as an aside to David: I'm going for tab indentation, you can see > >windows has set that to 6 spaces, but I'm addicted to emacs style > >tab indentation) > > I'll take tab indentation.  That does have the virtue that in many > environments everybody can adjust the tab size in their viewing > program as desired (and it also results in slightly smaller file > sizes).  In fact, because E-Studio uses a tab size of 4, I just go > ahead and use tabs there.  But outside of E-Studio I like to use > spaces in place of tabs, that way I never have to fuss with setting > tab stops when I move from viewer to viewer (as long as the viewer > honors strings of spaces, which many HTML-oriented viewers do > not).  It also means that I impose my will upon other readers. > > I could also accept a tab size of 6, but probably no larger.  When I > started with Pascal I tried using 2 spaces, and found that too small > for my tastes, then tried other sizes until I read of a study that > claimed to find the "optimum" (whatever that is) tab size is 4, and I > have found that works for me.  But 12 was really way too much. > > Cheers, > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Wed Jan 12 02:02:27 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 18:02:27 -0800 Subject: Change the SlideObject Correct Response based on Attribute Message-ID: Hello all, I would just like to post a solution to this problem because I had difficulty finding it. Just to clarify, the problem is this. You have a slide object that collects input responses (e.g. TestSlide) with allowable response 'F' and 'J'. Based on your List object (this presumably houses your stimuli and the correct responses), you have an attribute for correct responses (let's say "CorrectResp"). However, now let's say you have two similar experiments with two different Correct Responses. In your List object, you might then have two attributes (CorrectResp1 and CorrectResp2). Each attribute corresponds to a different experiment (say, Expt1 and Expt2). In an inline (placed before the TestSlide runs), you need to change your 'Correct:' property of your TestSlide based upon which experiment is selected at startup. One solution I came up with is as follows: Select Case c.getattrib("Group") Case "Expt1" TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * c.GetAttrib("CorrectResp1"*),_ CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, CLogical("Yes"),_ "", "", "ResponseMode:All ProcessBackspace:Yes") Case "Expt2" TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * c.GetAttrib("CorrectResp2"*),_ CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, CLogical("Yes"),_ "", "", "ResponseMode:All ProcessBackspace:Yes") Case Else MsgBox "Set correct response Error!" End Select The only way I found out how to do to this was by inputing an attribute within the 'Correct: ' field on the TestSlide object. I then generated the script, and searched for the line where E-Prime 'sets up' the Slide Object. From my understanding, what this line actually does is create allowable responses (in this case a keyboard with keys 'f' and 'j'), correct attribute, sets the duration, and then sets up the rest of the properties. This list is pretty much all of the properties for any given slide object. The only way to change these properties directly is by using this inline, figuring out which property is which, and then making the adjustments accordingly. There is also another way. Instead of creating two attributes, you can have one "CorrectResp" attribute (this way, you will not need to use the above inline). Then you will need an inline that says the following: dim y as integer For y = 1 to List1.Size Select Case c.getattrib ("Group") Case "Expt1" If List1.getattrib("Stimulus") = "Property1" then List1.setattrib(y, "CorrectResp"), "F" Elseif List1.getattrib("Stimulus")="Property2" then List1.setattrib(y, "CorrectResp")="J" Else MsgBox "Set Correct Response Error Expt 1" Then just repeat this for Case "Expt2" You just need to place this before you run your testing procedure and set the TestSlide 'Correct: ' Property field to [CorrectResp]. I hope this helps. If anyone else has more elegant solutions than this (this is admittedly basic), please feel free to post. Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbzgtfan4ever at gmail.com Wed Jan 12 04:12:45 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 20:12:45 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2cc87b.9915e70a.2b74.ffffd834SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hello, This is what I ended up using. It is really quite beautiful (Thanks, David)! The script below sets up a counter based on three different attributes (i.e. TestType,TestCondition,and Accuracy). Dependent upon these attributes either 0 points, Points_HR or Points_CR are awarded. The latter two variables are set up in my MasterList List object. At the bottom of the TestSlideOLDNEW (the object that collects responses), there is a textbox that display the counter variable, thus keeping a "Running Total" of accumulated points. Also, there is a FeedbackDisplay that displays the number of points awarded based on a correct (either Points_HR or Points_CR) or incorrect (0 points) response. Thanks! Caleb ********************************************************************** Dim x As SlideText Dim PayoffMatrix(1,2,1) as integer 'First dimension = Test Type 'Second Dimension = Test Condition 'Third Dimension = TestSlideAccuracy If c.getattrib("TestType") = "OldNew" then c.setattrib "TestType", "0" Elseif c.getattrib("TestType") = "PDP" then c.setattrib "TestType","1" Else MsgBox "TestType Set attribute error" End if If c.getattrib("TestCondition") = "Inclusion" then c.setattrib "TestCondition", "0" Elseif c.getattrib("TestCondition") = "Exclusion" then c.setattrib "TestCondition", "1" Elseif c.getattrib("TestCondition") = "New" then c.setattrib "TestCondition", "2" Else MsgBox "TestCondition Set attribute error" End if For y = 0 to 1 For k = 0 to 2 PayoffMatrix(y,k,0) = 0 Next k,y 'Payoff Matrix (OldNew,Inclusion-Exclusion-New,Acc=1) Payoffmatrix(0,0,1) = c.getattrib("Points_HR") PayoffMatrix(0,1,1) = c.getattrib("Points_HR") PayoffMatrix(0,2,1) = c.getattrib("Points_CR") 'PayoffMatrix(PDP,Inclusion-Exclusion-New,Acc=1) PayoffMatrix(1,0,1) = c.getattrib("Points_HR") PayoffMatrix(1,1,1) = c.getattrib("Points_CR") PayoffMatrix(1,2,1) = c.getattrib("Points_CR") AccuracyDisplay = AccuracyDisplay + PayoffMatrix(CInt(c.getattrib ("TestType")),_ CInt(c.getattrib("TestCondition")), TestSlideOLDNEW.ACC ) c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if 'Debug.Print AccuracyDisplay If TestSlideOLDNEW.ACC = 1 then FeedbackDisplay1.ActiveState = "Correct" Set x = CSlideText(FeedbackDisplay1.States(FeedbackDisplay1.ActiveState).Objects("Text2")) If Not x Is Nothing Then x.Text = "You have received " & PayoffMatrix(CInt(c.getattrib ("TestType")),_ CInt(c.getattrib("TestCondition")), TestSlideOLDNEW.ACC ) & " Points!" End if Elseif TestSlideOLDNEW.ACC = 0 then FeedbackDisplay1.ActiveState = "Incorrect" Else Msgbox "FeedbackDisplay1 Error!" End if ********************************************************************* -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwenna at gmail.com Wed Jan 12 11:00:44 2011 From: liwenna at gmail.com (liwenna) Date: Wed, 12 Jan 2011 03:00:44 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <25511062.2247.1294797747380.JavaMail.geo-discussion-forums@vbay23> Message-ID: Hi Caleb, Thank's for your explanation! I'd like to add another way to implement pretty much the same thing in a different way for those that for some reason or another want to cut on their use of inlines. http://images.redial.net/crespbasedonversion.jpg See the image linked above. This list contains (among others) the attributes cresp, crespa, and crespb . The slideobject should be refered to the attribute cresp for the correctresponse (in the slide object properties fill in [cresp] for correct response). As one can see cresp is then referred further to [cresp[version]] . The attribute version can have either value A or B, so that [cresp[version]] actually means either [crespA] or [crespB] and thus for cresp the value of either attribute crespa or crespb will be implemented. The attribute "version" can be a startup variable(create this in the menu that is found under the e-prime logo at the top of your experiment tree). Another option, for a simple odd/ even randomisation, is to add an inline with the following two lines at the start of your experiment: if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" This inline will assign value A to the attribute "version" for all odd subject numbers and version B to all even subject numbers so that you don't have to manually assign a version at start up. In addition: when using this the way I did (randomizing the response buttons, i.e. button 1 for answer a and 2 for answer b in half the participants and vice versa in the other half) you'll also need to adjust the instructions based on the assigned version. This is easily done by creating two states in your instructionslide(s). One state should be named A and the other state B and contain the according instructions. In the instruction slide properties fill in [version] in the box activestate and the program will show either state A or state B according to the value of "version". Best, AW On Jan 12, 3:02 am, "Caleb J. Picker" wrote: > Hello all, > > I would just like to post a solution to this problem because I had > difficulty finding it. > > Just to clarify, the problem is this.  You have a slide object that collects > input responses (e.g. TestSlide) with allowable response 'F' and 'J'.  Based > on your List object (this presumably houses your stimuli and the correct > responses), you have an attribute for correct responses (let's say > "CorrectResp").  However, now let's say you have two similar experiments > with two different Correct Responses.  In your List object, you might then > have two attributes (CorrectResp1 and CorrectResp2).  Each attribute > corresponds to a different experiment (say, Expt1 and Expt2). > > In an inline (placed before the TestSlide runs), you need to change your > 'Correct:' property of your TestSlide based upon which experiment is > selected at startup.  One solution I came up with is as follows: > > Select Case c.getattrib("Group") >     Case "Expt1" >         TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > c.GetAttrib("CorrectResp1"*),_ >         CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, > CLogical("Yes"),_ >         "", "", "ResponseMode:All ProcessBackspace:Yes") >     Case "Expt2" >         TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > c.GetAttrib("CorrectResp2"*),_ >         CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, > CLogical("Yes"),_ >         "", "", "ResponseMode:All ProcessBackspace:Yes") >     Case Else >         MsgBox "Set correct response Error!" > End Select > > The only way I found out how to do to this was by inputing an attribute > within the 'Correct: ' field on the TestSlide object.  I then generated the > script, and searched for the line where E-Prime 'sets up' the Slide Object. >  From my understanding, what this line actually does is create allowable > responses (in this case a keyboard with keys 'f' and 'j'), correct > attribute, sets the duration, and then sets up the rest of the properties. >  This list is pretty much all of the properties for any given slide object. >  The only way to change these properties directly is by using this inline, > figuring out which property is which, and then making the adjustments > accordingly. > > There is also another way.  Instead of creating two attributes, you can have > one "CorrectResp" attribute (this way, you will not need to use the above > inline).  Then you will need an inline that says the following: > > dim y as integer > > For y = 1 to List1.Size > Select Case c.getattrib ("Group") >     Case "Expt1" >         If List1.getattrib("Stimulus") = "Property1" then >             List1.setattrib(y, "CorrectResp"), "F" >         Elseif List1.getattrib("Stimulus")="Property2" then >             List1.setattrib(y, "CorrectResp")="J" >         Else >             MsgBox "Set Correct Response Error Expt 1" > > Then just repeat this for Case "Expt2" > > You just need to place this before you run your testing procedure and set > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > I hope this helps.  If anyone else has more elegant solutions than this > (this is admittedly basic), please feel free to post. > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jens.bernhardsson at gmail.com Wed Jan 12 11:57:55 2011 From: jens.bernhardsson at gmail.com (jens) Date: Wed, 12 Jan 2011 03:57:55 -0800 Subject: Repeat command blocks In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20CC44E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Thank you very much, it works perfect. "...one might question the soundness of why you'd want this in the first place..." Yes one can. I'm using this to toggle an electrical stimulator on and off using different segment widths for different situations. Best, Jens -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Wed Jan 12 21:32:18 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Wed, 12 Jan 2011 13:32:18 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <8cc2cad6-6fde-498d-ac4a-3f086392e523@n10g2000yqd.googlegroups.com> Message-ID: Liwenna, That is actually quite clever! So I want to see if I understand this. See below. On Wednesday, January 12, 2011 3:00:44 AM UTC-8, liwenna wrote: > > Hi Caleb, > > Thank's for your explanation! > > I'd like to add another way to implement pretty much the same thing in > a different way for those that for some reason or another want to cut > on their use of inlines. > > http://images.redial.net/crespbasedonversion.jpg > > See the image linked above. > This list contains (among others) the attributes cresp, crespa, and > crespb . The slideobject should be refered to the attribute cresp for > the correctresponse (in the slide object properties fill in [cresp] > for correct response). As one can see cresp is then referred further > to [cresp[version]] . The attribute version can have either value A or > B, so that [cresp[version]] actually means either [crespA] or [crespB] > and thus for cresp the value of either attribute crespa or crespb will > be implemented. The attribute "version" can be a startup > variable(create this in the menu that is found under the e-prime logo > at the top of your experiment tree). So E-Prime does the following: 1) Select a Trial. 2) Collect a response. 3) Compare the response to [cresp] attribute. [cresp] is set to the "Correct: " property field of the SlideObject. 4) The [cresp] attribute references [cresp[version]]. 5) [version] is resolved based on the startup attribute "version" (c.getattrib("version"), with choices of either 'A' or 'B'. 6) Thus, based on the version, the SlideObject references either [crespa] or [crespb], within the same List1 Object. > Another option, for a simple odd/ > even randomisation, is to add an inline with the following two lines > at the start of your experiment: > > if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" > if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" > > This inline will assign value A to the attribute "version" for all odd > subject numbers and version B to all even subject numbers so that you > don't have to manually assign a version at start up. So E-Prime will take the remainder of the Ss# divided by 2. If the remainder is 1, then assign version A. If the remainder is 0, assign version B. Again, very clever! > > In addition: when using this the way I did (randomizing the response > buttons, i.e. button 1 for answer a and 2 for answer b in half the > participants and vice versa in the other half) you'll also need to > adjust the instructions based on the assigned version. This is easily > done by creating two states in your instructionslide(s). One state > should be named A and the other state B and contain the according > instructions. In the instruction slide properties fill in [version] in > the box activestate and the program will show either state A or state > B according to the value of "version". > In the past, I've always created two separate Instruction SlideObjects, but this solution seems less messy and easier to handle. Thanks! > > Best, > > AW > > On Jan 12, 3:02 am, "Caleb J. Picker" wrote: > > Hello all, > > > > I would just like to post a solution to this problem because I had > > difficulty finding it. > > > > Just to clarify, the problem is this. You have a slide object that > collects > > input responses (e.g. TestSlide) with allowable response 'F' and 'J'. > Based > > on your List object (this presumably houses your stimuli and the correct > > responses), you have an attribute for correct responses (let's say > > "CorrectResp"). However, now let's say you have two similar experiments > > with two different Correct Responses. In your List object, you might > then > > have two attributes (CorrectResp1 and CorrectResp2). Each attribute > > corresponds to a different experiment (say, Expt1 and Expt2). > > > > In an inline (placed before the TestSlide runs), you need to change your > > 'Correct:' property of your TestSlide based upon which experiment is > > selected at startup. One solution I came up with is as follows: > > > > Select Case c.getattrib("Group") > > Case "Expt1" > > TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > c.GetAttrib("CorrectResp1"*),_ > > CLng(TestSlide.Duration), CLng("1"), > ebEndResponseActionTerminate, > > CLogical("Yes"),_ > > "", "", "ResponseMode:All ProcessBackspace:Yes") > > Case "Expt2" > > TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > c.GetAttrib("CorrectResp2"*),_ > > CLng(TestSlide.Duration), CLng("1"), > ebEndResponseActionTerminate, > > CLogical("Yes"),_ > > "", "", "ResponseMode:All ProcessBackspace:Yes") > > Case Else > > MsgBox "Set correct response Error!" > > End Select > > > > The only way I found out how to do to this was by inputing an attribute > > within the 'Correct: ' field on the TestSlide object. I then generated > the > > script, and searched for the line where E-Prime 'sets up' the Slide > Object. > > From my understanding, what this line actually does is create allowable > > responses (in this case a keyboard with keys 'f' and 'j'), correct > > attribute, sets the duration, and then sets up the rest of the > properties. > > This list is pretty much all of the properties for any given slide > object. > > The only way to change these properties directly is by using this > inline, > > figuring out which property is which, and then making the adjustments > > accordingly. > > > > There is also another way. Instead of creating two attributes, you can > have > > one "CorrectResp" attribute (this way, you will not need to use the above > > > inline). Then you will need an inline that says the following: > > > > dim y as integer > > > > For y = 1 to List1.Size > > Select Case c.getattrib ("Group") > > Case "Expt1" > > If List1.getattrib("Stimulus") = "Property1" then > > List1.setattrib(y, "CorrectResp"), "F" > > Elseif List1.getattrib("Stimulus")="Property2" then > > List1.setattrib(y, "CorrectResp")="J" > > Else > > MsgBox "Set Correct Response Error Expt 1" > > > > Then just repeat this for Case "Expt2" > > > > You just need to place this before you run your testing procedure and set > > > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > > > I hope this helps. If anyone else has more elegant solutions than this > > (this is admittedly basic), please feel free to post. > > > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwenna at gmail.com Thu Jan 13 11:34:28 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 13 Jan 2011 03:34:28 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <26018017.254.1294867938685.JavaMail.geo-discussion-forums@yqep2> Message-ID: At times e-prime turns out to be more clever than one figured before ^.^ Indeed it works just like you describe and actually it works just like you described already in your first post. Just another way of implementing the same trick. The mod - thing can be useful in all kind of situations (i.e. offer a break after every 40 trials by using a if triallist.sample mod 40 = 0 then... line). The slide-state dependent on an attribute 'trick' is another thing that I use alot since I figured it out the first time. best, liw On Jan 12, 10:32 pm, "Caleb J. Picker" wrote: > Liwenna, > > That is actually quite clever!  So I want to see if I understand this.  See > below. > > > > On Wednesday, January 12, 2011 3:00:44 AM UTC-8, liwenna wrote: > > > Hi Caleb, > > > Thank's for your explanation! > > > I'd like to add another way to implement pretty much the same thing in > > a different way for those that for some reason or another want to cut > > on their use of inlines. > > >http://images.redial.net/crespbasedonversion.jpg > > > See the image linked above. > > This list contains (among others) the attributes cresp, crespa, and > > crespb . The slideobject should be refered to the attribute cresp for > > the correctresponse (in the slide object properties fill in [cresp] > > for correct response). As one can see cresp is then referred further > > to [cresp[version]] . The attribute version can have either value A or > > B, so that [cresp[version]] actually means either [crespA] or [crespB] > > and thus for cresp the value of either attribute crespa or crespb will > > be implemented. The attribute "version" can be a startup > > variable(create this in the menu that is found under the e-prime logo > > at the top of your experiment tree). > > So E-Prime does the following: > 1) Select a Trial. > 2) Collect a response. > 3) Compare the response to [cresp] attribute.  [cresp] is set to the > "Correct: " property field of the SlideObject. > 4) The [cresp] attribute references [cresp[version]]. > 5) [version] is resolved based on the startup attribute "version" > (c.getattrib("version"), with choices of either 'A' or 'B'. > 6) Thus, based on the version, the SlideObject references either [crespa] or > [crespb], within the same List1 Object. > > > Another option, for a simple odd/ > > even randomisation, is to add an inline with the following two lines > > at the start of your experiment: > > > if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" > > if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" > > > This inline will assign value A to the attribute "version" for all odd > > subject numbers and version B to all even subject numbers so that you > > don't have to manually assign a version at start up. > > So E-Prime will take the remainder of the Ss# divided by 2.  If the > remainder is 1, then assign version A.  If the remainder is 0, assign > version B. > Again, very clever! > > > > > In addition: when using this the way I did (randomizing the response > > buttons, i.e. button 1 for answer a and 2 for answer b in half the > > participants and vice versa in the other half) you'll also need to > > adjust the instructions based on the assigned version. This is easily > > done by creating two states in your instructionslide(s). One state > > should be named A and the other state B and contain the according > > instructions. In the instruction slide properties fill in [version] in > > the box activestate and the program will show either state A or state > > B according to the value of "version". > > In the past, I've always created two separate Instruction SlideObjects, but > this solution seems less messy and easier to handle.  Thanks! > > > > > Best, > > > AW > > > On Jan 12, 3:02 am, "Caleb J. Picker" wrote: > > > Hello all, > > > > I would just like to post a solution to this problem because I had > > > difficulty finding it. > > > > Just to clarify, the problem is this.  You have a slide object that > > collects > > > input responses (e.g. TestSlide) with allowable response 'F' and 'J'. > >  Based > > > on your List object (this presumably houses your stimuli and the correct > > > responses), you have an attribute for correct responses (let's say > > > "CorrectResp").  However, now let's say you have two similar experiments > > > with two different Correct Responses.  In your List object, you might > > then > > > have two attributes (CorrectResp1 and CorrectResp2).  Each attribute > > > corresponds to a different experiment (say, Expt1 and Expt2). > > > > In an inline (placed before the TestSlide runs), you need to change your > > > 'Correct:' property of your TestSlide based upon which experiment is > > > selected at startup.  One solution I came up with is as follows: > > > > Select Case c.getattrib("Group") > > >     Case "Expt1" > > >         TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > > c.GetAttrib("CorrectResp1"*),_ > > >         CLng(TestSlide.Duration), CLng("1"), > > ebEndResponseActionTerminate, > > > CLogical("Yes"),_ > > >         "", "", "ResponseMode:All ProcessBackspace:Yes") > > >     Case "Expt2" > > >         TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > > c.GetAttrib("CorrectResp2"*),_ > > >         CLng(TestSlide.Duration), CLng("1"), > > ebEndResponseActionTerminate, > > > CLogical("Yes"),_ > > >         "", "", "ResponseMode:All ProcessBackspace:Yes") > > >     Case Else > > >         MsgBox "Set correct response Error!" > > > End Select > > > > The only way I found out how to do to this was by inputing an attribute > > > within the 'Correct: ' field on the TestSlide object.  I then generated > > the > > > script, and searched for the line where E-Prime 'sets up' the Slide > > Object. > > >  From my understanding, what this line actually does is create allowable > > > responses (in this case a keyboard with keys 'f' and 'j'), correct > > > attribute, sets the duration, and then sets up the rest of the > > properties. > > >  This list is pretty much all of the properties for any given slide > > object. > > >  The only way to change these properties directly is by using this > > inline, > > > figuring out which property is which, and then making the adjustments > > > accordingly. > > > > There is also another way.  Instead of creating two attributes, you can > > have > > > one "CorrectResp" attribute (this way, you will not need to use the above > > > > inline).  Then you will need an inline that says the following: > > > > dim y as integer > > > > For y = 1 to List1.Size > > > Select Case c.getattrib ("Group") > > >     Case "Expt1" > > >         If List1.getattrib("Stimulus") = "Property1" then > > >             List1.setattrib(y, "CorrectResp"), "F" > > >         Elseif List1.getattrib("Stimulus")="Property2" then > > >             List1.setattrib(y, "CorrectResp")="J" > > >         Else > > >             MsgBox "Set Correct Response Error Expt 1" > > > > Then just repeat this for Case "Expt2" > > > > You just need to place this before you run your testing procedure and set > > > > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > > > I hope this helps.  If anyone else has more elegant solutions than this > > > (this is admittedly basic), please feel free to post. > > > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Tue Jan 18 16:48:48 2011 From: issabern at gmail.com (issabern) Date: Tue, 18 Jan 2011 08:48:48 -0800 Subject: How to run 25 simultaneous experiments Message-ID: I am interested in creating a self-paced reading time study using E- prime. I would like to run the experiment on an entire class of 23 subjects in a computer lab. Each subject would have their own computer, is this a feasible option with a single user license for E- Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Tue Jan 18 21:26:34 2011 From: liwenna at gmail.com (liwenna) Date: Tue, 18 Jan 2011 13:26:34 -0800 Subject: How to run 25 simultaneous experiments In-Reply-To: <19a24fee-4800-439b-9e1f-7927f5ecece5@m7g2000vbn.googlegroups.com> Message-ID: Now... this would typically be something that you'd have to ask the people of PST and not the userbase. Nonetheless... on the PST website the answer to your question is found: **** License Description Single User License -grants permission to use E-Prime to develop experiments and analyze data on a single computer at a time. Up to twenty-five (25) machines within the licensee's lab may be used to collect data simultaneously. Quantity discounts when ordering 5 or more ***** linkety: http://www.pstnet.com/eprime.cfm So, sounds as if it should be possible :) Good luck! On Jan 18, 5:48 pm, issabern wrote: > I am interested in creating a self-paced reading time study using E- > prime. I would like to run the experiment on an entire class of 23 > subjects in a computer lab. Each subject would have their own > computer, is this a feasible option with a single user license for E- > Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Wed Jan 19 01:32:45 2011 From: issabern at gmail.com (issabern) Date: Tue, 18 Jan 2011 17:32:45 -0800 Subject: How to run 25 simultaneous experiments In-Reply-To: Message-ID: Thanks for the reply! On Jan 18, 3:26 pm, liwenna wrote: > Now... this would typically be something that you'd have to ask the > people of PST and not the userbase. > Nonetheless... on the PST website the answer to your question is > found: > > **** > License Description > > Single User License -grants permission to use E-Prime to develop > experiments and analyze data on a single computer at a time. Up to > twenty-five (25) machines within the licensee's lab may be used to > collect data simultaneously. Quantity discounts when ordering 5 or > more > ***** > linkety:http://www.pstnet.com/eprime.cfm > > So, sounds as if it should be possible :) > > Good luck! > > On Jan 18, 5:48 pm, issabern wrote: > > > > > > > > > I am interested in creating a self-paced reading time study using E- > > prime. I would like to run the experiment on an entire class of 23 > > subjects in a computer lab. Each subject would have their own > > computer, is this a feasible option with a single user license for E- > > Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From matthewdwood82 at gmail.com Thu Jan 20 15:14:41 2011 From: matthewdwood82 at gmail.com (Matthew) Date: Thu, 20 Jan 2011 07:14:41 -0800 Subject: Calling the value of a higher-level list object? Message-ID: Hi guys, I've trolled the forums here & at PST for an answer to this problem, w/ o much help. I have an experiment where participants work on a series of remote associate problems (RAT for short), complete some lexical decision trials (LDT), and then work on more remote associates (both unsolved problems from 1st session and new, unseen problems). They are trained on how to do both of these things at the start of the experiment. Now my problem. The lexical decision task includes some hints to the remote associate problems that were not solved in the first RAT session. These can be either solutions for the RAT, OR words that are associates of 2+ problem words (but are not solutions). Right now, I have this set up as a between-subjects comparison, and am trying to use a high-level list that assigns participants to one of two Procs that correspond to these conditions. I would like to keep objects in both of these Procs the same, and use an InLine to look at what high- level proc I'm in, and then select the appropriate hint word for an unsolved item. A snippit of my (broken) code follows. Any suggestions? Thanks, -Matt ---------- ' A page out of E-Basic HELP - FactorSpace.GetProc (method) Dim HintCondition as String Dim theCellSpec as CellSpec Set theCellSpec = HintCond.Order.GetNext() HintCondition = CStr(HintCond.GetProc(theCellSpec)) ... If HintCondition = "AnswerProc" then For i = 1 to IncorrectPresentNum ...{add solution hints to LexicalDecision List for 1/2 of unsolved RATs}... Next i ElseIf HintCondition = "MisleadProc" then For i = 1 to IncorrectPresentNum ...{add misleading hints to LexicalDecision List for 1/2 of unsolved RATs}... Next i EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Sat Jan 22 18:05:14 2011 From: liwenna at gmail.com (liwenna) Date: Sat, 22 Jan 2011 10:05:14 -0800 Subject: Calling the value of a higher-level list object? In-Reply-To: <11406d91-d39b-4e07-a3f1-dc08ac7cf8ba@g26g2000vbi.googlegroups.com> Message-ID: Ok.... let's see if I get your problem... You kinda want subjects to be assigned to one of two conditions, answer or mislead. You write that you want to assign them to different procs, keep the objects the same but the hint words (that are stored in a list) should vary between the two conditions? So basically not two procs, but one proc, yet with different words used. Because I am not sure what you look for exactly I'll not give you a clear solution but simply blurt out some thoughts on e-prime mechanics "tricks". In general I think you should approach this problem the other way around: instead of having a lower order list 'peek back' to a higher order list it's probably more sensible to have a higher list decide the lower order course for each run of the program. 1: you could have a list with two levels that have the same procedure nested into it but then nest a different list with words (i.e. answerwordlist & misleadwordlist) into each level so that when the procedure is ran from level 1 the words in the one list are called for while when running the same procedure from the second level the words in the other list will be used. This way you can alternate conditions.. .but it's less suitable for between subjects designs as then you'll have to force the program to only use one of the levels for each subject. 2: you could assign a condition to each subject at the start of the experiment and then have the program run in a certain order based on that attribute (also see the thread: Change the SlideObject Correct Response based on Attribute ). Start the experiment with an inline with the following code that will assign version A (or call it answer if you like) to all odd subjectnumbers and B (mislead) to all even subjectnumbers. if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" Obviously other criteria for assigning one version or another could be used. Built the procedure for one run of the experiment and then rebuilt it again in the same experimentprocedure. So: start with a list that contains the procedure and all the lower lists for a run of the 'answer variant' of the task and then after that create another list containing everything you need for the mislead variant. You can actually use the same trialprocedures and all, just change the words in the lists that are used as hints. Don't copy/paste the first build of the task but create new lists and type into that the name of the previously created procedure. This way the same procedure will be used. If you copy/paste stuff (lists/procedures) they'll become separate objects and any changes you might want to make would have to be made twice. Unless of course you after all do need different objects in the two versions. Now.. if a subject is assigned the answer condition it should only be taken trough the first part of the experiment... so inbetween the 'main lists' for both task variants add an inline that reads: "goto endlabel" and place a label after the second part of the experiment and call it endlabel. If the program is finished with the first list and encounters that inline, it will skip to the endlabel and therefore pass by the second part of the experiment. On other runs you need the first part to be skipped and only the second part to be run so place an inline before the first mainlist that reads: if c.getattrib ("version") = "B" then goto blabel. Place a label called blabel inbetween the two lists (but after the inline that read goto endlabel). Now for those subjects that get assigned version B the program will skip the first list (it goes to blabel) and run the second list. 3. Another way, not my favourite, is to just mess with the lists... you can create two lists of hintwords (one answerlist and one misleadlist) and then delete them both so that they end up in the unreferenced objects 'bin'. Assign a version to each subject as described above and based on that attribute have the program use on of the two unreferenced list using something like the following code: "" If c.getattrib ("version") = "A" then triallistist.setattrib(1, "nested")="answerlist" if c.getattrib ("version") = "B" then triallist.setattrib(1, "nested")="misleadlist" end if "" This code should be placed on the experimentproc before the triallist. I am not entirely sure about the above thing though... something in the back of my head tells me that the above codeformat might not work for the attributes nested and procedure of a list, but have no e-prime to try it with right now. Undoubtedly there are many more ways to do these kind of things, but these are the first that came to mind. Let me know if these are of any help or if you're problem actually is different from what I thought. best, liw On Jan 20, 4:14 pm, Matthew wrote: > Hi guys, > > I've trolled the forums here & at PST for an answer to this problem, w/ > o much help.  I have an experiment where participants work on a series > of remote associate problems (RAT for short), complete some lexical > decision trials (LDT), and then work on more remote associates (both > unsolved problems from 1st session and new, unseen problems).  They > are trained on how to do both of these things at the start of the > experiment. > > Now my problem.  The lexical decision task includes some hints to the > remote associate problems that were not solved in the first RAT > session.  These can be either solutions for the RAT, OR words that are > associates of 2+ problem words (but are not solutions).  Right now, I > have this set up as a between-subjects comparison, and am trying to > use a high-level list that assigns participants to one of two Procs > that correspond to these conditions.  I would like to keep objects in > both of these Procs the same, and use an InLine to look at what high- > level proc I'm in, and then select the appropriate hint word for an > unsolved item.  A snippit of my (broken) code follows.  Any > suggestions? > > Thanks, > -Matt > ---------- > > ' A page out of E-Basic HELP - FactorSpace.GetProc (method) > Dim HintCondition as String > Dim theCellSpec as CellSpec > Set theCellSpec = HintCond.Order.GetNext() > HintCondition = CStr(HintCond.GetProc(theCellSpec)) > ... > If HintCondition = "AnswerProc" then >      For i = 1 to IncorrectPresentNum >      ...{add solution hints to LexicalDecision List for 1/2 of > unsolved RATs}... >      Next i > ElseIf HintCondition = "MisleadProc" then >      For i = 1 to IncorrectPresentNum >      ...{add misleading hints to LexicalDecision List for 1/2 of > unsolved RATs}... >      Next i > EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Sun Jan 23 14:30:00 2011 From: doug.girard at gmail.com (DGirard) Date: Sun, 23 Jan 2011 06:30:00 -0800 Subject: SRBox Port Number configured at runtime? Message-ID: We are using an SRBox and it seems we have to configure the COM port number at design time. This doesn't work for us since when we plug the device into a computer, it will be assigned whatever COM port is available. We won't have administrative access on these machines, so we won't be able to reassign the COM port with Device Manager. Even if we could, it is possible that another device is currently using that COM port number. So basically, we need the ability to specify the COM port number of the SRBox to e-Prime at runtime. Is there a way to do this with an external config file or something? Thanks in advance for any suggestions, Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From matthewdwood82 at gmail.com Sun Jan 23 22:56:34 2011 From: matthewdwood82 at gmail.com (Matthew) Date: Sun, 23 Jan 2011 14:56:34 -0800 Subject: Calling the value of a higher-level list object? In-Reply-To: <364ed2c5-ef8f-423a-b3d6-5f8b5f582f7c@i19g2000yqo.googlegroups.com> Message-ID: Hi Liw, Thanks for your response. One important thing I forgot to mention is that all my problems are in a single list, along with their answers and misleading hints. Looks like so: Weight Nested Procedure Word1 Word2 Word3 Answer Mislead 1 RATProc rope truck line tow pickup 1 RATProc teeth arrest start false kick ... This was done so that the subset of hints that participants see can be served up on-the-fly (depending on their performance for the first round of problems). I am doing this currently with a couple inline objects and a couple arrays that store information for incorrect problems and unseen problems. Then one inline randomly picks 1/2 of unsolved and 1/2 of unseen problems to serve up hint words for in the LDT, and a second inline builds the list of RAT problems to be presented in the second session. I posed this question to PST web support, and it turns out the work- around is idiot simple. They suggested adding an attribute in the list that determines BS condition called ProcedureName, and give it the same name at each level as the procedure for that level. Then you can call c.GetAttrib "ProcedureName" instead of having to monkey with any of the (more complicated) FactorSpace commands. I haven't finished testing yet, but it seems to be getting the job done. Thanks again, -Matt On Jan 22, 1:05 pm, liwenna wrote: > Ok.... let's see if I get your problem... > > You kinda want subjects to be assigned to one of two conditions, > answer or mislead. You write that you want to assign them to different > procs, keep the objects the same but the hint words (that are stored > in a list) should vary between the two conditions? So basically not > two procs, but one proc, yet with different words used. > > Because I am not sure what you look for exactly I'll not give you a > clear solution but simply blurt out some thoughts on e-prime mechanics > "tricks". In general I think you should approach this problem the > other way around: instead of having a lower order list 'peek back' to > a higher order list it's probably more sensible to have a higher list > decide the lower order course for each run of the program. > > 1: you could have a list with two levels that have the same procedure > nested into it but then nest a different list with words (i.e. > answerwordlist & misleadwordlist) into each level so that when the > procedure is ran from level 1 the words in the one list are called for > while when running the same procedure from the second level the words > in the other list will be used. This way you can alternate > conditions.. .but it's less suitable for between subjects designs as > then you'll have to force the program to only use one of the levels > for each subject. > > 2: you could assign a condition to each subject at the start of the > experiment and then have the program run in a certain order based on > that attribute (also see the thread: Change the SlideObject Correct > Response based on Attribute ). Start the experiment with an inline > with the following code that will assign version A (or call it answer > if you like) to all odd subjectnumbers and B (mislead) to all even > subjectnumbers. >      if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", > "A" >      if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", > "B" > Obviously other criteria for assigning one version or another could be > used. > Built the procedure for one run of the experiment and then rebuilt it > again in the same experimentprocedure. So: start with a list that > contains the procedure and all the lower lists for a run of the > 'answer variant' of the task and then after that create another list > containing everything you need for the mislead variant. You can > actually use the same trialprocedures and all, just change the words > in the lists that are used as hints. Don't copy/paste the first build > of the task but create new lists and type into that the name of the > previously created procedure. This way the same procedure will be > used. If you copy/paste stuff (lists/procedures) they'll become > separate objects and any changes you might want to make would have to > be made twice. Unless of course you after all do need different > objects in the two versions. > > Now.. if a subject is assigned the answer condition it should only be > taken trough the first part of the experiment... so inbetween the > 'main lists' for both task variants add an inline that reads: "goto > endlabel" and place a label after the second part of the experiment > and call it endlabel. If the program is finished with the first list > and encounters that inline, it will skip to the endlabel and therefore > pass by the second part of the experiment. On other runs you need the > first part to be skipped and only the second part to be run so place > an inline before the first mainlist that reads: if c.getattrib > ("version") = "B" then goto blabel. Place a label called blabel > inbetween the two lists (but after the inline that read goto > endlabel). Now for those subjects that get assigned version B the > program will skip the first list (it goes to blabel) and run the > second list. > > 3. Another way, not my favourite, is to just mess with the lists... > you can create two lists of hintwords (one answerlist and one > misleadlist) and then delete them both so that they end up in the > unreferenced objects 'bin'. Assign a version to each subject as > described above and based on that attribute have the program use on of > the two unreferenced list using something like the following code: "" > If c.getattrib ("version") = "A" then triallistist.setattrib(1, > "nested")="answerlist" if c.getattrib ("version") = "B" then > triallist.setattrib(1, "nested")="misleadlist" end if "" This code > should be placed on the experimentproc before the triallist. I am not > entirely sure about the above thing though... something in the back of > my head tells me that the above codeformat might not work for the > attributes nested and procedure of a list, but have no e-prime to try > it with right now. > > Undoubtedly there are many more ways to do these kind of things, but > these are the first that came to mind. > > Let me know if these are of any help or if you're problem actually is > different from what I thought. > > best, > > liw > > On Jan 20, 4:14 pm, Matthew wrote: > > > > > > > > > Hi guys, > > > I've trolled the forums here & at PST for an answer to this problem, w/ > > o much help.  I have an experiment where participants work on a series > > of remote associate problems (RAT for short), complete some lexical > > decision trials (LDT), and then work on more remote associates (both > > unsolved problems from 1st session and new, unseen problems).  They > > are trained on how to do both of these things at the start of the > > experiment. > > > Now my problem.  The lexical decision task includes some hints to the > > remote associate problems that were not solved in the first RAT > > session.  These can be either solutions for the RAT, OR words that are > > associates of 2+ problem words (but are not solutions).  Right now, I > > have this set up as a between-subjects comparison, and am trying to > > use a high-level list that assigns participants to one of two Procs > > that correspond to these conditions.  I would like to keep objects in > > both of these Procs the same, and use an InLine to look at what high- > > level proc I'm in, and then select the appropriate hint word for an > > unsolved item.  A snippit of my (broken) code follows.  Any > > suggestions? > > > Thanks, > > -Matt > > ---------- > > > ' A page out of E-Basic HELP - FactorSpace.GetProc (method) > > Dim HintCondition as String > > Dim theCellSpec as CellSpec > > Set theCellSpec = HintCond.Order.GetNext() > > HintCondition = CStr(HintCond.GetProc(theCellSpec)) > > ... > > If HintCondition = "AnswerProc" then > >      For i = 1 to IncorrectPresentNum > >      ...{add solution hints to LexicalDecision List for 1/2 of > > unsolved RATs}... > >      Next i > > ElseIf HintCondition = "MisleadProc" then > >      For i = 1 to IncorrectPresentNum > >      ...{add misleading hints to LexicalDecision List for 1/2 of > > unsolved RATs}... > >      Next i > > EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pooja.k.agarwal at gmail.com Mon Jan 24 14:42:49 2011 From: pooja.k.agarwal at gmail.com (Pooja K. Agarwal) Date: Mon, 24 Jan 2011 08:42:49 -0600 Subject: Nested lists, random order, and feedback Message-ID: Hi everyone, I'm trying to use e-Prime for my dissertation, and am having trouble creating an experiment with nested lists, both random and sequential ordering, and feedback (with the random order). I'm not a novice to e-Prime, however I am a novice in terms of writing and using scripts. In general, subjects will be reading passages and taking tests. I have eight passages, which need to be presented in sequential order. The first time passages are presented, subjects will simply be reading the passages one after another in order, so I have that part figured out. After reading all 8 passages, the critical conditions should be administered, in one of 8 different sequential orders (called CB in the attached program): never seen again (for 2 passage), reading again (2 passages), taking a version A test (2), or taking a version B test (2). Again, I have this sequential ordering figured out (but haven't typed it in for all CBs yet). For each test, I have 8 multiple-choice questions. Even though tests are presented in sequential order, I'd like the 8 questions presented in random order. For each question, I have 4 multiple-choice alternatives/choices. I'd like to present the question and all four alternatives on ONE slide, with the alternatives also presented in random order. How do I get all four alternatives, in random order, to show up on one slide? Also, immediately after a subject responds to a question, they need to make a rating, and then they need to receive feedback. If the alternatives are presented in random order, how do I specify what the correct answer is, in order for the feedback to be accurate? In the attached program, I have an order of the conditions (List:ConditionOrder), an order of the tests (List:ProcedureTest), a list for each set of 8 passage questions, and nested lists for each question containing its respective 4 multiple-choice alternatives. The order of conditions and tests are fine, but the order of questions and alternatives is not, and I also can't get 4 alternatives (in random order) nor the feedback to work. Because I don't know how to write script, if script is necessary, I would GREATLY appreciate an example script or even a written script. Thanks in advance, Pooja Agarwal P.S. Sorry for my desperation, but it'd be a life saver if I could find an answer by tomorrow (Tuesday, Jan. 25), so I've cross posted to the PST user forum. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Agarwal_Dissertation1.es2 Type: application/octet-stream Size: 351640 bytes Desc: not available URL: From mcfarla9 at msu.edu Mon Jan 24 22:12:54 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 24 Jan 2011 17:12:54 -0500 Subject: Nested lists, random order, and feedback In-Reply-To: Message-ID: Pooja, I don't have any quick solution for you, especially for such a complex design. I can only say that this looks for a job for nested Lists, and to get started on those you need to work through the Nested Lists tutorial in Appendix C of the Users Guide that came with E-Prime. Good luck, -- David McFarlane, Professional Faultfinder >I'm trying to use e-Prime for my dissertation, and am having trouble >creating an experiment with nested lists, both random and sequential >ordering, and feedback (with the random order). I'm not a novice to >e-Prime, however I am a novice in terms of writing and using scripts. > >In general, subjects will be reading passages and taking tests. I >have eight passages, which need to be presented in sequential order. >The first time passages are presented, subjects will simply be >reading the passages one after another in order, so I have that part >figured out. > >After reading all 8 passages, the critical conditions should be >administered, in one of 8 different sequential orders (called CB in >the attached program): never seen again (for 2 passage), reading >again (2 passages), taking a version A test (2), or taking a version >B test (2). Again, I have this sequential ordering figured out (but >haven't typed it in for all CBs yet). > >For each test, I have 8 multiple-choice questions. Even though tests >are presented in sequential order, I'd like the 8 questions >presented in random order. > >For each question, I have 4 multiple-choice alternatives/choices. >I'd like to present the question and all four alternatives on ONE >slide, with the alternatives also presented in random order. How do >I get all four alternatives, in random order, to show up on one slide? > >Also, immediately after a subject responds to a question, they need >to make a rating, and then they need to receive feedback. If the >alternatives are presented in random order, how do I specify what >the correct answer is, in order for the feedback to be accurate? > >In the attached program, I have an order of the conditions >(List:ConditionOrder), an order of the tests (List:ProcedureTest), a >list for each set of 8 passage questions, and nested lists for each >question containing its respective 4 multiple-choice alternatives. >The order of conditions and tests are fine, but the order of >questions and alternatives is not, and I also can't get 4 >alternatives (in random order) nor the feedback to work. > >Because I don't know how to write script, if script is necessary, I >would GREATLY appreciate an example script or even a written script. > > >Thanks in advance, >Pooja Agarwal > > >P.S. Sorry for my desperation, but it'd be a life saver if I could >find an answer by tomorrow (Tuesday, Jan. 25), so I've cross posted >to the PST user forum. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Tue Jan 25 03:37:37 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Mon, 24 Jan 2011 19:37:37 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? Message-ID: Im new to using E prime, and although I have the basics down, i have no idea how I would do this on E prime. In my experiment I need the participants to be able to increase or decrease the size of a symbols, and i need to be able to measure what size they make it. I think my unit of measurement will be in pixels but besides that I have no idea how I would be able to create this on E prime. Any help would be great, thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Tue Jan 25 05:07:53 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Mon, 24 Jan 2011 21:07:53 -0800 Subject: Mystery timing issue Message-ID: Hello, I have a simple visual priming task I want to run -- design is very simple (one block, one procedure repeated for 100 trials). No inline script or anything "fancy". When I run the script on one of the machines in my lab, the last few trials on the machine start slowing down -- there are stimulus timing/duration errors in the last few trials; when I run the same script again, the number of trials with timing issues increase and during a third run all trials have timing problems. I've tried this under "normal" conditions (Internet, background programs) and when the PC was unplugged from the Internet, screensaver was disabled, the PC was running under Diagnostic mode (so all background programs were turned off) without any significant changes in the outcome. Now, if I run the exact same script on another, very similar machine, there are no timing issues AT ALL and that's with Internet connected and background programs running their usual course. For various reasons I need to run my program on the "faulty" machine so I would appreciate any ideas of what might be causing these timing issues on one PC but not another. The "faulty" PC is running Windows XP Professional, version 202, Service Pack 3 AMD Athlon Core Processor 3800+ 2.00 Ghz, 2.00 GB of RAM Graphics card: NVIDIA GeForce8400GS, memory 512. MB, version 6.14.0011.8250, date March 2009 The "good" PC is running Windows XP Media center edition, version 2002, Service Pack 3 Pentium 4 CPU 3.06 GHz, 1.00 GB of RAM Graphics card: NVIDIA GeForce7300LE, version 8.2.6.8, date June 2006 Could it be that the better/newer graphics card on the "faulty" machine is not functioning properly and if so, how would I test it to verify? Could the monitor for whatever reason be a problem? Also, I've noticed that the duration errors appear when I repeating the SAME script -- if I run another script (which basically does the exact same thing but is created in another E-studio set), it seems to function fine. Any ideas will be greatly appreciated. Thank you! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Tue Jan 25 11:18:12 2011 From: liwenna at gmail.com (liwenna) Date: Tue, 25 Jan 2011 03:18:12 -0800 Subject: Mystery timing issue In-Reply-To: <506002e0-f85f-4377-a391-3a027277c229@p38g2000vbn.googlegroups.com> Message-ID: Hi Evelina, Does your task involve several pictures to be shown simultaneously or shortly after another? How shortly? Or any other 'more heavy' tasks? If the task design is actually a bit faster than the program is able to load, for instance pictures, than the accumulative delay could result in delays, although the pattern you describe (accumulating over several runs) is pretty particular. This might be solved of there is some space (timewise) in between the pictures that you can use to 'preload' the pictures which you'll have to tell the program with a little script. This script can be found elsewhere on this site or I can post it here but I rather first here if this might actually be the problem. If not, could you describe the task in a bit more detail? Best, liw On Jan 25, 6:07 am, Evelina Tapia wrote: > Hello, > > I have a simple visual priming task I want to run -- design is very > simple (one block, one procedure repeated for 100 trials). No inline > script or anything "fancy". When I run the script on one of the > machines in my lab, the last few trials on the machine start slowing > down -- there are stimulus timing/duration errors in the last few > trials; when I run the same script again, the number of trials with > timing issues increase and during a third run all trials have timing > problems. I've tried this under "normal" conditions (Internet, > background programs) and when the PC was unplugged from the Internet, > screensaver was disabled, the PC was running under Diagnostic mode (so > all background programs were turned off) without any significant > changes in the outcome. Now, if I run the exact same script on > another, very similar machine, there are no timing issues AT ALL and > that's with Internet connected and background programs running their > usual course. > > For various reasons I need to run my program on the "faulty" machine > so I would appreciate any ideas of what might be causing these timing > issues on one PC but not another. > > The "faulty" PC is running > Windows XP Professional, version 202, Service Pack 3 > AMD Athlon > Core Processor 3800+ > 2.00 Ghz, 2.00 GB of RAM > Graphics card: NVIDIA GeForce8400GS, memory 512. MB, version > 6.14.0011.8250, date March 2009 > > The "good" PC is running > Windows XP Media center edition, version 2002, Service Pack 3 > Pentium 4 CPU > 3.06 GHz, 1.00 GB of RAM > Graphics card: NVIDIA GeForce7300LE, version 8.2.6.8, date June 2006 > > Could it be that the better/newer graphics card on the "faulty" > machine is not functioning properly and if so, how would I test it to > verify? > > Could the monitor for whatever reason be a problem? > > Also, I've noticed that the duration errors appear when I repeating > the SAME script -- if I run another script (which basically does the > exact same thing but is created in another E-studio set), it seems to > function fine. > > Any ideas will be greatly appreciated. > Thank you! > > Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From njvack at wisc.edu Tue Jan 25 14:45:24 2011 From: njvack at wisc.edu (Nate Vack) Date: Tue, 25 Jan 2011 08:45:24 -0600 Subject: Mystery timing issue In-Reply-To: <506002e0-f85f-4377-a391-3a027277c229@p38g2000vbn.googlegroups.com> Message-ID: On Mon, Jan 24, 2011 at 11:07 PM, Evelina Tapia wrote: > For various reasons I need to run my program on the "faulty" machine > so I would appreciate any ideas of what might be causing these timing > issues on one PC but not another. Either PC should be beefy enough -- and your "good" one is far and away the slower of the two computers. So, your two potential problem sources could be: * Hardware -- it's possible something like a failing hard drive could cause this. * Software -- maybe something is janked up with your Windows install. Or a virus scanner is running amok. Or a virus. Or your drivers are screwy. If your computer came with a diagnostics disk, run diagnostics and fix any problems reported. If not, your easiest course of action is probably to reformat and reload Windows. Or, if you have a little bit of money and need it working really soon, buy the cheapest PC you can find and run the task on that. Newegg.com lists refurbished computers starting at $110 and a bunch of new stuff in the $200 range. Good luck, -Nate -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 16:26:25 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 11:26:25 -0500 Subject: SRBox Port Number configured at runtime? In-Reply-To: <5f038536-8563-41a4-8126-17ecf98581e0@1g2000yqz.googlegroup s.com> Message-ID: Doug, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... What version of E-Prime do you use? More importantly, what do you mean by "when we plug the device into a computer, it will be assigned whatever COM port is available"? Do you really mean that any single computer has dynamically assigned COM ports that can change whenever you plug a device into it? I have never heard of such a thing, so I would like to know more. Typically COM port addresses remain static in any one machine, so once you know what it is on that machine you can plug the SRBox into the COM port and it will not change, and you can edit the .es or .es2 file for that machine to refer to the appropriate COM port (just make sure that the COM port lies in the range 1-4). There are ways to do something like what you ask in both EP1 and EP2, but I don't yet understand why your situation requires this. BTW, if you do not have admin access to these PCs, then how do you get EP installed on them in the first place? -- David McFarlane, Professional Faultfinder At 1/23/2011 09:30 AM Sunday, you wrote: >We are using an SRBox and it seems we have to configure the COM port >number at design time. This doesn't work for us since when we plug the >device into a computer, it will be assigned whatever COM port is >available. We won't have administrative access on these machines, so >we won't be able to reassign the COM port with Device Manager. Even if >we could, it is possible that another device is currently using that >COM port number. So basically, we need the ability to specify the COM >port number of the SRBox to e-Prime at runtime. Is there a way to do >this with an external config file or something? > >Thanks in advance for any suggestions, >Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 16:42:38 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 11:42:38 -0500 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Without going into detail, you can use the Stretch property of any ImageDisplay or SlideImage object to make the image fit into any given Width and Height, and you can set the Width and Height properties (on the Frame tab) using attribute references. From there it is just a matter of collecting responses from the keyboard, mouse, joystick, or whatever, and using c.SetAttrib to manipulate the attributes for Width and Height. This will of course require a fair amount of inline code (with global variables, etc.). If you don't know what any of that means, then first please work through all the tutorials in the Getting Started Guide and User's Guide that came with E-Prime. -- David McFarlane, Professional Faultfinder "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman, Nobel prize-winning physicist) >Im new to using E prime, and although I have the basics down, i have >no idea how I would do this on E prime. In my experiment I need the >participants to be able to increase or decrease the size of a symbols, >and i need to be able to measure what size they make it. I think my >unit of measurement will be in pixels but besides that I have no idea >how I would be able to create this on E prime. Any help would be >great, thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Tue Jan 25 17:25:09 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Tue, 25 Jan 2011 09:25:09 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4d3efd87.45d12a0a.18c9.ffffbc37SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I understand how to influence the width and height on my end, but how can the participant influence the size when they do the experiment? And what do you mean by the inline code, do you mean the script, not fully sure how I would program that, I dont have that much experience in programming. On Jan 25, 11:42 am, David McFarlane wrote: > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it.  3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Without going into detail, you can use the Stretch property of any > ImageDisplay or SlideImage object to make the image fit into any > given Width and Height, and you can set the Width and Height > properties (on the Frame tab) using attribute references.  From there > it is just a matter of collecting responses from the keyboard, mouse, > joystick, or whatever, and using c.SetAttrib to manipulate the > attributes for Width and Height.  This will of course require a fair > amount of inline code (with global variables, etc.). > > If you don't know what any of that means, then first please work > through all the tutorials in the Getting Started Guide and User's > Guide that came with E-Prime. > > -- David McFarlane, Professional Faultfinder > "For a successful technology, reality must take precedence over > public relations, for nature cannot be fooled."  (Richard Feynman, > Nobel prize-winning physicist) > > > > >Im new to using E prime, and although I have the basics down, i have > >no idea how I would do this on E prime. In my experiment I need the > >participants to be able to increase or decrease the size of a symbols, > >and i need to be able to measure what size they make it. I think my > >unit of measurement will be in pixels but besides that I have no idea > >how I would be able to create this on E prime. Any help would be > >great, thanks.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From njvack at wisc.edu Tue Jan 25 17:53:45 2011 From: njvack at wisc.edu (Nate Vack) Date: Tue, 25 Jan 2011 11:53:45 -0600 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <8c4dfb6f-525a-48ac-af31-ba332b69adc6@f20g2000prn.googlegroups.com> Message-ID: On Tue, Jan 25, 2011 at 11:25 AM, Josh wrote: > I understand how to influence the width and height on my end, but how > can the participant influence the size when they do the experiment? > And what do you mean by the inline code, do you mean the script, not > fully sure how I would program that, I dont have that much experience > in programming. How do you envision people interacting with your script? There are lots of ways people might make something big or small and then say they're done. Do you want them to use a keyboard? Mouse? Joystick? How do you want them to use the device? Cheers, -Nate -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Tue Jan 25 18:57:19 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Tue, 25 Jan 2011 10:57:19 -0800 Subject: Mystery timing issue In-Reply-To: Message-ID: Liw, I use Pre-load and my images are very simple -- several kbs in size so I don't think this is the problem. Nate, thanks for the suggestions. I will try several things and share results :))) -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 19:24:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 14:24:33 -0500 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <8c4dfb6f-525a-48ac-af31-ba332b69adc6@f20g2000prn.googlegro ups.com> Message-ID: >I understand how to influence the width and height on my end, but how >can the participant influence the size when they do the experiment? Are you asking us to design your user interface (i.e., the user gestures with a mouse or joystick, or presses arrow keys on the keyboard, etc.), or are you asking what sort of code to use to implement your UI (which you have not yet described for us)? If the latter, then my answer remains the same, you implement user control through application of *attribute references* in the Width and Height attributes. And I repeat, before you even start to think about this project you need to work through *all* of the tutorials in the manuals that came with E-Prime. >And what do you mean by the inline code, do you mean the script, Yes. What the rest of the VBA world calls "code", PST perversely calls "script". > not fully sure how I would program that, I dont have that much experience >in programming. I have said this before, and here I say it again: then perhaps you should take a class in introduction to computer programming. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From avarga2 at tigers.lsu.edu Tue Jan 25 23:13:42 2011 From: avarga2 at tigers.lsu.edu (Alejandra Vargas) Date: Tue, 25 Jan 2011 17:13:42 -0600 Subject: E-Prime sound loop inline Message-ID: Hey all, I'm trying to find a way to loop sound in an inline script for my experiment. I put an inline at the beginning of the session to load the sound initially: >Dim MyBuffer As SoundBuffer >Dim GenericSoundBufferInfo As SoundBufferInfo >GenericSoundBufferInfo. MaxLength = 30500 >Set MyBuffer = Sound.CreateBuffer(GenericSoundBufferInfo) >MyBuffer.Filename = "Unknowncut3.wav" >MyBuffer.Load So this is the inline I used in the beginning. I want the sound to be played during two separate text displays at two different times in my experiment. So I put the following inline before both text displays: >myBuffer.Play This works just fine except that I need to get my sound clip to loop so that it plays throughout the entire text display. The sound clip is only 30 seconds long and I need it to play for about 108 seconds so it needs to loop about 4 times. I've looked all over the internet trying to find what scripting language I should use and where to put it to make the sound loop, but I'm not finding the answer. I tried soundout objects and I do get the sound to loop, but it doesn't play during my second text display. I'd really rather find a way to put some code in the inline to loop the sound. I know there has to be a way to do this, but I just can't figure it out! Please help! Any help would verrrry much be appreciated! Thanks in advance :) -Alejandra -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jedema at pitt.edu Wed Jan 26 13:11:19 2011 From: Jedema at pitt.edu (Hank Jedema) Date: Wed, 26 Jan 2011 05:11:19 -0800 Subject: E-Prime sound loop inline In-Reply-To: Message-ID: Hi Alejandra, I had a similar problem with the sound not looping. I did contact E- Prime about it (as well as this group) and E-Prime acknowledged that they had a problem. As a result they include a change in the audio looping protocol in a new release (2.08.90), which did fix the problem. So get the newest revision from their website and see whether that helps. Best, Hank On Jan 25, 6:13 pm, Alejandra Vargas wrote: > Hey all, I'm trying to find a way to loop sound in an inline script for my > experiment. I put an inline at the beginning of the session to load the > sound initially: > > > > >Dim MyBuffer As SoundBuffer > >Dim GenericSoundBufferInfo As SoundBufferInfo > >GenericSoundBufferInfo. > MaxLength = 30500 > >Set MyBuffer = Sound.CreateBuffer(GenericSoundBufferInfo) > >MyBuffer.Filename = "Unknowncut3.wav" > >MyBuffer.Load > > So this is the inline I used in the beginning. I want the sound to be played > during two separate text displays at two different times in my experiment. > So I put the following inline before both text displays: > > >myBuffer.Play > > This works just fine except that I need to get my sound clip to loop so that > it plays throughout the entire text display. The sound clip is only 30 > seconds long and I need it to play for about 108 seconds so it needs to loop > about 4 times. I've looked all over the internet trying to find what > scripting language I should use and where to put it to make the sound loop, > but I'm not finding the answer. I tried soundout objects and I do get the > sound to loop, but it doesn't play during my second text display. I'd really > rather find a way to put some code in the inline to loop the sound. I know > there has to be a way to do this, but I just can't figure it out! Please > help! Any help would verrrry much be appreciated! Thanks in advance :) > > -Alejandra -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From girish1m at gmail.com Wed Jan 26 16:57:58 2011 From: girish1m at gmail.com (newbie) Date: Wed, 26 Jan 2011 08:57:58 -0800 Subject: Hand grip task using Eprime Message-ID: Hi, I am a beginner to E-Prime and have so far worked only on visual stimuli experiments. I am planning to work on a task wherein the subjects would be required to use a hand dynamo-meter/any device that measures the force applied by the subject on the grip. I am wondering whether it would be possible to write an E-prime program that reads in the output of the handgrip device i. e. the amount of force applied and shows instructions accordingly. For example, they would see something like "Press as much as you can", then they press and I want the output to be displayed on the eprime screen. Can anyone help me with the type of dynamometer/handgrip device that I should consider buying? The ease of its integration with E-prime would be the major factor here. Thanks in advance! newbie -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From susangc7 at gmail.com Wed Jan 26 17:13:08 2011 From: susangc7 at gmail.com (Susan) Date: Wed, 26 Jan 2011 09:13:08 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <56956aff-8649-4db9-9472-3874763af4c2@z26g2000prf.googlegroups.com> Message-ID: Hi Josh, I suspect what you need to do is sit and break your problem down into the smallest component parts, and figure out which bits you know how to do and which you don't. People on this list could probably help you if you got to the point where you needed to figure out the finer points of mouse control, for instance, but they can't design your experiment for you. I also don't know of any extant examples that do anything similar (STEP didn't have any last I checked). If you're a novice at programming, I'll suggest that the mouse may not be your best option, however; the built-in support for mouse control in E-Prime is pretty rudimentary. Your arrow key idea is probably easier to implement (possibly with very little script, if you're really determined). HTH, Susan On Jan 26, 10:36 am, Josh wrote: > I want the user to be able to influence the size by a mouse although > it might be easier to do it by pressing the arrow keys because > collecting button presses would probably better than if they used a > mouse, and im asking what kind of script would I have to write to do > that? And to Davids advice about taking a intro to computer > programming, I would love to and might be planning to take a class > next year but at this time I only have a semester to get this thesis > done, so i dont have time to take a intro class. Although I can > definately understand how it would help. Oh and about the arrow keys I > would assume it would probably be the up arrow key would make the > object bigger and the down arrow key would make the object larger. > > thank you, and sorry for the trouble. > > On Jan 25, 2:24 pm, David McFarlane wrote: > > > >I understand how to influence the width and height on my end, but how > > >can the participant influence the size when they do the experiment? > > > Are you asking us to design your user interface (i.e., the user > > gestures with a mouse or joystick, or presses arrow keys on the > > keyboard, etc.), or are you asking what sort of code to use to > > implement your UI (which you have not yet described for us)?  If the > > latter, then my answer remains the same, you implement user control > > through application of *attribute references* in the Width and Height > > attributes.  And I repeat, before you even start to think about this > > project you need to work through *all* of the tutorials in the > > manuals that came with E-Prime. > > > >And what do you mean by the inline code, do you mean the script, > > > Yes.  What the rest of the VBA world calls "code", PST perversely > > calls "script". > > > >  not fully sure how I would program that, I dont have that much experience > > >in programming. > > > I have said this before, and here I say it again:  then perhaps you > > should take a class in introduction to computer programming. > > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Wed Jan 26 15:36:44 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Wed, 26 Jan 2011 07:36:44 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4d3f237a.44842a0a.7103.ffffbb6fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: I want the user to be able to influence the size by a mouse although it might be easier to do it by pressing the arrow keys because collecting button presses would probably better than if they used a mouse, and im asking what kind of script would I have to write to do that? And to Davids advice about taking a intro to computer programming, I would love to and might be planning to take a class next year but at this time I only have a semester to get this thesis done, so i dont have time to take a intro class. Although I can definately understand how it would help. Oh and about the arrow keys I would assume it would probably be the up arrow key would make the object bigger and the down arrow key would make the object larger. thank you, and sorry for the trouble. On Jan 25, 2:24 pm, David McFarlane wrote: > >I understand how to influence the width and height on my end, but how > >can the participant influence the size when they do the experiment? > > Are you asking us to design your user interface (i.e., the user > gestures with a mouse or joystick, or presses arrow keys on the > keyboard, etc.), or are you asking what sort of code to use to > implement your UI (which you have not yet described for us)?  If the > latter, then my answer remains the same, you implement user control > through application of *attribute references* in the Width and Height > attributes.  And I repeat, before you even start to think about this > project you need to work through *all* of the tutorials in the > manuals that came with E-Prime. > > >And what do you mean by the inline code, do you mean the script, > > Yes.  What the rest of the VBA world calls "code", PST perversely > calls "script". > > >  not fully sure how I would program that, I dont have that much experience > >in programming. > > I have said this before, and here I say it again:  then perhaps you > should take a class in introduction to computer programming. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Wed Jan 26 20:10:59 2011 From: doug.girard at gmail.com (DGirard) Date: Wed, 26 Jan 2011 12:10:59 -0800 Subject: SRBox Port Number configured at runtime? In-Reply-To: <4d3ef9b9.13bbe70a.516c.ffffd24aSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for your response, David. On one machine, the COM port number won't change once I plug in the USB SRBox and it gets assigned a port number. HOWEVER, from machine to machine, the COM ports assigned may be different. That is a problem for us. We would like to be able to develop and generate one script file and distribute it around to different machines that have only the runtime version of E-Prime on them (no developer components). Currently, when our application is "compiled" the COM port number basically gets hard-coded into the code, so we would have to generate 4 different versions of the code for all possible COM port assignments. This seems a bit ridiculous. To answer a few of your other questions: We are using E-Prime 2.0. And someone from the IT department installs the runtime components of E- Prime on our machines as an Administrator, but afterward we are only ever running as a User (not an admin). Thanks again, - Doug On Jan 25, 11:26 am, David McFarlane wrote: > Doug, > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it.  3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > What version of E-Prime do you use?  More importantly, what do you > mean by "when we plug the device into a computer, it will be assigned > whatever COM port is available"?  Do you really mean that any single > computer has dynamically assigned COM ports that can change whenever > you plug a device into it?  I have never heard of such a thing, so I > would like to know more.  Typically COM port addresses remain static > in any one machine, so once you know what it is on that machine you > can plug the SRBox into the COM port and it will not change, and you > can edit the .es or .es2 file for that machine to refer to the > appropriate COM port (just make sure that the COM port lies in the range 1-4). > > There are ways to do something like what you ask in both EP1 and EP2, > but I don't yet understand why your situation requires this. > > BTW, if you do not have admin access to these PCs, then how do you > get EP installed on them in the first place? > > -- David McFarlane, Professional Faultfinder > > At 1/23/2011 09:30 AM Sunday, you wrote: > > >We are using an SRBox and it seems we have to configure the COM port > >number at design time. This doesn't work for us since when we plug the > >device into a computer, it will be assigned whatever COM port is > >available. We won't have administrative access on these machines, so > >we won't be able to reassign the COM port with Device Manager. Even if > >we could, it is possible that another device is currently using that > >COM port number. So basically, we need the ability to specify the COM > >port number of the SRBox to e-Prime at runtime. Is there a way to do > >this with an external config file or something? > > >Thanks in advance for any suggestions, > >Doug > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Wed Jan 26 20:12:46 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Wed, 26 Jan 2011 12:12:46 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4787f72e-8028-4239-864c-2080a8665e1b@21g2000prv.googlegroups.com> Message-ID: thanks, ill try to get what I can figure out done. On Jan 26, 12:13 pm, Susan wrote: > Hi Josh, > > I suspect what you need to do is sit and break your problem down into > the smallest component parts, and figure out which bits you know how > to do and which you don't. People on this list could probably help you > if you got to the point where you needed to figure out the finer > points of mouse control, for instance, but they can't design your > experiment for you. I also don't know of any extant examples that do > anything similar (STEP didn't have any last I checked). > > If you're a novice at programming, I'll suggest that the mouse may not > be your best option, however; the built-in support for mouse control > in E-Prime is pretty rudimentary. Your arrow key idea is probably > easier to implement (possibly with very little script, if you're > really determined). > > HTH, > Susan > > On Jan 26, 10:36 am, Josh wrote: > > > > > I want the user to be able to influence the size by a mouse although > > it might be easier to do it by pressing the arrow keys because > > collecting button presses would probably better than if they used a > > mouse, and im asking what kind of script would I have to write to do > > that? And to Davids advice about taking a intro to computer > > programming, I would love to and might be planning to take a class > > next year but at this time I only have a semester to get this thesis > > done, so i dont have time to take a intro class. Although I can > > definately understand how it would help. Oh and about the arrow keys I > > would assume it would probably be the up arrow key would make the > > object bigger and the down arrow key would make the object larger. > > > thank you, and sorry for the trouble. > > > On Jan 25, 2:24 pm, David McFarlane wrote: > > > > >I understand how to influence the width and height on my end, but how > > > >can the participant influence the size when they do the experiment? > > > > Are you asking us to design your user interface (i.e., the user > > > gestures with a mouse or joystick, or presses arrow keys on the > > > keyboard, etc.), or are you asking what sort of code to use to > > > implement your UI (which you have not yet described for us)?  If the > > > latter, then my answer remains the same, you implement user control > > > through application of *attribute references* in the Width and Height > > > attributes.  And I repeat, before you even start to think about this > > > project you need to work through *all* of the tutorials in the > > > manuals that came with E-Prime. > > > > >And what do you mean by the inline code, do you mean the script, > > > > Yes.  What the rest of the VBA world calls "code", PST perversely > > > calls "script". > > > > >  not fully sure how I would program that, I dont have that much experience > > > >in programming. > > > > I have said this before, and here I say it again:  then perhaps you > > > should take a class in introduction to computer programming. > > > > -- David McFarlane, Professional Faultfinder- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Thu Jan 27 00:09:42 2011 From: issabern at gmail.com (issabern) Date: Wed, 26 Jan 2011 16:09:42 -0800 Subject: Run-Time Error 999 Message-ID: I've been receiving the run time error 999, "Filename is an invalid attribute". Does anyone have an idea what could be causing this error? Thanks in advance! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.bernhardsson at gmail.com Thu Jan 27 10:32:39 2011 From: jens.bernhardsson at gmail.com (jens) Date: Thu, 27 Jan 2011 02:32:39 -0800 Subject: Run-Time Error 999 In-Reply-To: <12729817.115.1296086982105.JavaMail.geo-discussion-forums@yqmi40> Message-ID: >From PST knowledge base: This error will occur if a List object calls a Procedure that does not exist. Typically, a yellow question mark (?) will appear beneath the List object callin the invalid Procedure. Check your List objects and ensure that the names under the Procedure column reference an existing Procedure. Best Jens On 27 Jan, 01:09, issabern wrote: > I've been receiving the run time error 999, "Filename is an invalid > attribute". Does anyone have an idea what could be causing this error? > > Thanks in advance! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Thu Jan 27 15:52:32 2011 From: issabern at gmail.com (issabern) Date: Thu, 27 Jan 2011 07:52:32 -0800 Subject: Run-Time Error 999 In-Reply-To: Message-ID: Thanks for the quick response Jens! However, that doesn't seem to be an issue. I'm only getting the problem when I read my stimuli from a txt file. If I have it embedded I don't get the error. Could this be causing the problem? Thanks, Bernie -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Thu Jan 27 22:15:20 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 27 Jan 2011 17:15:20 -0500 Subject: SRBox Port Number configured at runtime? In-Reply-To: <818cfed4-8bd3-4a23-80cd-620864ac6cd3@j19g2000prh.googlegro ups.com> Message-ID: Doug, OK, thanks for fleshing out the details. As long as the COM port remains stable on each machine, and you know what it is for each machine, then the clumsy but simple way to work around this is just to make a custom E-Run (.ebs2) file for each possible COM port. I.e., on your development station, open your .es2 file, and generate a .ebs2 with COM set to 1 (label it something like "MyExpt(COM1).ebs2)"; then set COM to port 2 and generate another .ebs2 file (e.g., "MyExpt(COM2).ebs2)"), etc. Once you have a collection of .ebs2 files for any COM port, just copy the appropriate file to each machine, and voila, all should run. But say you want a single .ebs "image" that you can run on each machine, using an external "config" file to customize it for each machine. Since you have EP2, you can take advantage of the new StartupInfo File feature, and in fact this very situation is covered in section 1.6.2.6 of the New Features Guide (but PST staff should have told you this already). (If you used EP1 instead of EP2, the the documentation for the StartupInfo File points the way to another workaround: you could store the COM address in an external text file; then, with some inline code, read it using Input# statements, and then, using the SRBox initializaton code already generated in the InitDevices subroutine as a guide, construct your own inline code to initialize the appropriate COM port.) I was a bit afraid that your COM port could change arbitrarily from session to session on a single machine, and that you wanted E-Prime to dynamically configure itself on each session. That *would* have been a tall order! (BTW I regularly advise *against* using a "runtime" installation, as I have explained at http://support.pstnet.com/forum/Topic3736-4-1.aspx , http://groups.google.com/group/e-prime/browse_thread/thread/1ab4456e77da1eaf , and http://groups.google.com/group/e-prime/browse_thread/thread/caa60dee31e74f35 .) -- David McFarlane, Professional Faultfinder At 1/26/2011 03:10 PM Wednesday, you wrote: >Thanks for your response, David. On one machine, the COM port number >won't change once I plug in the USB SRBox and it gets assigned a port >number. HOWEVER, from machine to machine, the COM ports assigned may >be different. That is a problem for us. We would like to be able to >develop and generate one script file and distribute it around to >different machines that have only the runtime version of E-Prime on >them (no developer components). Currently, when our application is >"compiled" the COM port number basically gets hard-coded into the >code, so we would have to generate 4 different versions of the code >for all possible COM port assignments. This seems a bit ridiculous. > >To answer a few of your other questions: We are using E-Prime 2.0. And >someone from the IT department installs the runtime components of E- >Prime on our machines as an Administrator, but afterward we are only >ever running as a User (not an admin). > >Thanks again, >- Doug > >On Jan 25, 11:26 am, David McFarlane wrote: > > Doug, > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > What version of E-Prime do you use? More importantly, what do you > > mean by "when we plug the device into a computer, it will be assigned > > whatever COM port is available"? Do you really mean that any single > > computer has dynamically assigned COM ports that can change whenever > > you plug a device into it? I have never heard of such a thing, so I > > would like to know more. Typically COM port addresses remain static > > in any one machine, so once you know what it is on that machine you > > can plug the SRBox into the COM port and it will not change, and you > > can edit the .es or .es2 file for that machine to refer to the > > appropriate COM port (just make sure that the COM port lies in > the range 1-4). > > > > There are ways to do something like what you ask in both EP1 and EP2, > > but I don't yet understand why your situation requires this. > > > > BTW, if you do not have admin access to these PCs, then how do you > > get EP installed on them in the first place? > > > > -- David McFarlane, Professional Faultfinder > > > > At 1/23/2011 09:30 AM Sunday, you wrote: > > > > >We are using an SRBox and it seems we have to configure the COM port > > >number at design time. This doesn't work for us since when we plug the > > >device into a computer, it will be assigned whatever COM port is > > >available. We won't have administrative access on these machines, so > > >we won't be able to reassign the COM port with Device Manager. Even if > > >we could, it is possible that another device is currently using that > > >COM port number. So basically, we need the ability to specify the COM > > >port number of the SRBox to e-Prime at runtime. Is there a way to do > > >this with an external config file or something? > > > > >Thanks in advance for any suggestions, > > >Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dragoblu at gmail.com Sat Jan 29 17:59:40 2011 From: dragoblu at gmail.com (EC) Date: Sat, 29 Jan 2011 09:59:40 -0800 Subject: Experiment Start timestamp Message-ID: Hello everyone, in the experiment data, OnsetTime and all the other Time Audit variables are measured in milliseconds since the experiment started. Is there way to know when the experiment started in "computer time", that is - a timestamp (in milliseconds) of the system clock at the start? In other words, when "Clock.Read = 0" happened? :) I ask because I have an external device which has a clock synchronized to the computer clock and I would to be able to combine data from the external device with E-prime data. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Sun Jan 30 15:58:32 2011 From: doug.girard at gmail.com (DGirard) Date: Sun, 30 Jan 2011 07:58:32 -0800 Subject: SRBox Port Number configured at runtime? In-Reply-To: <4d41ee83.9915e70a.15d9.2c2eSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Great. Using a local StartupInfo file is exactly what I wanted. - Doug On Jan 27, 5:15 pm, David McFarlane wrote: > Doug, > > OK, thanks for fleshing out the details.  As long as the COM port > remains stable on each machine, and you know what it is for each > machine, then the clumsy but simple way to work around this is just > to make a custom E-Run (.ebs2) file for each possible COM > port.  I.e., on your development station, open your .es2 file, and > generate a .ebs2 with COM set to 1 (label it something like > "MyExpt(COM1).ebs2)"; then set COM to port 2 and generate another > .ebs2 file (e.g., "MyExpt(COM2).ebs2)"), etc.  Once you have a > collection of .ebs2 files for any COM port, just copy the appropriate > file to each machine, and voila, all should run. > > But say you want a single .ebs "image" that you can run on each > machine, using an external "config" file to customize it for each > machine.  Since you have EP2, you can take advantage of the new > StartupInfo File feature, and in fact this very situation is covered > in section 1.6.2.6 of the New Features Guide (but PST staff should > have told you this already).  (If you used EP1 instead of EP2, the > the documentation for the StartupInfo File points the way to another > workaround:  you could store the COM address in an external text > file; then, with some inline code, read it using Input# statements, > and then, using the SRBox initializaton code already generated in the > InitDevices subroutine as a guide, construct your own inline code to > initialize the appropriate COM port.) > > I was a bit afraid that your COM port could change arbitrarily from > session to session on a single machine, and that you wanted E-Prime > to dynamically configure itself on each session.  That *would* have > been a tall order! > > (BTW I regularly advise *against* using a "runtime" installation, as > I have explained athttp://support.pstnet.com/forum/Topic3736-4-1.aspx,http://groups.google.com/group/e-prime/browse_thread/thread/1ab4456e7... > , andhttp://groups.google.com/group/e-prime/browse_thread/thread/caa60dee3....) > > -- David McFarlane, Professional Faultfinder > > At 1/26/2011 03:10 PM Wednesday, you wrote: > > >Thanks for your response, David. On one machine, the COM port number > >won't change once I plug in the USB SRBox and it gets assigned a port > >number. HOWEVER, from machine to machine, the COM ports assigned may > >be different. That is a problem for us. We would like to be able to > >develop and generate one script file and distribute it around to > >different machines that have only the runtime version of E-Prime on > >them (no developer components). Currently, when our application is > >"compiled" the COM port number basically gets hard-coded into the > >code, so we would have to generate 4 different versions of the code > >for all possible COM port assignments. This seems a bit ridiculous. > > >To answer a few of your other questions: We are using E-Prime 2.0. And > >someone from the IT department installs the runtime components of E- > >Prime on our machines as an Administrator, but afterward we are only > >ever running as a User (not an admin). > > >Thanks again, > >- Doug > > >On Jan 25, 11:26 am, David McFarlane wrote: > > > Doug, > > > > Stock reminder:  1) I do not work for PST.  2) PST's trained staff > > > takes any and all questions > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it.  3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > What version of E-Prime do you use?  More importantly, what do you > > > mean by "when we plug the device into a computer, it will be assigned > > > whatever COM port is available"?  Do you really mean that any single > > > computer has dynamically assigned COM ports that can change whenever > > > you plug a device into it?  I have never heard of such a thing, so I > > > would like to know more.  Typically COM port addresses remain static > > > in any one machine, so once you know what it is on that machine you > > > can plug the SRBox into the COM port and it will not change, and you > > > can edit the .es or .es2 file for that machine to refer to the > > > appropriate COM port (just make sure that the COM port lies in > > the range 1-4). > > > > There are ways to do something like what you ask in both EP1 and EP2, > > > but I don't yet understand why your situation requires this. > > > > BTW, if you do not have admin access to these PCs, then how do you > > > get EP installed on them in the first place? > > > > -- David McFarlane, Professional Faultfinder > > > > At 1/23/2011 09:30 AM Sunday, you wrote: > > > > >We are using an SRBox and it seems we have to configure the COM port > > > >number at design time. This doesn't work for us since when we plug the > > > >device into a computer, it will be assigned whatever COM port is > > > >available. We won't have administrative access on these machines, so > > > >we won't be able to reassign the COM port with Device Manager. Even if > > > >we could, it is possible that another device is currently using that > > > >COM port number. So basically, we need the ability to specify the COM > > > >port number of the SRBox to e-Prime at runtime. Is there a way to do > > > >this with an external config file or something? > > > > >Thanks in advance for any suggestions, > > > >Doug > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jan 31 21:41:19 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 31 Jan 2011 16:41:19 -0500 Subject: Experiment Start timestamp In-Reply-To: <63ec215f-733f-4148-9b56-887ccf7fae65@k14g2000pre.googlegro ups.com> Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Hmm, you no doubt already know that SessionTime in the .edat file records the clock time for the start of the experiment, but I suspect you want something that records the clock time down the millisecond, whereas SessionTime goes only to the second. That will be a tall order, because typically Windows does not keep clock time down to ms resolution, E-Prime only gets that by interposing DirectX commands. E.g., you could use the Time$ function, but that goes down only to seconds (and is what SessionTime already uses anyway, as you can see by reading the generated E-Run code). You might instead use some common signal to start both your EP experiment and your external device at the same time, and then count from there. Or you might program your EP experiment to delay until the clock time reaches some round value, although once again I would not expect that to be accurate down to the millisecond. -- David McFarlane, Professional Faultfinder At 1/29/2011 12:59 PM Saturday, EC wrote: >Hello everyone, >in the experiment data, OnsetTime and all the other Time Audit >variables are measured in milliseconds since the experiment started. >Is there way to know when the experiment started in "computer time", >that is - a timestamp (in milliseconds) of the system clock at the >start? >In other words, when "Clock.Read = 0" happened? :) >I ask because I have an external device which has a clock synchronized >to the computer clock and I would to be able to combine data from the >external device with E-prime data. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Tue Jan 4 18:13:42 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Tue, 4 Jan 2011 10:13:42 -0800 Subject: Track trigger timing Message-ID: Hi, I am creating an experiment where a TMS is triggered at various points during a trial sequence (where several stimuli are presented). I have InLine code at the very beginning of the experiment that randomizes the onset of the trigger. What I want to be able to do is to timestamp the execution of the trigger -- in other words, I want a timestamp when the line of code in InLine for trigger TMS is begun/completed and I want to log that data together with other information in the final .edat file. For that purpose I have declared 2 global variables "PulseOn" and "PulseOff" under the User tab in the Script window. In my InLine code right after trigger is executed (and I know that the trigger works just as it should) I have added PulseOn = Clock.Read c.SetAttrib "PulseOnset", PulseOn and similar code is placed after the port is turned off for trigger offset time stamp. However, when I run this code, the variables PulseOnset/Offset are not saved in the data file. I have also tried to use c.Log in this InLine but then only one line of data (one trial) is saved and although trigger onset/offset are marked, there is no more any data about the objects presented during the trial. In the documentation I have found that "a variable must be set as an attribute of the context object in order to be logged in the data file" so I assume that the issue here is that PulseOn/Off aren't really "attached" to any object in the experiment... Is there a way around that? Or another way to log the onset/offset of the trigger? THANK YOU! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jan 4 19:10:18 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 4 Jan 2011 19:10:18 +0000 Subject: Track trigger timing In-Reply-To: <075d52bc-8ec7-483b-8756-fe5b92cad223@30g2000yql.googlegroups.com> Message-ID: Hiya, What you're saying doesn't sound like anything E-Prime should omit. The only reason I can see your data is not being saved is that for some reason, these lines are skipped. There can be many reasons for this (say, a button-press causes a goto to fire), but what you would need to find out is whether you are actually logging anything. That is, just move the inline thingy forward/backwards along the procedure and see whether anything is logged. I'd also recommend shortening the line to c.SetAttrib "PulseOnset", clock.read so that you don't even have to declare any variable. One question though: is _nothing_ being saved, or is PulseOnset found somewhere in your edat file, but with nothing in there? If the former, then the line is presumably skipped (as i had assumed based on what you write). If the latter, then a number of other things may be going on (e.g. it's saved under a sub-trial level thus easily overlooked). One final thought: I'd first get everything running, THEN start thinking about adding TMS triggers and whatnot. It's far easier to add advanced bits to the working basics than vice versa. Can you, for instance, get a Stroop experiment (or any of the tutorial experiments) running with a c.SetAttrib "MyExtraLoggedData", clock.read added? cheers, Mich ________________________________________ From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf Of Evelina Tapia [evelina at illinois.edu] Sent: 04 January 2011 18:13 To: E-Prime Subject: Track trigger timing Hi, I am creating an experiment where a TMS is triggered at various points during a trial sequence (where several stimuli are presented). I have InLine code at the very beginning of the experiment that randomizes the onset of the trigger. What I want to be able to do is to timestamp the execution of the trigger -- in other words, I want a timestamp when the line of code in InLine for trigger TMS is begun/completed and I want to log that data together with other information in the final .edat file. For that purpose I have declared 2 global variables "PulseOn" and "PulseOff" under the User tab in the Script window. In my InLine code right after trigger is executed (and I know that the trigger works just as it should) I have added PulseOn = Clock.Read c.SetAttrib "PulseOnset", PulseOn and similar code is placed after the port is turned off for trigger offset time stamp. However, when I run this code, the variables PulseOnset/Offset are not saved in the data file. I have also tried to use c.Log in this InLine but then only one line of data (one trial) is saved and although trigger onset/offset are marked, there is no more any data about the objects presented during the trial. In the documentation I have found that "a variable must be set as an attribute of the context object in order to be logged in the data file" so I assume that the issue here is that PulseOn/Off aren't really "attached" to any object in the experiment... Is there a way around that? Or another way to log the onset/offset of the trigger? THANK YOU! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 4 22:30:02 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 4 Jan 2011 17:30:02 -0500 Subject: Track trigger timing In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20BCCE68@EXCHANGE3.ad.no ttingham.ac.uk> Message-ID: Evelina, Mich pretty much covered it. I will add only the following: For debugging purposes, you can sprinkle the code with MsgBox or Debug.Print statements so that you can trace execution flow and see if the code really goes where you think it does. MsgBox will mess up the program timing, but will show at run time where your code is, and will work outside of E-Studio; Debug.Print requires running from E-Studio, but offers some other niceties. I would not use a c.Log anywhere except in exceptional circumstances (e.g., a loop within a Procedure where I want to add extra log lines). The Procedure already supplies a c.Log where needed, each extra c.Log that you add also adds another line to the log, which is rarely what you want. More to the point, simply using c.SetAttrib already does everything needed to added an attribute to the log, since EP automatically addes the required c.Log (don't take my word for that, look at the generated code just before End Sub of your Procedure). The PulseOn/Off need not be "attached" to any object in the program (and as Mich pointed out, you don't really need the variables at all). As described it looks like you are doing everything correctly, so we must be missing something. Which brings us back to the general debugging tips offered by Mich & me to see if the program flow really goes where you think it does. Good luck, -- David McFarlane, Professional Faultfinder Michiel Spape wrote: >Hiya, >What you're saying doesn't sound like anything E-Prime should omit. >The only reason I can see your data is not being saved is that for >some reason, these lines are skipped. There can be many reasons for >this (say, a button-press causes a goto to fire), but what you would >need to find out is whether you are actually logging anything. That >is, just move the inline thingy forward/backwards along the >procedure and see whether anything is logged. I'd also recommend >shortening the line to >c.SetAttrib "PulseOnset", clock.read >so that you don't even have to declare any variable. > >One question though: is _nothing_ being saved, or is PulseOnset >found somewhere in your edat file, but with nothing in there? If the >former, then the line is presumably skipped (as i had assumed based >on what you write). If the latter, then a number of other things may >be going on (e.g. it's saved under a sub-trial level thus easily overlooked). > >One final thought: I'd first get everything running, THEN start >thinking about adding TMS triggers and whatnot. It's far easier to >add advanced bits to the working basics than vice versa. Can you, >for instance, get a Stroop experiment (or any of the tutorial >experiments) running with a c.SetAttrib "MyExtraLoggedData", clock.read added? >cheers, >Mich > >________________________________________ >From: e-prime at googlegroups.com [e-prime at googlegroups.com] On Behalf >Of Evelina Tapia [evelina at illinois.edu] >Sent: 04 January 2011 18:13 >To: E-Prime >Subject: Track trigger timing > >Hi, > >I am creating an experiment where a TMS is triggered at various points >during a trial sequence (where several stimuli are presented). I have >InLine code at the very beginning of the experiment that randomizes >the onset of the trigger. What I want to be able to do is to timestamp >the execution of the trigger -- in other words, I want a timestamp >when the line of code in InLine for trigger TMS is begun/completed and >I want to log that data together with other information in the >final .edat file. For that purpose I have declared 2 global variables >"PulseOn" and "PulseOff" under the User tab in the Script window. In >my InLine code right after trigger is executed (and I know that the >trigger works just as it should) I have added > >PulseOn = Clock.Read >c.SetAttrib "PulseOnset", PulseOn > >and similar code is placed after the port is turned off for trigger >offset time stamp. However, when I run this code, the variables >PulseOnset/Offset are not saved in the data file. I have also tried to >use c.Log in this InLine but then only one line of data (one trial) is >saved and although trigger onset/offset are marked, there is no more >any data about the objects presented during the trial. > >In the documentation I have found that "a variable must be set as an >attribute of the context object in order to be logged in the data >file" so I assume that the issue here is that PulseOn/Off aren't >really "attached" to any object in the experiment... Is there a way >around that? Or another way to log the onset/offset of the trigger? > >THANK YOU! > >Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Wed Jan 5 09:24:40 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 01:24:40 -0800 Subject: "Binding" images together Message-ID: Hi, I'm still quite new to e-prime and am trying to create an experiment where a constant stream of faces is presented to the participant. The faces consist of emotionally neutral and emotional expressive faces. The plan is to have a "train" of neutral faces with a random presentation of an emotional face and then a second same emotional face shown directly after then back to the neutral train for x repeats. So something like: n n n n n n E E n n n n n n E E n n n n n n n n E E. While relatively simply in theory, working with the list method is arduous as (and please correct me if I'm wrong) the presentation method can't be set to random and keep the double E faces shown together. My question then: is it possible to have a random presentation of E faces during a block while keeping the presentation of the two E faces together? Is there a way to "bind" them together while "jumping" back to the n faces after both have been presented or do I need to create a manual psuedo-random list? Any comments are appreciated, and thanks in advance. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Wed Jan 5 10:27:00 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Wed, 5 Jan 2011 10:27:00 +0000 Subject: "Binding" images together In-Reply-To: <32ca45fe-417e-4bbd-bb19-1329432abc4c@z26g2000prf.googlegroups.com> Message-ID: Hi, If I understand correctly, what you would ideally want is a way to randomise the NUMBER of presentations (as opposed to, what would be more normal in E-Prime, the ORDER)? You could easily do this with one (or more) lists and the setweight method. That is, if you want to First present random number of neutral faces Then present 2 emotional faces Then present random number of neutral faces And you have one List, say List1, you could just enter two levels (one for each of the above), and just before the list, have this small inline: List1.SetWeight 1, random(1,80) List1.SetWeight 3, random(1,80) List1.Reset Et voila, your first and third level shall be presented a random number (between 1 and 80) of times. Job done, I think, and probably more elegant than jumping back and forth (as you suggested, which would obviously also be possible). ...unless you want to go back to THE SAME emotional faces, although that could be managed using Attribute:level syntax. Cheers, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Orcasha Sent: 05 January 2011 09:25 To: E-Prime Subject: "Binding" images together Hi, I'm still quite new to e-prime and am trying to create an experiment where a constant stream of faces is presented to the participant. The faces consist of emotionally neutral and emotional expressive faces. The plan is to have a "train" of neutral faces with a random presentation of an emotional face and then a second same emotional face shown directly after then back to the neutral train for x repeats. So something like: n n n n n n E E n n n n n n E E n n n n n n n n E E. While relatively simply in theory, working with the list method is arduous as (and please correct me if I'm wrong) the presentation method can't be set to random and keep the double E faces shown together. My question then: is it possible to have a random presentation of E faces during a block while keeping the presentation of the two E faces together? Is there a way to "bind" them together while "jumping" back to the n faces after both have been presented or do I need to create a manual psuedo-random list? Any comments are appreciated, and thanks in advance. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Wed Jan 5 18:37:39 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Wed, 5 Jan 2011 10:37:39 -0800 Subject: Track trigger timing In-Reply-To: <4d239f6d.9915e70a.37cb.688fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Michiel and David, Thank you very much for your suggestions. My program worked as it should without the TMS trigger. I have finally figured out the solution to this problem and will post it here in case someone else has a similar issue. Originally, the InLine script that sent the trigger to the TMS was placed at the very beginning of the experiment. That is where I also coded my variables (right after trigger code I had [PulseOn = Clock.Read]). So, it turns out, probably not surprisingly, that this InLine is read only once during the experiment (although if anyone could explain how the trial procedure knows when to execute the triggers which are specified and read only once at the beginning of the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ Offsets will have the same value on a trial-by-trial basis. In order to update PulseOn/Off variable I had to move the InLine with triggers to the beginning of the trial procedure (which I didn?t do originally due to some other issues with the trigger). I also created empty columns (called PulseOnset/Offset) in the trial List because that is where the variables will be stored. The code is printed below. Happy programming! Evelina ************************************************ ?Here PulseSOAs is a List with trial parameters 'For zero SOA trigger on Target If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then Target.OnsetSignalEnabled = True Target.OnsetSignalPort = &H378 Target.OnsetSignalData = 128 'Timestamp pulse onset ?PulseOnset is a blank column in PulseSOAs List c.SetAttrib "PulseOnset", Clock.Read 'Resets port Target.OffsetSignalEnabled = True Target.OffsetSignalPort = &H378 Target.OffsetSignalData = 0 'Timestamp pulse offset ?PulseOffset is a blank column in PulseSOAs List c.SetAttrib "PulseOffset", Clock.Read 'For positive SOAs trigger on Blank ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then Blank3.OnsetSignalEnabled = True Blank3.OnsetSignalPort = &H378 Blank3.OnsetSignalData = 128 'Timestamp pulse onset c.SetAttrib "PulseOnset", Clock.Read 'Resets port Blank3.OffsetSignalEnabled = True Blank3.OffsetSignalPort = &H378 Blank3.OffsetSignalData = 0 'Timestamp pulse offset c.SetAttrib "PulseOffset", Clock.Read End If -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pquain at une.edu.au Wed Jan 5 21:32:49 2011 From: pquain at une.edu.au (Peter Quain) Date: Thu, 6 Jan 2011 08:32:49 +1100 Subject: Track trigger timing In-Reply-To: <6b15b4e4-0e38-4b7f-b2fe-a0da14eb008f@z9g2000yqz.googlegrou ps.com> Message-ID: you don't need any blank columns in a List (PulseOnset/Offset), no values are writen there at runtime. SetAttrib sets the value of an attribute, and stores that value in the LogFile in a column for that attribute, not in any List. At 05:37 AM 6/01/2011, you wrote: >Michiel and David, > >Thank you very much for your suggestions. My program worked as it >should without the TMS trigger. I have finally figured out the >solution to this problem and will post it here in case someone else >has a similar issue. > >Originally, the InLine script that sent the trigger to the TMS was >placed at the very beginning of the experiment. That is where I also >coded my variables (right after trigger code I had [PulseOn = >Clock.Read]). So, it turns out, probably not surprisingly, that this >InLine is read only once during the experiment (although if anyone >could explain how the trial procedure knows when to execute the >triggers which are specified and read only once at the beginning of >the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ >Offsets will have the same value on a trial-by-trial basis. In order >to update PulseOn/Off variable I had to move the InLine with triggers >to the beginning of the trial procedure (which I didn't do originally >due to some other issues with the trigger). I also created empty >columns (called PulseOnset/Offset) in the trial List because that is >where the variables will be stored. The code is printed below. > >Happy programming! > >Evelina > >************************************************ >'Here PulseSOAs is a List with trial parameters >'For zero SOA trigger on Target >If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then > Target.OnsetSignalEnabled = True > Target.OnsetSignalPort = &H378 > Target.OnsetSignalData = 128 > > 'Timestamp pulse onset > 'PulseOnset is a blank column in PulseSOAs List > c.SetAttrib "PulseOnset", Clock.Read > > 'Resets port > Target.OffsetSignalEnabled = True > Target.OffsetSignalPort = &H378 > Target.OffsetSignalData = 0 > > 'Timestamp pulse offset > 'PulseOffset is a blank column in >PulseSOAs List > c.SetAttrib "PulseOffset", Clock.Read > > >'For positive SOAs trigger on Blank >ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then > Blank3.OnsetSignalEnabled = True > Blank3.OnsetSignalPort = &H378 > Blank3.OnsetSignalData = 128 > > 'Timestamp pulse onset > c.SetAttrib "PulseOnset", Clock.Read > > 'Resets port > Blank3.OffsetSignalEnabled = True > Blank3.OffsetSignalPort = &H378 > Blank3.OffsetSignalData = 0 > > 'Timestamp pulse offset > c.SetAttrib "PulseOffset", Clock.Read > >End If > >-- >You received this message because you are subscribed to the Google >Groups "E-Prime" group. >To post to this group, send email to e-prime at googlegroups.com. >To unsubscribe from this group, send email to >e-prime+unsubscribe at googlegroups.com. >For more options, visit this group at >http://groups.google.com/group/e-prime?hl=en. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Thu Jan 6 02:20:07 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 18:20:07 -0800 Subject: "Binding" images together In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20B598E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi Michiel, Thanks for getting back to me so quickly. If I understand this correctly, that's kind of what I want (and I apologise for not being as indepth about the method) but it seems only deals with a single set of emotional faces. Basically I want to use 5 kinds of emotional faces shown twice in a row then a random number of neutral faces, and after each face presentation have a blank screen come up. So a more accurate way of explaining it would be (n = neutral, b = blank, E(x) = emotion): n b n b n b n b n b n b E1 b E1 b n b n b n b n b E2 b E2 b n b n b n and so forth. Can your method do this too? Thanks again. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From orcasha at gmail.com Thu Jan 6 04:32:37 2011 From: orcasha at gmail.com (Orcasha) Date: Wed, 5 Jan 2011 20:32:37 -0800 Subject: "Binding" images together In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20B598E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Hi Michiel, Thanks for getting back to me so quickly. If I understand the code correctly, this will show a random amount of neutral faces, then the two emotional faces (the second possibly being shown a random amount of times too?) then resetting back to neutral faces. But this seems only deals with a single set of emotional faces then going back to the neutral face. The problem comes as I want to use 5 randomly selected paired emotional faces (sad + sad, happy + happy etc) then a random number of neutral faces, and after each face presentation have a blank screen come up (and I apologise for not being as indepth about the method in my earlier post). So a more accurate way of explaining it would be (n = neutral, b = blank, E(x) = emotion): n b n b n b n b n b n b E1 b E1 b n b n b n b n b E2 b E2 b n b n b n... When I try doing a method similar to yours it doesn't always go back to the neutral for random presentation but sometimes has two lots of emotional pairs running back to back. So the revised question is: How can I create a protocol that allows me to go back to a random number of neutral faces, but prevents E pairs from occasionally being presented consecutively? Thanks again. On Jan 5, 9:27?pm, Michiel Spape wrote: > Hi, > If I understand correctly, what you would ideally want is a way to randomise the NUMBER of presentations (as opposed to, what would be more normal in E-Prime, the ORDER)? You could easily do this with one (or more) lists and the setweight method. That is, if you want to > First present random number of neutral faces > Then present 2 emotional faces > Then present random number of neutral faces > And you have one List, say List1, you could just enter two levels (one for each of the above), and just before the list, have this small inline: > List1.SetWeight 1, random(1,80) > List1.SetWeight 3, random(1,80) > List1.Reset > Et voila, your first and third level shall be presented a random number (between 1 and 80) of times. > Job done, I think, and probably more elegant than jumping back and forth (as you suggested, which would obviously also be possible). > > ...unless you want to go back to THE SAME emotional faces, although that could be managed using Attribute:level syntax. > Cheers, > Mich > > Michiel Spap? > Research Fellow > Perception & Action group > University of Nottingham > School of Psychologywww.cognitology.eu > > -----Original Message----- > From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of Orcasha > Sent: 05 January 2011 09:25 > To: E-Prime > Subject: "Binding" images together > > Hi, > > I'm still quite new to e-prime and am trying to create an experiment > where a constant stream of faces is presented to the participant. The > faces consist of emotionally neutral and emotional expressive faces. > > The plan is to have a "train" of neutral faces with a random > presentation of an emotional face and then a second same emotional > face shown directly after then back to the neutral train for x > repeats. So something like: n n n n n n E E n n n n n n E E n n n n n > n n n E E. > > While relatively simply in theory, working with the list method is > arduous as (and please correct me if I'm wrong) the presentation > method can't be set to random and keep the double E faces shown > together. > > My question then: is it possible to have a random presentation of E > faces during a block while keeping the presentation of the two E faces > together? Is there a way to "bind" them together while "jumping" back > to the n faces after both have been presented or do I need to create a > manual psuedo-random list? > > Any comments are appreciated, and thanks in advance. > > -- > You received this message because you are subscribed to the Google Groups "E-Prime" group. > To post to this group, send email to e-prime at googlegroups.com. > To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/e-prime?hl=en. > > This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. ? Please do not use, copy or disclose the information contained in this message or in any attachment. ?Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. > > This message has been checked for viruses but the contents of an attachment > may still contain software viruses which could damage your computer system: > you are advised to perform your own checks. Email communications with the > University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Thu Jan 6 17:22:25 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Thu, 6 Jan 2011 09:22:25 -0800 Subject: Track trigger timing In-Reply-To: <201101052132.p05LWiBl000573@mail13.tpg.com.au> Message-ID: Peter is most likely correct about not really needing the empty columns in the list. I just went by some examples off of E-Prime's website and didn't test the code without those empty columns. Also, I should add that the timestamp in the code I posted earlier will be for the moment E-prime reads/executes a specific line of code but the timestamp itself will NOT reflect when the trigger was sent. The trigger is always sent at the osnet of an object on which the signaling is enabled so the TimeOnset of that object is the timestamp of when the trigger was executed. It took me sometime to figure that out =] Evelina On Jan 5, 3:32?pm, Peter Quain wrote: > you don't need any blank columns in a List (PulseOnset/Offset), no > values are writen there at runtime. SetAttrib sets the value of an > attribute, and stores that value in the LogFile in a column for that > attribute, not in any List. > > At 05:37 AM 6/01/2011, you wrote: > > > > >Michiel and David, > > >Thank you very much for your suggestions. My program worked as it > >should without the TMS trigger. I have finally figured out the > >solution to this problem and will post it here in case someone else > >has a similar issue. > > >Originally, the InLine script that sent the trigger to the TMS was > >placed at the very beginning of the experiment. That is where I also > >coded my variables (right after trigger code I had [PulseOn = > >Clock.Read]). So, it turns out, probably not surprisingly, that this > >InLine is read only once during the experiment (although if anyone > >could explain how the trial procedure knows when to execute the > >triggers which are specified and read only once at the beginning of > >the expt, I would appreciate it :)) and, therefore, all PulseOnsets/ > >Offsets will have the same value on a trial-by-trial basis. ?In order > >to update PulseOn/Off variable I had to move the InLine with triggers > >to the beginning of the trial procedure (which I didn't do originally > >due to some other issues with the trigger). I also created empty > >columns (called PulseOnset/Offset) in the trial List because that is > >where the variables will be stored. The code is printed below. > > >Happy programming! > > >Evelina > > >************************************************ > >'Here PulseSOAs is a List with trial parameters > >'For zero SOA trigger on Target > >If PulseSOAs.GetAttrib(1, "SOAcondition") = 0 Then > > ? ? ? ? Target.OnsetSignalEnabled = True > > ? ? ? ? Target.OnsetSignalPort = &H378 > > ? ? ? ? Target.OnsetSignalData = 128 > > > ? ? ? ? ? ? ? ? 'Timestamp pulse onset > > ? ? ? ? ? ? ? ? 'PulseOnset is a blank column in PulseSOAs List > > ? ? ? ? ? ? ? ? c.SetAttrib "PulseOnset", Clock.Read > > > ? ? ? ? 'Resets port > > ? ? ? ? Target.OffsetSignalEnabled = True > > ? ? ? ? Target.OffsetSignalPort = &H378 > > ? ? ? ? Target.OffsetSignalData = 0 > > > ? ? ? ? ? ? ? ? 'Timestamp pulse offset > > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'PulseOffset is a blank column in > >PulseSOAs List > > ? ? ? ? ? ? ? ? c.SetAttrib "PulseOffset", Clock.Read > > >'For positive SOAs trigger on Blank > >ElseIf PulseSOAs.GetAttrib(1, "SOAcondition") > 10 Then > > ? ? ? ? Blank3.OnsetSignalEnabled = True > > ? ? ? ? Blank3.OnsetSignalPort = &H378 > > ? ? ? ? Blank3.OnsetSignalData = 128 > > > ? ? ? ? ? ? ? ? 'Timestamp pulse onset > > ? ? ? ? ? ? ? ? c.SetAttrib "PulseOnset", Clock.Read > > > ? ? ? ? 'Resets port > > ? ? ? ? Blank3.OffsetSignalEnabled = True > > ? ? ? ? Blank3.OffsetSignalPort = &H378 > > ? ? ? ? Blank3.OffsetSignalData = 0 > > > ? ? ? ? ? ? ? ? 'Timestamp pulse offset > > ? ? ? ? ? ? ? ? c.SetAttrib "PulseOffset", Clock.Read > > >End If > > >-- > >You received this message because you are subscribed to the Google > >Groups "E-Prime" group. > >To post to this group, send email to e-prime at googlegroups.com. > >To unsubscribe from this group, send email to > >e-prime+unsubscribe at googlegroups.com. > >For more options, visit this group at > >http://groups.google.com/group/e-prime?hl=en.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Thu Jan 6 18:31:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 6 Jan 2011 13:31:36 -0500 Subject: Track trigger timing In-Reply-To: <59af1074-1e43-4c25-abf4-7db6629bc56f@l8g2000yqh.googlegrou ps.com> Message-ID: Evelina Tapia wrote: >Peter is most likely correct about not really needing the empty >columns in the list. I just went by some examples off of E-Prime's >website and didn't test the code without those empty columns. This might be a moment to remind folks that generally the examples provided by PST are rather sloppy and cannot be taken as models of proper programming practice. Take the PST examples merely as hints and exercises and then use your own judgment. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jennaology at yahoo.com Fri Jan 7 09:51:48 2011 From: jennaology at yahoo.com (RB209) Date: Fri, 7 Jan 2011 01:51:48 -0800 Subject: Response triggers with accurate timing In-Reply-To: <4d07d8bf.9915e70a.3d58.0c63SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I wanted to update this thread in case anyone else finds themselves with a similar problem. Before I decided to send triggers the basic design was as follows: 300ms fixation followed by slide1 object to display an image for 2500ms, followed by a blank screen for 1000ms. Participants can respond as soon as slide 1 appears but I also wanted responses to be collected for 1000ms afterwards. So although the duration for slide1 was initially set to 2500ms the time limit was 3500ms and end action was none. My need to send accurate response triggers was complicated by 2 factors. 1.) The response should not terminate the slide1 object 2.) Response triggers should be collected during the running of 2 different objects but I didn't want to leave open the possibility that participants could respond twice within a single trial. Eprime support have been extremely helpful and have come up with a solution that I would be happy to send to anyone. I will briefly cover the details: Trial procedure is as follows: 1. Inline1 loads the blank screen (imagedisplay1) so that this is ready to go when needed. Imagedisplay1 is an unreferenced object. 2.) Slide1: duration = 0, timelimit = 3700, end action = none. This displays the image and sets an input mask for 3700ms 3.) Inline2: Firstly, certain variables are declared. Then, a loop runs while the input mask ispending and breaks when a response is made or the time limit (3500) is reached. During this time, Eprime checks to see if 2500ms has elapsed and if so, presents imagedisplay1 (which has already been loaded to minimise delays). When the loop breaks, a trigger is sent. A second loop is needed to control for participants responding before 2500ms has elapsed and breaking the loop too soon. (See below for the actual code). 4.) Imagedisplay1 is held as an unreferenced object and has a duration set to 1200ms 5.) A final inline object sends a 0 to the parallel port. I have tried this and it all seems to work perfectly. INLINE2 CODE: Dim nStartTime As Long nStartTime = Slide1.OnsetTime Dim nImageTime As Long nImageTime = nStartTime + 2500 Dim boolImageShown As Boolean Dim nDrawTime As Long Dim nTriggerTime As Long 'This checks to see if it is time to put up the image. Do While Slide1.InputMasks.IsPending() If Clock.Read >= nImageTime And boolImageShown = False Then 'cnvs.Copy offScreenCnvs, src, dest Display.WaitForVerticalBlank ImageDisplay1.Draw nDrawTime = Clock.Read - nStartTime boolImageShown = True End If Loop If slide1.resp = "" then writeport &H378, 5 nTriggerTime = Clock.Read else writeport &H378, slide1.resp nTriggerTime = Clock.Read end if 'This checks to see if it is time to put up the image if the subject replied before the image 'was displayed. Do While Clock.Read < nStartTime + 3700 If Clock.Read >= nImageTime And boolImageShown = False Then 'cnvs.Copy offScreenCnvs, src, dest Display.WaitForVerticalBlank ImageDisplay1.Draw nDrawTime = Clock.Read - nStartTime boolImageShown = True End If Loop If slide1.resp = c.getattrib ("cr1") or slide1.resp = c.getattrib ("cr2") or slide1.resp = c.getattrib ("cr3") then slide1.acc = 1 end if 'Save the trigger time and the time that ImageDisplay1 was drawn as an attribute relative to the 'onset of Slide1 c.SetAttrib "TriggerSendTime", nTriggerTime c.SetAttrib "ImageDrawTime", nDrawTime 'Debug.Print "Slide: " & Slide1.OnsetTime & ebTab & "Trigger: " & nTriggerTime & ebTab & "RTTime: " & Slide1.RTTime & ebTab & "Image: " & nImageShowTime -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Mon Jan 10 02:00:06 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Sun, 9 Jan 2011 18:00:06 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) Message-ID: Hello, I have learned so much about E-Prime through this group and through butting my head against E-Prime's metaphorical wall (i.e. scripting). It is now time for me to post a question. *My experiment:* This memory experiment asks participants to study a list of pictures. At test, they are presented with both the pictures they just studied and new pictures. Their job is to discriminate between studied and non-studied pictures (e.g. "Was this old or new?"). In this experiment, there are 5 such study-test blocks. My manipulation is to use five different payoff matrices which correspond to the five study-test blocks. Each study-test block (and thus, each payoff matrix) will be presented in random order to each new participant. *My question:* I am trying to create a feedback counter to present to participants after each trial. I can do it, but my script requires many nested "If...Then" statements and "Select Case" statements. The reason for this is because of the following: 1) I have two experiment startup conditions. I have an "Old New" Condition and a "PDP" condition (not important what these actually mean). As a result, I also have two different SlideObjects (TestSlideOLDNEW and TestSlide) that correspond to each condition. The TestSlide objects collect trial responses. 2) I have 5 different "Payoff Matrix" conditions (I call them A, B, C, D, and E). 3) I need to assign different 'points' to each correct and incorrect response. 4) For each correct and incorrect response, I need to assign different point values based on the type of picture presented (e.g. old/studied or new/non-studied). This corresponds to Hits, Misses, False Alarms, and Correct Rejections. I will try to explain what I have in the following script: ********************************************************************************************************************** *********************************************************************************************************************** 'This If...Then statement refers to (1) above If c.getattrib ("TestType") = "OldNew" then Select Case MasterList.getattrib ("Payoff") ' This refers to the five different Payoff Matrices Case "A" 'First payoff matrix If MasterList.getattrib ("StatusOldNew") = "Old" then If TestSlideOLDNEW.ACC = 1 then 'Hit Rate AccuracyDisplay = AccuracyDisplay+1 'counter c.setattrib "Accuracy", AccuracyDisplay 'Sets Accuracy attribute so that I can display up-to-date point system per trial Elseif TestSlideOLDNEW.ACC = 0 then 'Miss Accuracy Display = AccuracyDisplay-1 c.setattrib "Accuracy", AccuracyDisplay Else MsgBox "Conservative A condition payoff matrix error Status Old" End if Elseif MasterList.getattrib("StatusOldNew") = "New" then If TestSlideOLDNEW.ACC = 1 then 'Correct Rejection AccuracyDisplay = AccuracyDisplay+5 c.setattrib "Accuracy", AccuracyDisplay Elseif TestSlideOLDNEW.ACC = 0 then ' False Alarm AccuracyDisplay = AccuracyDisplay-5 c.setattrib "Accuracy", AccuracyDisplay Else MsgBox "Conservative A condition payoff matrix error Status New" End if Else MsgBox "StatusOLDNEW payoff matrix error" Case "B" . . . Case "E" Elseif c.getattrib("TestType") = "PDP" then Select Case......... . . . *********************************************************************************************************************** *********************************************************************************************************************** You can see that much of my script seems redundant, but I cannot figure out how to condense the script any further. I am familiar with For...Next loops, SubRoutines, Arrays, If...Then, IIf, and Select...Case functions as I've read the E-Basic help on these functions and used them in the past. However, my personal experience with Subroutines and Arrays is limited, but I understand them enough to have been able to use them in the past effectively. The solutions I've thought of merely require rearranging everything in IIF, If...Then, or Select...case functions, but this seems like a rather unnecessary rearrangement. I've also thought of declaring an array so that I can just add values to the counter within a For...Next loop, but this also seems unnecessary because I could just as easily input the actual integer values. Therefore, my question is, how can I condense this script further? I will continue to try to innovate, but I would also like to hear any comments/suggestions that any of you might have. I plan to post my (hopefully, elegant) solution once I reach it. If anything seems unclear, please let me know. Thank you! Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbzgtfan4ever at gmail.com Mon Jan 10 02:44:38 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Sun, 9 Jan 2011 18:44:38 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <5557192.1261.1294624806779.JavaMail.geo-discussion-forums@prie35> Message-ID: Please note that there are two errors within my posted script. The first error is "Accuracy Display" should be "AccuracyDisplay" 9 lines down. The second error is that I left off an "End If" statement after "Else MsgBox "StatusOLDNEW payoff matrix error"" Thank you. Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Mon Jan 10 19:32:47 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 10 Jan 2011 14:32:47 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <5557192.1261.1294624806779.JavaMail.geo-discussion-forums@ prie35> Message-ID: Caleb, I commend you for taking an interest in improving your code, instead of simply settling for the first bit of code that gives the appearnce of working (and which almost always fails on close inspection). I hope my comments below don't seem too harsh, if so just consider that they come from a grouchy old man. First, some style issues -- Your code appeared in my e-mail reader with indentations of *12* spaces! That is *way* too much indentation, it makes the code quickly run off the edge of the screen and makes it unreadable. Please learn to use the well-documented industry standard indentation of 4 spaces. Also, *please* resist the urge to double-space your code, that only reduces how much of your code will fit into view on my screen and does nothing to aid understanding. I had to take your code into my own text editor and edit it down to make it readable, do not expect me to do that again. Now, a few comments on the code itself. First, I wonder if you really need two different Slide objects? If they perform essentially the same function only with different content, then I would just use one Slide and change the content using attribute references. That could simplify the code right there. Next, ignoring the MsgBox statements, it seems to me that all that changes in the various conditions is the number of points by which AccuracyDisplay changes. In that case, I would use a variable to hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" AccuracyDisplay), so that the calculation becomes merely AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay Yes, you might still need a mess of code to compute dAccuracyDisplay, but I like to separate the mess that computes dAccuracyDisplay from the operation that actually uses it, I find such separation aids my comprehension. Next, once I have graduated to using a variable (instead of literal values) in the computation, I would consider using a multi-dimensional array to hold a table of the possible point values, and use numeric codes that will act as indices into the table for each condition. E.g., I might use 0 instead of "OldNew" for that TestType, 0 instead of "Old" for that StatusOldNew, etc. This admitedly adds a bit of indirection, but indirection that will could greatly simplify our computation. I would of course still need some code to set up the table at the start of the session, but with that done my computaton during the run might reduce to a single line, e.g., AccuracyDisplay = AccuracyDisplay + PointTable( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) But I have probably missed something really obvious, so I hope someone else here will chime in and set me straight. One more style point, then a homework assignment. Of course, it is good practice to end every Select Case with a Case Else to catch unforeseen cases, e.g., Case Else MsgBox "Invalid option." I trust you left this out of your example simply because it was not germane to your question. And now your homework: Work through Chapter 4, "Using E-Basic", of the User's Guide that came with E-Prime, and study any edition of "VBA for Dummies" (still available at Amazon.com, get a used copy). Regards, -- David McFarlane, Professional Faultfinder "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman, Nobel prize-winning physicist) At 1/9/2011 09:00 PM Sunday, you wrote: > I have learned so much about E-Prime through this group and > through butting my head against E-Prime's metaphorical wall (i.e. > scripting). It is now time for me to post a question. > > My experiment: > > This memory experiment asks participants to study a list of > pictures. At test, they are presented with both the pictures they > just studied and new pictures. Their job is to discriminate > between studied and non-studied pictures (e.g. "Was this old or > new?"). In this experiment, there are 5 such study-test > blocks. My manipulation is to use five different payoff matrices > which correspond to the five study-test blocks. Each study-test > block (and thus, each payoff matrix) will be presented in random > order to each new participant. > > My question: > > I am trying to create a feedback counter to present to > participants after each trial. I can do it, but my script requires > many nested "If...Then" statements and "Select Case" > statements. The reason for this is because of the following: > > 1) I have two experiment startup conditions. I have an "Old New" > Condition and a "PDP" condition (not important what these actually > mean). As a result, I also have two different SlideObjects > (TestSlideOLDNEW and TestSlide) that correspond to each > condition. The TestSlide objects collect trial responses. > >2) I have 5 different "Payoff Matrix" conditions (I call them A, B, >C, D, and E). > >3) I need to assign different 'points' to each correct and incorrect response. > >4) For each correct and incorrect response, I need to assign >different point values based on the type of picture presented (e.g. >old/studied or new/non-studied). This corresponds to Hits, Misses, >False Alarms, and Correct Rejections. > > I will try to explain what I have in the following script: > > >********************************************************************************************************************** > >*********************************************************************************************************************** > >'This If...Then statement refers to (1) above > >If c.getattrib ("TestType") = "OldNew" then > >Select Case MasterList.getattrib ("Payoff") ' This refers to the >five different Payoff Matrices > > Case "A" 'First payoff matrix > > If MasterList.getattrib ("StatusOldNew") = "Old" then > > If TestSlideOLDNEW.ACC = 1 then 'Hit Rate > > AccuracyDisplay = > AccuracyDisplay+1 'counter > > c.setattrib > "Accuracy", AccuracyDisplay 'Sets Accuracy attribute so that I can > display up-to-date point system per trial > > Elseif TestSlideOLDNEW.ACC = 0 then 'Miss > > Accuracy Display = > AccuracyDisplay-1 > > c.setattrib > "Accuracy", AccuracyDisplay > > Else MsgBox "Conservative A > condition payoff matrix error Status Old" > > End if > > Elseif MasterList.getattrib("StatusOldNew") > = "New" then > > If TestSlideOLDNEW.ACC = 1 then > 'Correct Rejection > > AccuracyDisplay = > AccuracyDisplay+5 > > c.setattrib > "Accuracy", AccuracyDisplay > > Elseif TestSlideOLDNEW.ACC = 0 > then ' False Alarm > > AccuracyDisplay = > AccuracyDisplay-5 > > c.setattrib > "Accuracy", AccuracyDisplay > > Else MsgBox "Conservative A > condition payoff matrix error Status New" > > End if > > Else MsgBox "StatusOLDNEW payoff matrix error" > > Case "B" > >. > >. > >. > >Case "E" > > > >Elseif c.getattrib("TestType") = "PDP" then > > Select Case......... > >. > >. > >. > >*********************************************************************************************************************** > >*********************************************************************************************************************** > >You can see that much of my script seems redundant, but I cannot >figure out how to condense the script any further. I am familiar >with For...Next loops, SubRoutines, Arrays, If...Then, IIf, and >Select...Case functions as I've read the E-Basic help on these >functions and used them in the past. However, my personal >experience with Subroutines and Arrays is limited, but I understand >them enough to have been able to use them in the past >effectively. The solutions I've thought of merely require >rearranging everything in IIF, If...Then, or Select...case >functions, but this seems like a rather unnecessary >rearrangement. I've also thought of declaring an array so that I >can just add values to the counter within a For...Next loop, but >this also seems unnecessary because I could just as easily input the >actual integer values. > >Therefore, my question is, how can I condense this script >further? I will continue to try to innovate, but I would also like >to hear any comments/suggestions that any of you might have. I plan >to post my (hopefully, elegant) solution once I reach it. > >If anything seems unclear, please let me know. > >Thank you! > >Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 07:46:21 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Mon, 10 Jan 2011 23:46:21 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2b5f1a.4972e70a.512e.ffffb908SMTPIN_ADDED@gmr-mx.google.com> Message-ID: David, Thank you for your amazing advice. Please see below as I still have more questions. Also, if you keep reading past this, I will show you another solution I came to. I really really hope that this formatting thing has been fixed. I'm so sorry if it hasn't as this is a long reply and I spent a good 20 minutes trying to make the formatting to your specifications. Caleb On Monday, January 10, 2011 11:32:47 AM UTC-8, dkmcf wrote: Caleb, I commend you for taking an interest in improving your code, instead of simply settling for the first bit of code that gives the appearnce of working (and which almost always fails on close inspection). I hope my comments below don't seem too harsh, if so just consider that they come from a grouchy old man. Thank you. I appreciate constructive criticism. First, some style issues -- Your code appeared in my e-mail reader with indentations of *12* spaces! That is *way* too much indentation, it makes the code quickly run off the edge of the screen and makes it unreadable. Please learn to use the well-documented industry standard indentation of 4 spaces. Also, *please* resist the urge to double-space your code, that only reduces how much of your code will fit into view on my screen and does nothing to aid understanding. I had to take your code into my own text editor and edit it down to make it readable, do not expect me to do that again. This only happened because I had copied and pasted my post into Word in order to save a draft as I was typing so that in case I lost my post, I could retrieve it. This may have happened again. I'm sorry that Google Groups isn't so friendly with this. Now, a few comments on the code itself. First, I wonder if you really need two different Slide objects? If they perform essentially the same function only with different content, then I would just use one Slide and change the content using attribute references. That could simplify the code right there. I took your advice and basically created script that changed the slide based upon the Test Type condition. This necessarily reduced the amount of code by half (and for your Array example, it decreases the array by one dimension). Next, ignoring the MsgBox statements, it seems to me that all that changes in the various conditions is the number of points by which AccuracyDisplay changes. In that case, I would use a variable to hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" AccuracyDisplay), so that the calculation becomes merely AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay Yes, you might still need a mess of code to compute dAccuracyDisplay, but I like to separate the mess that computes dAccuracyDisplay from the operation that actually uses it, I find such separation aids my comprehension. I was not quite sure what you meant by this. From my understanding, I would declare a new variable "dAccuracyDisplay". dAccuracyDisplay would equal the change in point value between my Payoff conditions. For example, in Condition "A", let's say that for a Hit, the participant would receive 1 point and for a Correct rejection, the participant would receive 5 points. In Condition "B", Hit = 2 points; CR = 4 points. Thus, dAccuracyDisplay = 2-1; 5-4. The change in points would thus be 1 between A and B. This is my actual point system, by the way. Hit points increase by 1 each time and CR points decrease by 1 (from A to E). In this scenario, I'm not sure how to implement this variable because it seems unnecessary. Something like: ************************************************************************************************************ Dim dAccuracyDisplay as Integer ' Represents change in points between payoff conditions Select Case c.getattrib ("Payoff") Case "A" dAccuracyDisplay=AccuracyDisplay+1 If c.getattrib("StatusOldNew")="Old" then If TestSlideOLDNEW.ACC = 1 then AccuracyDisplay=dAccuracyDisplay . . . Case "B" . . dAccuracyDisplay=AccuracyDisplay+2 ******************************************************************************* Doesn't doing this defeat the purpose of using a variable in the first place? Next, once I have graduated to using a variable (instead of literal values) in the computation, I would consider using a multi-dimensional array to hold a table of the possible point values, and use numeric codes that will act as indices into the table for each condition. E.g., I might use 0 instead of "OldNew" for that TestType, 0 instead of "Old" for that StatusOldNew, etc. This admitedly adds a bit of indirection, but indirection that will could greatly simplify our computation. I would of course still need some code to set up the table at the start of the session, but with that done my computaton during the run might reduce to a single line, e.g., AccuracyDisplay = AccuracyDisplay + PointTable( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) But I have probably missed something really obvious, so I hope someone else here will chime in and set me straight. Okay. This is where I get really confused. I understand that a multidimensional array can hold different values within each dimension (I did look over the VBA for Dummies Chapter on Arrays and Collections - Google Books). If I understand you correctly, you are saying that I should create such an array with three dimensions. The first dimension is my Test Type, the second is StatusOldNew, and the third is TestSlide.ACC. I should code each dimension with all of the possible values as integers. So for example, for TestType dimension: 1 = "oldnew" and 0 = "PDP". This coding system can then be called upon later in the script (like you gave in your example). I get confused on how to set this up and implement it, but I think I understand it conceptually. For example (this is what I understand): ********************************************************************************** dim PointSystem(1,1,1) as variant 'do this for each of the other attributes (e.g. StatusOldNew) if c.getattrib("TestType") = "OldNew" then c.setattrib("TestType"), "0" Elseif c.getattrib("TestType") = "PDP" then c.setattrib("TestType"), "1" Else MsgBox "TestType attribute set error" End if 'I would set this to the actual and proper point values PointSystem(0,0 ,0 ) = 1 PointSystem(0 ,1,0 ) = 2 PointSystem( 0,0 ,1) = 3 . . . PointSystem(1,1,1,) = 5 'Then I would use your example and all I would need is this one line. AccuracyDisplay = AccuracyDisplay + PointSystem( _ CInt(c.getattrib ("TestType")), _ CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) ********************************************************************************* The solution I came to: I added two attributes to my MasterList List object: Points_HR and Points_CR. For each trial, I input the proper point values. Then, for my payoff matrix, I simply referenced these point values. Script: ************************************************************************** Select Case TestSlideOLDNEW.ACC Case "1" If c.getattrib("StatusOldNew") = "Old" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits Elseif c.getattrib("StatusOldNew") = "New" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct Rejection Else MsgBox "Accuracy display case 1 error" End if c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") Case "0" AccuracyDisplay=AccuracyDisplay c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Incorrect Accuracy: " & c.getattrib("Accuracy") Case Else MsgBox "TestSlideOLDNEW Accuracy Error" End Select *********************************************************************************** Please also note that I am actually not deducting points anymore for incorrect answers so I do not need a counter for Misses and False Alarms. Although this is one solution I reached, I still want to understand what you meant by your suggestions. Once again, thank you! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 07:47:48 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Mon, 10 Jan 2011 23:47:48 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <73ef9451-2ede-4ab7-81ad-77113a419b0c@k13g2000vbq.googlegroups.com> Message-ID: Let me try to repost my solution at end of page below. Select Case TestSlideOLDNEW.ACC Case "1" If c.getattrib("StatusOldNew") = "Old" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits Elseif c.getattrib("StatusOldNew") = "New" then AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct Rejection Else MsgBox "Accuracy display case 1 error" End if c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") Case "0" AccuracyDisplay=AccuracyDisplay c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if Debug.Print "Debug Incorrect Accuracy: " & c.getattrib("Accuracy") Case Else MsgBox "TestSlideOLDNEW Accuracy Error" End Select Once again, sorry. Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.bernhardsson at gmail.com Tue Jan 11 16:39:10 2011 From: jens.bernhardsson at gmail.com (jens) Date: Tue, 11 Jan 2011 08:39:10 -0800 Subject: Repeat command blocks Message-ID: Hello Does anyone have an idea on how to repeat a block of commands a number of times? I have gone through the E-Basic but I can't get the Do...Loop or For...Next commands to work for me. Example: IF c.getAttrib("bet") = 1 THEN WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 *repeat 5 times ELSEIF c.getAttrib("bet") = 2 THEN WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 *repeat 5 times END IF -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From Michiel.Spape at nottingham.ac.uk Tue Jan 11 16:58:21 2011 From: Michiel.Spape at nottingham.ac.uk (Michiel Spape) Date: Tue, 11 Jan 2011 16:58:21 +0000 Subject: Repeat command blocks In-Reply-To: <1b3c05c4-cc32-4994-b282-9a31c9b75ff5@p8g2000vbs.googlegroups.com> Message-ID: Ha, Sorry to other people whom I haven't replied to yet. I saw loads of code and my flu told my brain that I shouldn't bother. Perhaps the flu is rampant at the PST headquarters too? Anyway, this however, we have sorted out quickly. DIM I as INTEGER IF c.GetAttrib("bet") = 1 THEN FOR I = 1 to 5 WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 NEXT I 'thus repeats 5 times ELSE FOR I = 1 to 5 WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 NEXT I 'thus repeats 5 times END IF There's prettier ways to code this, such as Dim I as integer FOR I = 1 to 5 WritePort &H378,64 sleep cInt(c.GetAttrib ("bet")) * 5 WritePort &H378,0 sleep cInt(c.GetAttrib ("bet")) * 5 NEXT I 'thus repeats 5 times NEXT I But one might question the soundness of why you'd want this in the first place, but there you go. (as an aside to David: I'm going for tab indentation, you can see windows has set that to 6 spaces, but I'm addicted to emacs style tab indentation) Cheers, Mich Michiel Spap? Research Fellow Perception & Action group University of Nottingham School of Psychology www.cognitology.eu -----Original Message----- From: e-prime at googlegroups.com [mailto:e-prime at googlegroups.com] On Behalf Of jens Sent: 11 January 2011 16:39 To: E-Prime Subject: Repeat command blocks Hello Does anyone have an idea on how to repeat a block of commands a number of times? I have gone through the E-Basic but I can't get the Do...Loop or For...Next commands to work for me. Example: IF c.getAttrib("bet") = 1 THEN WritePort &H378,64 sleep 5 WritePort &H378,0 sleep 5 *repeat 5 times ELSEIF c.getAttrib("bet") = 2 THEN WritePort &H378,64 sleep 10 WritePort &H378,0 sleep 10 *repeat 5 times END IF -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham. This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 11 17:02:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 12:02:33 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <73ef9451-2ede-4ab7-81ad-77113a419b0c@k13g2000vbq.googlegro ups.com> Message-ID: Caleb, First the punchline: What I had in mind was that you might do this with no If..Then or Select Case at all. Further comments in line below... At 1/11/2011 02:46 AM Tuesday, you wrote: >David, >Thank you for your amazing advice. Please see below as I still have >more questions. Also, if you keep reading past this, I will show you >another solution I came to. I really really hope that this formatting >thing has been fixed. I'm so sorry if it hasn't as this is a long >reply and I spent a good 20 minutes trying to make the formatting to >your specifications. > >Caleb > >On Monday, January 10, 2011 11:32:47 AM UTC-8, dkmcf wrote: >Caleb, >I commend you for taking an interest in improving your code, instead >of simply settling for the first bit of code that gives the appearnce >of working (and which almost always fails on close inspection). I >hope my comments below don't seem too harsh, if so just consider that >they come from a grouchy old man. > >Thank you. I appreciate constructive criticism. > >First, some style issues -- Your code appeared in my e-mail reader >with indentations of *12* spaces! That is *way* too much >indentation, it makes the code quickly run off the edge of the screen >and makes it unreadable. Please learn to use the well-documented >industry standard indentation of 4 spaces. Also, *please* resist the >urge to double-space your code, that only reduces how much of your >code will fit into view on my screen and does nothing to aid >understanding. I had to take your code into my own text editor and >edit it down to make it readable, do not expect me to do that again. > >This only happened because I had copied and pasted my post into Word >in order to save a draft as I was typing so that in case I lost my >post, I could retrieve it. This may have happened again. I'm sorry >that Google Groups isn't so friendly with this. This is why I edit my code in a professional text-editing program. I like EditPadPro (http://www.editpadpro.com/ ), which you can get for $50 or use the trial version for free, or you can find other programs out there. Many of these, including EditPadPro even do syntax highlighting for you, and with some tweaks it will properly highlight syntax for VBA and E-Basic. I regular pull my E-Basic code into EditPadPro for editing, documentation, and printout, then copy & paste it back into E-Studio as needed, it is so much better than editing in E-Studio. (BTW, I am not just making up the "indent four spaces" convention -- lore has it that long ago a university study found that this was the optimal indentation for program code, but I can't find the reference offhand. In any case, you can search the web and find lots of debates over these fine points.) >Now, a few comments on the code itself. First, I wonder if you >really need two different Slide objects? If they perform essentially >the same function only with different content, then I would just use >one Slide and change the content using attribute references. That >could simplify the code right there. > >I took your advice and basically created script that changed the slide >based upon the Test Type condition. This necessarily reduced the >amount of code by half (and for your Array example, it decreases the >array by one dimension). Cool. Glad that suggestion did some good. >Next, ignoring the MsgBox statements, it seems to me that all that >changes in the various conditions is the number of points by which >AccuracyDisplay changes. In that case, I would use a variable to >hold the change amount, e.g., dAccuracyDisplay (i.e., "delta" >AccuracyDisplay), so that the calculation becomes merely > >AccuracyDisplay = AccuracyDisplay + dAccuracyDisplay > >Yes, you might still need a mess of code to compute dAccuracyDisplay, >but I like to separate the mess that computes dAccuracyDisplay from >the operation that actually uses it, I find such separation aids my >comprehension. > >I was not quite sure what you meant by this. From my understanding, I >would declare a new variable "dAccuracyDisplay". dAccuracyDisplay >would equal the change in point value between my Payoff conditions. >For example, in Condition "A", let's say that for a Hit, the >participant would receive 1 point and for a Correct rejection, the >participant would receive 5 points. In Condition "B", Hit = 2 points; >CR = 4 points. Thus, dAccuracyDisplay = 2-1; 5-4. The change in >points would thus be 1 between A and B. This is my actual point >system, by the way. Hit points increase by 1 each time and CR points >decrease by 1 (from A to E). In this scenario, I'm not sure how to >implement this variable because it seems unnecessary. > >Something like: >************************************************************************************************************ >Dim dAccuracyDisplay as Integer ' Represents change in points between >payoff conditions > Select Case c.getattrib ("Payoff") > Case "A" > dAccuracyDisplay=AccuracyDisplay+1 > If c.getattrib("StatusOldNew")="Old" then > If TestSlideOLDNEW.ACC = 1 then > AccuracyDisplay=dAccuracyDisplay >. >. >. > Case "B" > . > . > dAccuracyDisplay=AccuracyDisplay+2 >******************************************************************************* >Doesn't doing this defeat the purpose of using a variable in the first >place? Depends on the purpose of using the variable. Here, for the purpose of clarity (paving the way to further code improvement), I merely meant to separate the "what" from the "how much", even if it meant adding an extra line or two of code. Here the "what" means "sum something into the AccuracyDisplay", and the "how much" means how much to sum into the AccuracyDisplay. Your code combines those two conceptually separate ideas, and sometime I find it helps to separate these. It is the difference between If in Michigan go to Meijer and buy milk Else if in Alabama go to Winn Dixie and buy milk Else if in Connecticut go to A&P and buy milk ... and If in Michigan go to Meijer Else if in Alabama go to Winn Dixie Else if in Connecticut go to A&P ... Wherever you end up, now buy milk So I guess it is still largely a matter of taste & style. And admittedly, at another time I might have advised exactly the opposite, but in this case, just making the mental leap of separating "what" from "how much" then prepares us for the next steps... >Next, once I have graduated to using a variable (instead of literal >values) in the computation, I would consider using a >multi-dimensional array to hold a table of the possible point values, >and use numeric codes that will act as indices into the table for >each condition. E.g., I might use 0 instead of "OldNew" for that >TestType, 0 instead of "Old" for that StatusOldNew, etc. This >admitedly adds a bit of indirection, but indirection that will could >greatly simplify our computation. I would of course still need some >code to set up the table at the start of the session, but with that >done my computaton during the run might reduce to a single line, e.g., > >AccuracyDisplay = AccuracyDisplay + PointTable( _ > CInt(c.getattrib ("TestType")), _ > CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) > >But I have probably missed something really obvious, so I hope >someone else here will chime in and set me straight. > >Okay. This is where I get really confused. I understand that a >multidimensional array can hold different values within each dimension >(I did look over the VBA for Dummies Chapter on Arrays and Collections >- Google Books). If I understand you correctly, you are saying that I >should create such an array with three dimensions. The first >dimension is my Test Type, the second is StatusOldNew, and the third >is TestSlide.ACC. That is pretty much correct, but just to express this accurately, each element of the array would hold the point value for that combination of TestType, StatusOldNew, and Accuracy. So, PointSystem( 0, 0, 0 ) would hold the number of points for the case of, say, TestType = OldNew, StatusOldNew = Old, and Accuracy = 0 (e.g., 0 points), and PointSystem( 0, 0, 1 ) would hold the number of points for the case of, say, TestType = OldNew, StatusOldNew = Old, and Accuracy = 1, etc. (e.g., 5 points), much as you show below. > I should code each dimension with all of the >possible values as integers. So for example, for TestType dimension: >1 = "oldnew" and 0 = "PDP". This coding system can then be called >upon later in the script (like you gave in your example). I get >confused on how to set this up and implement it, but I think I >understand it conceptually. > For example (this is what I understand): >********************************************************************************** >dim PointSystem(1,1,1) as variant > >'do this for each of the other attributes (e.g. StatusOldNew) >if c.getattrib("TestType") = "OldNew" then > c.setattrib("TestType"), "0" >Elseif c.getattrib("TestType") = "PDP" then > c.setattrib("TestType"), "1" >Else > MsgBox "TestType attribute set error" >End if [For the sake of others who might stumble across this, I will just correct the syntax of this code a little, should read >if c.getattrib("TestType") = "OldNew" then > c.setattrib "TestType", "0" >Elseif c.getattrib("TestType") = "PDP" then > c.setattrib "TestType", "1" >Else > MsgBox "TestType attribute set error" >End if ] >'I would set this to the actual and proper point values >PointSystem(0,0 ,0 ) = 1 >PointSystem(0 ,1,0 ) = 2 >PointSystem( 0,0 ,1) = 3 >. >. >. >PointSystem(1,1,1,) = 5 > >'Then I would use your example and all I would need is this one line. >AccuracyDisplay = AccuracyDisplay + PointSystem( _ > CInt(c.getattrib ("TestType")), _ > CInt(MasterList.getattrib("StatusOldNew")), TestSlide.ACC ) >********************************************************************************* I think that is pretty close to what I had in mind, except that instead of using the If..Then..ElseIf to reassign the TestType index values, I would just go directly to whereever TestType gets defined in the first place (your Startup Info, or some List or c.SetAttrib, etc.) and put my index values there. >The solution I came to: > >I added two attributes to my MasterList List object: Points_HR and >Points_CR. For each trial, I input the proper point values. Then, >for my payoff matrix, I simply referenced these point values. > >Script: >************************************************************************** >Select Case TestSlideOLDNEW.ACC > Case "1" > If c.getattrib("StatusOldNew") = "Old" then > >AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_HR"))'Hits > Elseif c.getattrib("StatusOldNew") = "New" then > >AccuracyDisplay=AccuracyDisplay+(c.getattrib("Points_CR"))'Correct >Rejection > Else MsgBox "Accuracy display case 1 error" > End if > c.setattrib "Accuracy", AccuracyDisplay > Set x = >CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) > If Not x Is Nothing Then > x.Text = "Running Total: " & c.getattrib("Accuracy") > End if > Debug.Print "Debug Points_HR: " & c.getattrib("Accuracy") > Case "0" > AccuracyDisplay=AccuracyDisplay > c.setattrib "Accuracy", AccuracyDisplay > Set x = >CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) > If Not x Is Nothing Then > x.Text = "Running Total: " & c.getattrib("Accuracy") > End if > Debug.Print "Debug Incorrect Accuracy: " & > c.getattrib("Accuracy") > Case Else > MsgBox "TestSlideOLDNEW Accuracy Error" >End Select >*********************************************************************************** >Please also note that I am actually not deducting points anymore for >incorrect answers so I do not need a counter for Misses and False >Alarms. > >Although this is one solution I reached, I still want to understand >what you meant by your suggestions. Once again, thank you! I hope I made things a little clearer. Of course, I am assuming that your point system remains static, if it becomes dynamic then you could not use the array method. And sometimes you really do have to settle for a cascade of If..Then and Select Case statements, and then sometimes just applying some theorems from Boolean logic will help to simplify this. And for no particular reason, I will take this opportunity to close with my previously unpublished "Heirarchy of Goals for Excellent Programs": 1) Works correctly (i.e., free of errors). 2) Works soon enough to be of use -- an ugly program that works now is better than a beautiful program that works too late to be of use. 3) Efficiently uses time and resources. 4) Source code is readable, understandable, clear. 5) Source code is beautiful. Personally, I find my quest to achieve goal #5 often interferes with meeting the higher-priority goal #2, which is why I wrote this up as a reminder to myself. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 11 19:44:43 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 14:44:43 -0500 Subject: Indents, spaces, and tabs Message-ID: [Continued from "Repeat command blocks" (http://groups.google.com/group/e-prime/browse_thread/thread/828df2e990ee7270 )] At 1/11/2011 11:58 AM Tuesday, Michiel Spape wrote: >Sorry to other people whom I haven't replied to yet. I saw loads of >code and my flu told my brain that I shouldn't bother. Sorry to hear you were ill, I missed you (was hoping you would have better advice for a few folks here). Glad to have you back. >(as an aside to David: I'm going for tab indentation, you can see >windows has set that to 6 spaces, but I'm addicted to emacs style >tab indentation) I'll take tab indentation. That does have the virtue that in many environments everybody can adjust the tab size in their viewing program as desired (and it also results in slightly smaller file sizes). In fact, because E-Studio uses a tab size of 4, I just go ahead and use tabs there. But outside of E-Studio I like to use spaces in place of tabs, that way I never have to fuss with setting tab stops when I move from viewer to viewer (as long as the viewer honors strings of spaces, which many HTML-oriented viewers do not). It also means that I impose my will upon other readers. I could also accept a tab size of 6, but probably no larger. When I started with Pascal I tried using 2 spaces, and found that too small for my tastes, then tried other sizes until I read of a study that claimed to find the "optimum" (whatever that is) tab size is 4, and I have found that works for me. But 12 was really way too much. Cheers, -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Tue Jan 11 20:45:43 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 12:45:43 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2c8d44.01e72a0a.5dc9.3a40SMTPIN_ADDED@gmr-mx.google.com> Message-ID: David, Thank you so much for your advice! My programming tends to lean toward your "Hierarchy of Goals". I agree that 1-3 of most value to any scientist, but achieving these goals should still never fully negate goals 4 and 5. This is because goals 4 and 5 could necessarily lead to future achievement of goals 1-3! It is for this reason that I posted on this group in the first place. I want to make a final comment on your "dAccuracyDisplay" reply. When you talk about separating the "how much" from the "why", you mean to say that this is good practice, correct? This is good practice because it allows you to think more lucidly within the moment. For example, if the code representing these concepts were muddled/mixed, then it might be more difficult to change/diagnose any problems that arise from said code. However, if these codes were separate, it makes it easier to pinpoint the problem. If this is correct, then I understand what you mean. Writing code is like writing a story, you have an object/character that has a goal. The code itself is how the character achieves that goal. Therefore, writing good code is like writing a clear, easy-to-understand story. Although it can be achieved, it just takes practice and diligence. Thank you, Caleb -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Tue Jan 11 21:15:36 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 11 Jan 2011 16:15:36 -0500 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <30196654.985.1294778743283.JavaMail.geo-discussion-forums@ vbi8> Message-ID: Caleb, >David, > >Thank you so much for your advice! My programming tends to lean >toward your "Hierarchy of Goals". I agree that 1-3 of most value to >any scientist, but achieving these goals should still never fully >negate goals 4 and 5. This is because goals 4 and 5 could >necessarily lead to future achievement of goals 1-3! It is for this >reason that I posted on this group in the first place. > >I want to make a final comment on your "dAccuracyDisplay" >reply. When you talk about separating the "how much" from the >"why", you mean to say that this is good practice, correct? "Good practice" is a litlte stronger than I meant. I only meant that in many cases it helps to separate the concepts, and I felt this might be one of those cases. The rest of your comments still follow well. Programming is very much an "art", and requires a fair amount of judgment and sometimes even imagination, and as in a good story, different storytelling styles may each have different benefits and shortcomings. > This is good practice because it allows you to think more lucidly > within the moment. For example, if the code representing these > concepts were muddled/mixed, then it might be more difficult to > change/diagnose any problems that arise from said code. However, > if these codes were separate, it makes it easier to pinpoint the > problem. If this is correct, then I understand what you > mean. Writing code is like writing a story, you have an > object/character that has a goal. The code itself is how the > character achieves that goal. Therefore, writing good code is like > writing a clear, easy-to-understand story. Although it can be > achieved, it just takes practice and diligence. > >Thank you, > >Caleb -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From nitz.david at googlemail.com Tue Jan 11 23:16:34 2011 From: nitz.david at googlemail.com (Dave) Date: Tue, 11 Jan 2011 15:16:34 -0800 Subject: Indents, spaces, and tabs In-Reply-To: <4d2cb32f.9915e70a.2b74.ffffd7a8SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Re. that study, my bet is on Miara et al. (1983), abstract reproduced here: http://wiki.inkscape.org/wiki/index.php/ProgramIndention -David On Jan 11, 8:44?pm, David McFarlane wrote: > [Continued from "Repeat command blocks" > (http://groups.google.com/group/e-prime/browse_thread/thread/828df2e99... > )] > > At 1/11/2011 11:58 AM Tuesday, Michiel Spape wrote: > > >Sorry to other people whom I haven't replied to yet. I saw loads of > >code and my flu told my brain that I shouldn't bother. > > Sorry to hear you were ill, I missed you (was hoping you would have > better advice for a few folks here). ?Glad to have you back. > > >(as an aside to David: I'm going for tab indentation, you can see > >windows has set that to 6 spaces, but I'm addicted to emacs style > >tab indentation) > > I'll take tab indentation. ?That does have the virtue that in many > environments everybody can adjust the tab size in their viewing > program as desired (and it also results in slightly smaller file > sizes). ?In fact, because E-Studio uses a tab size of 4, I just go > ahead and use tabs there. ?But outside of E-Studio I like to use > spaces in place of tabs, that way I never have to fuss with setting > tab stops when I move from viewer to viewer (as long as the viewer > honors strings of spaces, which many HTML-oriented viewers do > not). ?It also means that I impose my will upon other readers. > > I could also accept a tab size of 6, but probably no larger. ?When I > started with Pascal I tried using 2 spaces, and found that too small > for my tastes, then tried other sizes until I read of a study that > claimed to find the "optimum" (whatever that is) tab size is 4, and I > have found that works for me. ?But 12 was really way too much. > > Cheers, > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Wed Jan 12 02:02:27 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 18:02:27 -0800 Subject: Change the SlideObject Correct Response based on Attribute Message-ID: Hello all, I would just like to post a solution to this problem because I had difficulty finding it. Just to clarify, the problem is this. You have a slide object that collects input responses (e.g. TestSlide) with allowable response 'F' and 'J'. Based on your List object (this presumably houses your stimuli and the correct responses), you have an attribute for correct responses (let's say "CorrectResp"). However, now let's say you have two similar experiments with two different Correct Responses. In your List object, you might then have two attributes (CorrectResp1 and CorrectResp2). Each attribute corresponds to a different experiment (say, Expt1 and Expt2). In an inline (placed before the TestSlide runs), you need to change your 'Correct:' property of your TestSlide based upon which experiment is selected at startup. One solution I came up with is as follows: Select Case c.getattrib("Group") Case "Expt1" TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * c.GetAttrib("CorrectResp1"*),_ CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, CLogical("Yes"),_ "", "", "ResponseMode:All ProcessBackspace:Yes") Case "Expt2" TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * c.GetAttrib("CorrectResp2"*),_ CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, CLogical("Yes"),_ "", "", "ResponseMode:All ProcessBackspace:Yes") Case Else MsgBox "Set correct response Error!" End Select The only way I found out how to do to this was by inputing an attribute within the 'Correct: ' field on the TestSlide object. I then generated the script, and searched for the line where E-Prime 'sets up' the Slide Object. From my understanding, what this line actually does is create allowable responses (in this case a keyboard with keys 'f' and 'j'), correct attribute, sets the duration, and then sets up the rest of the properties. This list is pretty much all of the properties for any given slide object. The only way to change these properties directly is by using this inline, figuring out which property is which, and then making the adjustments accordingly. There is also another way. Instead of creating two attributes, you can have one "CorrectResp" attribute (this way, you will not need to use the above inline). Then you will need an inline that says the following: dim y as integer For y = 1 to List1.Size Select Case c.getattrib ("Group") Case "Expt1" If List1.getattrib("Stimulus") = "Property1" then List1.setattrib(y, "CorrectResp"), "F" Elseif List1.getattrib("Stimulus")="Property2" then List1.setattrib(y, "CorrectResp")="J" Else MsgBox "Set Correct Response Error Expt 1" Then just repeat this for Case "Expt2" You just need to place this before you run your testing procedure and set the TestSlide 'Correct: ' Property field to [CorrectResp]. I hope this helps. If anyone else has more elegant solutions than this (this is admittedly basic), please feel free to post. Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From dbzgtfan4ever at gmail.com Wed Jan 12 04:12:45 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Tue, 11 Jan 2011 20:12:45 -0800 Subject: Payoff Matrix - Feedback Counter (Tidy up script) In-Reply-To: <4d2cc87b.9915e70a.2b74.ffffd834SMTPIN_ADDED@gmr-mx.google.com> Message-ID: Hello, This is what I ended up using. It is really quite beautiful (Thanks, David)! The script below sets up a counter based on three different attributes (i.e. TestType,TestCondition,and Accuracy). Dependent upon these attributes either 0 points, Points_HR or Points_CR are awarded. The latter two variables are set up in my MasterList List object. At the bottom of the TestSlideOLDNEW (the object that collects responses), there is a textbox that display the counter variable, thus keeping a "Running Total" of accumulated points. Also, there is a FeedbackDisplay that displays the number of points awarded based on a correct (either Points_HR or Points_CR) or incorrect (0 points) response. Thanks! Caleb ********************************************************************** Dim x As SlideText Dim PayoffMatrix(1,2,1) as integer 'First dimension = Test Type 'Second Dimension = Test Condition 'Third Dimension = TestSlideAccuracy If c.getattrib("TestType") = "OldNew" then c.setattrib "TestType", "0" Elseif c.getattrib("TestType") = "PDP" then c.setattrib "TestType","1" Else MsgBox "TestType Set attribute error" End if If c.getattrib("TestCondition") = "Inclusion" then c.setattrib "TestCondition", "0" Elseif c.getattrib("TestCondition") = "Exclusion" then c.setattrib "TestCondition", "1" Elseif c.getattrib("TestCondition") = "New" then c.setattrib "TestCondition", "2" Else MsgBox "TestCondition Set attribute error" End if For y = 0 to 1 For k = 0 to 2 PayoffMatrix(y,k,0) = 0 Next k,y 'Payoff Matrix (OldNew,Inclusion-Exclusion-New,Acc=1) Payoffmatrix(0,0,1) = c.getattrib("Points_HR") PayoffMatrix(0,1,1) = c.getattrib("Points_HR") PayoffMatrix(0,2,1) = c.getattrib("Points_CR") 'PayoffMatrix(PDP,Inclusion-Exclusion-New,Acc=1) PayoffMatrix(1,0,1) = c.getattrib("Points_HR") PayoffMatrix(1,1,1) = c.getattrib("Points_CR") PayoffMatrix(1,2,1) = c.getattrib("Points_CR") AccuracyDisplay = AccuracyDisplay + PayoffMatrix(CInt(c.getattrib ("TestType")),_ CInt(c.getattrib("TestCondition")), TestSlideOLDNEW.ACC ) c.setattrib "Accuracy", AccuracyDisplay Set x = CSlideText(TestSlideOLDNEW.States(TestSlideOLDNEW.ActiveState).Objects("Text4")) If Not x Is Nothing Then x.Text = "Running Total: " & c.getattrib("Accuracy") End if 'Debug.Print AccuracyDisplay If TestSlideOLDNEW.ACC = 1 then FeedbackDisplay1.ActiveState = "Correct" Set x = CSlideText(FeedbackDisplay1.States(FeedbackDisplay1.ActiveState).Objects("Text2")) If Not x Is Nothing Then x.Text = "You have received " & PayoffMatrix(CInt(c.getattrib ("TestType")),_ CInt(c.getattrib("TestCondition")), TestSlideOLDNEW.ACC ) & " Points!" End if Elseif TestSlideOLDNEW.ACC = 0 then FeedbackDisplay1.ActiveState = "Incorrect" Else Msgbox "FeedbackDisplay1 Error!" End if ********************************************************************* -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwenna at gmail.com Wed Jan 12 11:00:44 2011 From: liwenna at gmail.com (liwenna) Date: Wed, 12 Jan 2011 03:00:44 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <25511062.2247.1294797747380.JavaMail.geo-discussion-forums@vbay23> Message-ID: Hi Caleb, Thank's for your explanation! I'd like to add another way to implement pretty much the same thing in a different way for those that for some reason or another want to cut on their use of inlines. http://images.redial.net/crespbasedonversion.jpg See the image linked above. This list contains (among others) the attributes cresp, crespa, and crespb . The slideobject should be refered to the attribute cresp for the correctresponse (in the slide object properties fill in [cresp] for correct response). As one can see cresp is then referred further to [cresp[version]] . The attribute version can have either value A or B, so that [cresp[version]] actually means either [crespA] or [crespB] and thus for cresp the value of either attribute crespa or crespb will be implemented. The attribute "version" can be a startup variable(create this in the menu that is found under the e-prime logo at the top of your experiment tree). Another option, for a simple odd/ even randomisation, is to add an inline with the following two lines at the start of your experiment: if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" This inline will assign value A to the attribute "version" for all odd subject numbers and version B to all even subject numbers so that you don't have to manually assign a version at start up. In addition: when using this the way I did (randomizing the response buttons, i.e. button 1 for answer a and 2 for answer b in half the participants and vice versa in the other half) you'll also need to adjust the instructions based on the assigned version. This is easily done by creating two states in your instructionslide(s). One state should be named A and the other state B and contain the according instructions. In the instruction slide properties fill in [version] in the box activestate and the program will show either state A or state B according to the value of "version". Best, AW On Jan 12, 3:02?am, "Caleb J. Picker" wrote: > Hello all, > > I would just like to post a solution to this problem because I had > difficulty finding it. > > Just to clarify, the problem is this. ?You have a slide object that collects > input responses (e.g. TestSlide) with allowable response 'F' and 'J'. ?Based > on your List object (this presumably houses your stimuli and the correct > responses), you have an attribute for correct responses (let's say > "CorrectResp"). ?However, now let's say you have two similar experiments > with two different Correct Responses. ?In your List object, you might then > have two attributes (CorrectResp1 and CorrectResp2). ?Each attribute > corresponds to a different experiment (say, Expt1 and Expt2). > > In an inline (placed before the TestSlide runs), you need to change your > 'Correct:' property of your TestSlide based upon which experiment is > selected at startup. ?One solution I came up with is as follows: > > Select Case c.getattrib("Group") > ? ? Case "Expt1" > ? ? ? ? TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > c.GetAttrib("CorrectResp1"*),_ > ? ? ? ? CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, > CLogical("Yes"),_ > ? ? ? ? "", "", "ResponseMode:All ProcessBackspace:Yes") > ? ? Case "Expt2" > ? ? ? ? TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > c.GetAttrib("CorrectResp2"*),_ > ? ? ? ? CLng(TestSlide.Duration), CLng("1"), ebEndResponseActionTerminate, > CLogical("Yes"),_ > ? ? ? ? "", "", "ResponseMode:All ProcessBackspace:Yes") > ? ? Case Else > ? ? ? ? MsgBox "Set correct response Error!" > End Select > > The only way I found out how to do to this was by inputing an attribute > within the 'Correct: ' field on the TestSlide object. ?I then generated the > script, and searched for the line where E-Prime 'sets up' the Slide Object. > ?From my understanding, what this line actually does is create allowable > responses (in this case a keyboard with keys 'f' and 'j'), correct > attribute, sets the duration, and then sets up the rest of the properties. > ?This list is pretty much all of the properties for any given slide object. > ?The only way to change these properties directly is by using this inline, > figuring out which property is which, and then making the adjustments > accordingly. > > There is also another way. ?Instead of creating two attributes, you can have > one "CorrectResp" attribute (this way, you will not need to use the above > inline). ?Then you will need an inline that says the following: > > dim y as integer > > For y = 1 to List1.Size > Select Case c.getattrib ("Group") > ? ? Case "Expt1" > ? ? ? ? If List1.getattrib("Stimulus") = "Property1" then > ? ? ? ? ? ? List1.setattrib(y, "CorrectResp"), "F" > ? ? ? ? Elseif List1.getattrib("Stimulus")="Property2" then > ? ? ? ? ? ? List1.setattrib(y, "CorrectResp")="J" > ? ? ? ? Else > ? ? ? ? ? ? MsgBox "Set Correct Response Error Expt 1" > > Then just repeat this for Case "Expt2" > > You just need to place this before you run your testing procedure and set > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > I hope this helps. ?If anyone else has more elegant solutions than this > (this is admittedly basic), please feel free to post. > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jens.bernhardsson at gmail.com Wed Jan 12 11:57:55 2011 From: jens.bernhardsson at gmail.com (jens) Date: Wed, 12 Jan 2011 03:57:55 -0800 Subject: Repeat command blocks In-Reply-To: <09DAEA8BC192C94EB62C8E71FC35A5D92A20CC44E0@EXCHANGE3.ad.nottingham.ac.uk> Message-ID: Thank you very much, it works perfect. "...one might question the soundness of why you'd want this in the first place..." Yes one can. I'm using this to toggle an electrical stimulator on and off using different segment widths for different situations. Best, Jens -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dbzgtfan4ever at gmail.com Wed Jan 12 21:32:18 2011 From: dbzgtfan4ever at gmail.com (Caleb J. Picker) Date: Wed, 12 Jan 2011 13:32:18 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <8cc2cad6-6fde-498d-ac4a-3f086392e523@n10g2000yqd.googlegroups.com> Message-ID: Liwenna, That is actually quite clever! So I want to see if I understand this. See below. On Wednesday, January 12, 2011 3:00:44 AM UTC-8, liwenna wrote: > > Hi Caleb, > > Thank's for your explanation! > > I'd like to add another way to implement pretty much the same thing in > a different way for those that for some reason or another want to cut > on their use of inlines. > > http://images.redial.net/crespbasedonversion.jpg > > See the image linked above. > This list contains (among others) the attributes cresp, crespa, and > crespb . The slideobject should be refered to the attribute cresp for > the correctresponse (in the slide object properties fill in [cresp] > for correct response). As one can see cresp is then referred further > to [cresp[version]] . The attribute version can have either value A or > B, so that [cresp[version]] actually means either [crespA] or [crespB] > and thus for cresp the value of either attribute crespa or crespb will > be implemented. The attribute "version" can be a startup > variable(create this in the menu that is found under the e-prime logo > at the top of your experiment tree). So E-Prime does the following: 1) Select a Trial. 2) Collect a response. 3) Compare the response to [cresp] attribute. [cresp] is set to the "Correct: " property field of the SlideObject. 4) The [cresp] attribute references [cresp[version]]. 5) [version] is resolved based on the startup attribute "version" (c.getattrib("version"), with choices of either 'A' or 'B'. 6) Thus, based on the version, the SlideObject references either [crespa] or [crespb], within the same List1 Object. > Another option, for a simple odd/ > even randomisation, is to add an inline with the following two lines > at the start of your experiment: > > if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" > if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" > > This inline will assign value A to the attribute "version" for all odd > subject numbers and version B to all even subject numbers so that you > don't have to manually assign a version at start up. So E-Prime will take the remainder of the Ss# divided by 2. If the remainder is 1, then assign version A. If the remainder is 0, assign version B. Again, very clever! > > In addition: when using this the way I did (randomizing the response > buttons, i.e. button 1 for answer a and 2 for answer b in half the > participants and vice versa in the other half) you'll also need to > adjust the instructions based on the assigned version. This is easily > done by creating two states in your instructionslide(s). One state > should be named A and the other state B and contain the according > instructions. In the instruction slide properties fill in [version] in > the box activestate and the program will show either state A or state > B according to the value of "version". > In the past, I've always created two separate Instruction SlideObjects, but this solution seems less messy and easier to handle. Thanks! > > Best, > > AW > > On Jan 12, 3:02 am, "Caleb J. Picker" wrote: > > Hello all, > > > > I would just like to post a solution to this problem because I had > > difficulty finding it. > > > > Just to clarify, the problem is this. You have a slide object that > collects > > input responses (e.g. TestSlide) with allowable response 'F' and 'J'. > Based > > on your List object (this presumably houses your stimuli and the correct > > responses), you have an attribute for correct responses (let's say > > "CorrectResp"). However, now let's say you have two similar experiments > > with two different Correct Responses. In your List object, you might > then > > have two attributes (CorrectResp1 and CorrectResp2). Each attribute > > corresponds to a different experiment (say, Expt1 and Expt2). > > > > In an inline (placed before the TestSlide runs), you need to change your > > 'Correct:' property of your TestSlide based upon which experiment is > > selected at startup. One solution I came up with is as follows: > > > > Select Case c.getattrib("Group") > > Case "Expt1" > > TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > c.GetAttrib("CorrectResp1"*),_ > > CLng(TestSlide.Duration), CLng("1"), > ebEndResponseActionTerminate, > > CLogical("Yes"),_ > > "", "", "ResponseMode:All ProcessBackspace:Yes") > > Case "Expt2" > > TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > c.GetAttrib("CorrectResp2"*),_ > > CLng(TestSlide.Duration), CLng("1"), > ebEndResponseActionTerminate, > > CLogical("Yes"),_ > > "", "", "ResponseMode:All ProcessBackspace:Yes") > > Case Else > > MsgBox "Set correct response Error!" > > End Select > > > > The only way I found out how to do to this was by inputing an attribute > > within the 'Correct: ' field on the TestSlide object. I then generated > the > > script, and searched for the line where E-Prime 'sets up' the Slide > Object. > > From my understanding, what this line actually does is create allowable > > responses (in this case a keyboard with keys 'f' and 'j'), correct > > attribute, sets the duration, and then sets up the rest of the > properties. > > This list is pretty much all of the properties for any given slide > object. > > The only way to change these properties directly is by using this > inline, > > figuring out which property is which, and then making the adjustments > > accordingly. > > > > There is also another way. Instead of creating two attributes, you can > have > > one "CorrectResp" attribute (this way, you will not need to use the above > > > inline). Then you will need an inline that says the following: > > > > dim y as integer > > > > For y = 1 to List1.Size > > Select Case c.getattrib ("Group") > > Case "Expt1" > > If List1.getattrib("Stimulus") = "Property1" then > > List1.setattrib(y, "CorrectResp"), "F" > > Elseif List1.getattrib("Stimulus")="Property2" then > > List1.setattrib(y, "CorrectResp")="J" > > Else > > MsgBox "Set Correct Response Error Expt 1" > > > > Then just repeat this for Case "Expt2" > > > > You just need to place this before you run your testing procedure and set > > > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > > > I hope this helps. If anyone else has more elegant solutions than this > > (this is admittedly basic), please feel free to post. > > > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From liwenna at gmail.com Thu Jan 13 11:34:28 2011 From: liwenna at gmail.com (liwenna) Date: Thu, 13 Jan 2011 03:34:28 -0800 Subject: Change the SlideObject Correct Response based on Attribute In-Reply-To: <26018017.254.1294867938685.JavaMail.geo-discussion-forums@yqep2> Message-ID: At times e-prime turns out to be more clever than one figured before ^.^ Indeed it works just like you describe and actually it works just like you described already in your first post. Just another way of implementing the same trick. The mod - thing can be useful in all kind of situations (i.e. offer a break after every 40 trials by using a if triallist.sample mod 40 = 0 then... line). The slide-state dependent on an attribute 'trick' is another thing that I use alot since I figured it out the first time. best, liw On Jan 12, 10:32?pm, "Caleb J. Picker" wrote: > Liwenna, > > That is actually quite clever! ?So I want to see if I understand this. ?See > below. > > > > On Wednesday, January 12, 2011 3:00:44 AM UTC-8, liwenna wrote: > > > Hi Caleb, > > > Thank's for your explanation! > > > I'd like to add another way to implement pretty much the same thing in > > a different way for those that for some reason or another want to cut > > on their use of inlines. > > >http://images.redial.net/crespbasedonversion.jpg > > > See the image linked above. > > This list contains (among others) the attributes cresp, crespa, and > > crespb . The slideobject should be refered to the attribute cresp for > > the correctresponse (in the slide object properties fill in [cresp] > > for correct response). As one can see cresp is then referred further > > to [cresp[version]] . The attribute version can have either value A or > > B, so that [cresp[version]] actually means either [crespA] or [crespB] > > and thus for cresp the value of either attribute crespa or crespb will > > be implemented. The attribute "version" can be a startup > > variable(create this in the menu that is found under the e-prime logo > > at the top of your experiment tree). > > So E-Prime does the following: > 1) Select a Trial. > 2) Collect a response. > 3) Compare the response to [cresp] attribute. ?[cresp] is set to the > "Correct: " property field of the SlideObject. > 4) The [cresp] attribute references [cresp[version]]. > 5) [version] is resolved based on the startup attribute "version" > (c.getattrib("version"), with choices of either 'A' or 'B'. > 6) Thus, based on the version, the SlideObject references either [crespa] or > [crespb], within the same List1 Object. > > > Another option, for a simple odd/ > > even randomisation, is to add an inline with the following two lines > > at the start of your experiment: > > > if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" > > if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" > > > This inline will assign value A to the attribute "version" for all odd > > subject numbers and version B to all even subject numbers so that you > > don't have to manually assign a version at start up. > > So E-Prime will take the remainder of the Ss# divided by 2. ?If the > remainder is 1, then assign version A. ?If the remainder is 0, assign > version B. > Again, very clever! > > > > > In addition: when using this the way I did (randomizing the response > > buttons, i.e. button 1 for answer a and 2 for answer b in half the > > participants and vice versa in the other half) you'll also need to > > adjust the instructions based on the assigned version. This is easily > > done by creating two states in your instructionslide(s). One state > > should be named A and the other state B and contain the according > > instructions. In the instruction slide properties fill in [version] in > > the box activestate and the program will show either state A or state > > B according to the value of "version". > > In the past, I've always created two separate Instruction SlideObjects, but > this solution seems less messy and easier to handle. ?Thanks! > > > > > Best, > > > AW > > > On Jan 12, 3:02 am, "Caleb J. Picker" wrote: > > > Hello all, > > > > I would just like to post a solution to this problem because I had > > > difficulty finding it. > > > > Just to clarify, the problem is this. ?You have a slide object that > > collects > > > input responses (e.g. TestSlide) with allowable response 'F' and 'J'. > > ?Based > > > on your List object (this presumably houses your stimuli and the correct > > > responses), you have an attribute for correct responses (let's say > > > "CorrectResp"). ?However, now let's say you have two similar experiments > > > with two different Correct Responses. ?In your List object, you might > > then > > > have two attributes (CorrectResp1 and CorrectResp2). ?Each attribute > > > corresponds to a different experiment (say, Expt1 and Expt2). > > > > In an inline (placed before the TestSlide runs), you need to change your > > > 'Correct:' property of your TestSlide based upon which experiment is > > > selected at startup. ?One solution I came up with is as follows: > > > > Select Case c.getattrib("Group") > > > ? ? Case "Expt1" > > > ? ? ? ? TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > > c.GetAttrib("CorrectResp1"*),_ > > > ? ? ? ? CLng(TestSlide.Duration), CLng("1"), > > ebEndResponseActionTerminate, > > > CLogical("Yes"),_ > > > ? ? ? ? "", "", "ResponseMode:All ProcessBackspace:Yes") > > > ? ? Case "Expt2" > > > ? ? ? ? TestSlide.InputMasks.Add Keyboard.CreateInputMask("fj", * > > > c.GetAttrib("CorrectResp2"*),_ > > > ? ? ? ? CLng(TestSlide.Duration), CLng("1"), > > ebEndResponseActionTerminate, > > > CLogical("Yes"),_ > > > ? ? ? ? "", "", "ResponseMode:All ProcessBackspace:Yes") > > > ? ? Case Else > > > ? ? ? ? MsgBox "Set correct response Error!" > > > End Select > > > > The only way I found out how to do to this was by inputing an attribute > > > within the 'Correct: ' field on the TestSlide object. ?I then generated > > the > > > script, and searched for the line where E-Prime 'sets up' the Slide > > Object. > > > ?From my understanding, what this line actually does is create allowable > > > responses (in this case a keyboard with keys 'f' and 'j'), correct > > > attribute, sets the duration, and then sets up the rest of the > > properties. > > > ?This list is pretty much all of the properties for any given slide > > object. > > > ?The only way to change these properties directly is by using this > > inline, > > > figuring out which property is which, and then making the adjustments > > > accordingly. > > > > There is also another way. ?Instead of creating two attributes, you can > > have > > > one "CorrectResp" attribute (this way, you will not need to use the above > > > > inline). ?Then you will need an inline that says the following: > > > > dim y as integer > > > > For y = 1 to List1.Size > > > Select Case c.getattrib ("Group") > > > ? ? Case "Expt1" > > > ? ? ? ? If List1.getattrib("Stimulus") = "Property1" then > > > ? ? ? ? ? ? List1.setattrib(y, "CorrectResp"), "F" > > > ? ? ? ? Elseif List1.getattrib("Stimulus")="Property2" then > > > ? ? ? ? ? ? List1.setattrib(y, "CorrectResp")="J" > > > ? ? ? ? Else > > > ? ? ? ? ? ? MsgBox "Set Correct Response Error Expt 1" > > > > Then just repeat this for Case "Expt2" > > > > You just need to place this before you run your testing procedure and set > > > > the TestSlide 'Correct: ' Property field to [CorrectResp]. > > > > I hope this helps. ?If anyone else has more elegant solutions than this > > > (this is admittedly basic), please feel free to post. > > > > Caleb J. Picker -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Tue Jan 18 16:48:48 2011 From: issabern at gmail.com (issabern) Date: Tue, 18 Jan 2011 08:48:48 -0800 Subject: How to run 25 simultaneous experiments Message-ID: I am interested in creating a self-paced reading time study using E- prime. I would like to run the experiment on an entire class of 23 subjects in a computer lab. Each subject would have their own computer, is this a feasible option with a single user license for E- Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Tue Jan 18 21:26:34 2011 From: liwenna at gmail.com (liwenna) Date: Tue, 18 Jan 2011 13:26:34 -0800 Subject: How to run 25 simultaneous experiments In-Reply-To: <19a24fee-4800-439b-9e1f-7927f5ecece5@m7g2000vbn.googlegroups.com> Message-ID: Now... this would typically be something that you'd have to ask the people of PST and not the userbase. Nonetheless... on the PST website the answer to your question is found: **** License Description Single User License -grants permission to use E-Prime to develop experiments and analyze data on a single computer at a time. Up to twenty-five (25) machines within the licensee's lab may be used to collect data simultaneously. Quantity discounts when ordering 5 or more ***** linkety: http://www.pstnet.com/eprime.cfm So, sounds as if it should be possible :) Good luck! On Jan 18, 5:48?pm, issabern wrote: > I am interested in creating a self-paced reading time study using E- > prime. I would like to run the experiment on an entire class of 23 > subjects in a computer lab. Each subject would have their own > computer, is this a feasible option with a single user license for E- > Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Wed Jan 19 01:32:45 2011 From: issabern at gmail.com (issabern) Date: Tue, 18 Jan 2011 17:32:45 -0800 Subject: How to run 25 simultaneous experiments In-Reply-To: Message-ID: Thanks for the reply! On Jan 18, 3:26?pm, liwenna wrote: > Now... this would typically be something that you'd have to ask the > people of PST and not the userbase. > Nonetheless... on the PST website the answer to your question is > found: > > **** > License Description > > Single User License -grants permission to use E-Prime to develop > experiments and analyze data on a single computer at a time. Up to > twenty-five (25) machines within the licensee's lab may be used to > collect data simultaneously. Quantity discounts when ordering 5 or > more > ***** > linkety:http://www.pstnet.com/eprime.cfm > > So, sounds as if it should be possible :) > > Good luck! > > On Jan 18, 5:48?pm, issabern wrote: > > > > > > > > > I am interested in creating a self-paced reading time study using E- > > prime. I would like to run the experiment on an entire class of 23 > > subjects in a computer lab. Each subject would have their own > > computer, is this a feasible option with a single user license for E- > > Prime 2.0? -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From matthewdwood82 at gmail.com Thu Jan 20 15:14:41 2011 From: matthewdwood82 at gmail.com (Matthew) Date: Thu, 20 Jan 2011 07:14:41 -0800 Subject: Calling the value of a higher-level list object? Message-ID: Hi guys, I've trolled the forums here & at PST for an answer to this problem, w/ o much help. I have an experiment where participants work on a series of remote associate problems (RAT for short), complete some lexical decision trials (LDT), and then work on more remote associates (both unsolved problems from 1st session and new, unseen problems). They are trained on how to do both of these things at the start of the experiment. Now my problem. The lexical decision task includes some hints to the remote associate problems that were not solved in the first RAT session. These can be either solutions for the RAT, OR words that are associates of 2+ problem words (but are not solutions). Right now, I have this set up as a between-subjects comparison, and am trying to use a high-level list that assigns participants to one of two Procs that correspond to these conditions. I would like to keep objects in both of these Procs the same, and use an InLine to look at what high- level proc I'm in, and then select the appropriate hint word for an unsolved item. A snippit of my (broken) code follows. Any suggestions? Thanks, -Matt ---------- ' A page out of E-Basic HELP - FactorSpace.GetProc (method) Dim HintCondition as String Dim theCellSpec as CellSpec Set theCellSpec = HintCond.Order.GetNext() HintCondition = CStr(HintCond.GetProc(theCellSpec)) ... If HintCondition = "AnswerProc" then For i = 1 to IncorrectPresentNum ...{add solution hints to LexicalDecision List for 1/2 of unsolved RATs}... Next i ElseIf HintCondition = "MisleadProc" then For i = 1 to IncorrectPresentNum ...{add misleading hints to LexicalDecision List for 1/2 of unsolved RATs}... Next i EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Sat Jan 22 18:05:14 2011 From: liwenna at gmail.com (liwenna) Date: Sat, 22 Jan 2011 10:05:14 -0800 Subject: Calling the value of a higher-level list object? In-Reply-To: <11406d91-d39b-4e07-a3f1-dc08ac7cf8ba@g26g2000vbi.googlegroups.com> Message-ID: Ok.... let's see if I get your problem... You kinda want subjects to be assigned to one of two conditions, answer or mislead. You write that you want to assign them to different procs, keep the objects the same but the hint words (that are stored in a list) should vary between the two conditions? So basically not two procs, but one proc, yet with different words used. Because I am not sure what you look for exactly I'll not give you a clear solution but simply blurt out some thoughts on e-prime mechanics "tricks". In general I think you should approach this problem the other way around: instead of having a lower order list 'peek back' to a higher order list it's probably more sensible to have a higher list decide the lower order course for each run of the program. 1: you could have a list with two levels that have the same procedure nested into it but then nest a different list with words (i.e. answerwordlist & misleadwordlist) into each level so that when the procedure is ran from level 1 the words in the one list are called for while when running the same procedure from the second level the words in the other list will be used. This way you can alternate conditions.. .but it's less suitable for between subjects designs as then you'll have to force the program to only use one of the levels for each subject. 2: you could assign a condition to each subject at the start of the experiment and then have the program run in a certain order based on that attribute (also see the thread: Change the SlideObject Correct Response based on Attribute ). Start the experiment with an inline with the following code that will assign version A (or call it answer if you like) to all odd subjectnumbers and B (mislead) to all even subjectnumbers. if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", "A" if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", "B" Obviously other criteria for assigning one version or another could be used. Built the procedure for one run of the experiment and then rebuilt it again in the same experimentprocedure. So: start with a list that contains the procedure and all the lower lists for a run of the 'answer variant' of the task and then after that create another list containing everything you need for the mislead variant. You can actually use the same trialprocedures and all, just change the words in the lists that are used as hints. Don't copy/paste the first build of the task but create new lists and type into that the name of the previously created procedure. This way the same procedure will be used. If you copy/paste stuff (lists/procedures) they'll become separate objects and any changes you might want to make would have to be made twice. Unless of course you after all do need different objects in the two versions. Now.. if a subject is assigned the answer condition it should only be taken trough the first part of the experiment... so inbetween the 'main lists' for both task variants add an inline that reads: "goto endlabel" and place a label after the second part of the experiment and call it endlabel. If the program is finished with the first list and encounters that inline, it will skip to the endlabel and therefore pass by the second part of the experiment. On other runs you need the first part to be skipped and only the second part to be run so place an inline before the first mainlist that reads: if c.getattrib ("version") = "B" then goto blabel. Place a label called blabel inbetween the two lists (but after the inline that read goto endlabel). Now for those subjects that get assigned version B the program will skip the first list (it goes to blabel) and run the second list. 3. Another way, not my favourite, is to just mess with the lists... you can create two lists of hintwords (one answerlist and one misleadlist) and then delete them both so that they end up in the unreferenced objects 'bin'. Assign a version to each subject as described above and based on that attribute have the program use on of the two unreferenced list using something like the following code: "" If c.getattrib ("version") = "A" then triallistist.setattrib(1, "nested")="answerlist" if c.getattrib ("version") = "B" then triallist.setattrib(1, "nested")="misleadlist" end if "" This code should be placed on the experimentproc before the triallist. I am not entirely sure about the above thing though... something in the back of my head tells me that the above codeformat might not work for the attributes nested and procedure of a list, but have no e-prime to try it with right now. Undoubtedly there are many more ways to do these kind of things, but these are the first that came to mind. Let me know if these are of any help or if you're problem actually is different from what I thought. best, liw On Jan 20, 4:14?pm, Matthew wrote: > Hi guys, > > I've trolled the forums here & at PST for an answer to this problem, w/ > o much help. ?I have an experiment where participants work on a series > of remote associate problems (RAT for short), complete some lexical > decision trials (LDT), and then work on more remote associates (both > unsolved problems from 1st session and new, unseen problems). ?They > are trained on how to do both of these things at the start of the > experiment. > > Now my problem. ?The lexical decision task includes some hints to the > remote associate problems that were not solved in the first RAT > session. ?These can be either solutions for the RAT, OR words that are > associates of 2+ problem words (but are not solutions). ?Right now, I > have this set up as a between-subjects comparison, and am trying to > use a high-level list that assigns participants to one of two Procs > that correspond to these conditions. ?I would like to keep objects in > both of these Procs the same, and use an InLine to look at what high- > level proc I'm in, and then select the appropriate hint word for an > unsolved item. ?A snippit of my (broken) code follows. ?Any > suggestions? > > Thanks, > -Matt > ---------- > > ' A page out of E-Basic HELP - FactorSpace.GetProc (method) > Dim HintCondition as String > Dim theCellSpec as CellSpec > Set theCellSpec = HintCond.Order.GetNext() > HintCondition = CStr(HintCond.GetProc(theCellSpec)) > ... > If HintCondition = "AnswerProc" then > ? ? ?For i = 1 to IncorrectPresentNum > ? ? ?...{add solution hints to LexicalDecision List for 1/2 of > unsolved RATs}... > ? ? ?Next i > ElseIf HintCondition = "MisleadProc" then > ? ? ?For i = 1 to IncorrectPresentNum > ? ? ?...{add misleading hints to LexicalDecision List for 1/2 of > unsolved RATs}... > ? ? ?Next i > EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Sun Jan 23 14:30:00 2011 From: doug.girard at gmail.com (DGirard) Date: Sun, 23 Jan 2011 06:30:00 -0800 Subject: SRBox Port Number configured at runtime? Message-ID: We are using an SRBox and it seems we have to configure the COM port number at design time. This doesn't work for us since when we plug the device into a computer, it will be assigned whatever COM port is available. We won't have administrative access on these machines, so we won't be able to reassign the COM port with Device Manager. Even if we could, it is possible that another device is currently using that COM port number. So basically, we need the ability to specify the COM port number of the SRBox to e-Prime at runtime. Is there a way to do this with an external config file or something? Thanks in advance for any suggestions, Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From matthewdwood82 at gmail.com Sun Jan 23 22:56:34 2011 From: matthewdwood82 at gmail.com (Matthew) Date: Sun, 23 Jan 2011 14:56:34 -0800 Subject: Calling the value of a higher-level list object? In-Reply-To: <364ed2c5-ef8f-423a-b3d6-5f8b5f582f7c@i19g2000yqo.googlegroups.com> Message-ID: Hi Liw, Thanks for your response. One important thing I forgot to mention is that all my problems are in a single list, along with their answers and misleading hints. Looks like so: Weight Nested Procedure Word1 Word2 Word3 Answer Mislead 1 RATProc rope truck line tow pickup 1 RATProc teeth arrest start false kick ... This was done so that the subset of hints that participants see can be served up on-the-fly (depending on their performance for the first round of problems). I am doing this currently with a couple inline objects and a couple arrays that store information for incorrect problems and unseen problems. Then one inline randomly picks 1/2 of unsolved and 1/2 of unseen problems to serve up hint words for in the LDT, and a second inline builds the list of RAT problems to be presented in the second session. I posed this question to PST web support, and it turns out the work- around is idiot simple. They suggested adding an attribute in the list that determines BS condition called ProcedureName, and give it the same name at each level as the procedure for that level. Then you can call c.GetAttrib "ProcedureName" instead of having to monkey with any of the (more complicated) FactorSpace commands. I haven't finished testing yet, but it seems to be getting the job done. Thanks again, -Matt On Jan 22, 1:05?pm, liwenna wrote: > Ok.... let's see if I get your problem... > > You kinda want subjects to be assigned to one of two conditions, > answer or mislead. You write that you want to assign them to different > procs, keep the objects the same but the hint words (that are stored > in a list) should vary between the two conditions? So basically not > two procs, but one proc, yet with different words used. > > Because I am not sure what you look for exactly I'll not give you a > clear solution but simply blurt out some thoughts on e-prime mechanics > "tricks". In general I think you should approach this problem the > other way around: instead of having a lower order list 'peek back' to > a higher order list it's probably more sensible to have a higher list > decide the lower order course for each run of the program. > > 1: you could have a list with two levels that have the same procedure > nested into it but then nest a different list with words (i.e. > answerwordlist & misleadwordlist) into each level so that when the > procedure is ran from level 1 the words in the one list are called for > while when running the same procedure from the second level the words > in the other list will be used. This way you can alternate > conditions.. .but it's less suitable for between subjects designs as > then you'll have to force the program to only use one of the levels > for each subject. > > 2: you could assign a condition to each subject at the start of the > experiment and then have the program run in a certain order based on > that attribute (also see the thread: Change the SlideObject Correct > Response based on Attribute ). Start the experiment with an inline > with the following code that will assign version A (or call it answer > if you like) to all odd subjectnumbers and B (mislead) to all even > subjectnumbers. > ? ? ?if c.getattrib ("subject") mod 2 = 1 then c.setattrib "version", > "A" > ? ? ?if c.getattrib ("subject") mod 2 = 0 then c.setattrib "version", > "B" > Obviously other criteria for assigning one version or another could be > used. > Built the procedure for one run of the experiment and then rebuilt it > again in the same experimentprocedure. So: start with a list that > contains the procedure and all the lower lists for a run of the > 'answer variant' of the task and then after that create another list > containing everything you need for the mislead variant. You can > actually use the same trialprocedures and all, just change the words > in the lists that are used as hints. Don't copy/paste the first build > of the task but create new lists and type into that the name of the > previously created procedure. This way the same procedure will be > used. If you copy/paste stuff (lists/procedures) they'll become > separate objects and any changes you might want to make would have to > be made twice. Unless of course you after all do need different > objects in the two versions. > > Now.. if a subject is assigned the answer condition it should only be > taken trough the first part of the experiment... so inbetween the > 'main lists' for both task variants add an inline that reads: "goto > endlabel" and place a label after the second part of the experiment > and call it endlabel. If the program is finished with the first list > and encounters that inline, it will skip to the endlabel and therefore > pass by the second part of the experiment. On other runs you need the > first part to be skipped and only the second part to be run so place > an inline before the first mainlist that reads: if c.getattrib > ("version") = "B" then goto blabel. Place a label called blabel > inbetween the two lists (but after the inline that read goto > endlabel). Now for those subjects that get assigned version B the > program will skip the first list (it goes to blabel) and run the > second list. > > 3. Another way, not my favourite, is to just mess with the lists... > you can create two lists of hintwords (one answerlist and one > misleadlist) and then delete them both so that they end up in the > unreferenced objects 'bin'. Assign a version to each subject as > described above and based on that attribute have the program use on of > the two unreferenced list using something like the following code: "" > If c.getattrib ("version") = "A" then triallistist.setattrib(1, > "nested")="answerlist" if c.getattrib ("version") = "B" then > triallist.setattrib(1, "nested")="misleadlist" end if "" This code > should be placed on the experimentproc before the triallist. I am not > entirely sure about the above thing though... something in the back of > my head tells me that the above codeformat might not work for the > attributes nested and procedure of a list, but have no e-prime to try > it with right now. > > Undoubtedly there are many more ways to do these kind of things, but > these are the first that came to mind. > > Let me know if these are of any help or if you're problem actually is > different from what I thought. > > best, > > liw > > On Jan 20, 4:14?pm, Matthew wrote: > > > > > > > > > Hi guys, > > > I've trolled the forums here & at PST for an answer to this problem, w/ > > o much help. ?I have an experiment where participants work on a series > > of remote associate problems (RAT for short), complete some lexical > > decision trials (LDT), and then work on more remote associates (both > > unsolved problems from 1st session and new, unseen problems). ?They > > are trained on how to do both of these things at the start of the > > experiment. > > > Now my problem. ?The lexical decision task includes some hints to the > > remote associate problems that were not solved in the first RAT > > session. ?These can be either solutions for the RAT, OR words that are > > associates of 2+ problem words (but are not solutions). ?Right now, I > > have this set up as a between-subjects comparison, and am trying to > > use a high-level list that assigns participants to one of two Procs > > that correspond to these conditions. ?I would like to keep objects in > > both of these Procs the same, and use an InLine to look at what high- > > level proc I'm in, and then select the appropriate hint word for an > > unsolved item. ?A snippit of my (broken) code follows. ?Any > > suggestions? > > > Thanks, > > -Matt > > ---------- > > > ' A page out of E-Basic HELP - FactorSpace.GetProc (method) > > Dim HintCondition as String > > Dim theCellSpec as CellSpec > > Set theCellSpec = HintCond.Order.GetNext() > > HintCondition = CStr(HintCond.GetProc(theCellSpec)) > > ... > > If HintCondition = "AnswerProc" then > > ? ? ?For i = 1 to IncorrectPresentNum > > ? ? ?...{add solution hints to LexicalDecision List for 1/2 of > > unsolved RATs}... > > ? ? ?Next i > > ElseIf HintCondition = "MisleadProc" then > > ? ? ?For i = 1 to IncorrectPresentNum > > ? ? ?...{add misleading hints to LexicalDecision List for 1/2 of > > unsolved RATs}... > > ? ? ?Next i > > EndIf -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From pooja.k.agarwal at gmail.com Mon Jan 24 14:42:49 2011 From: pooja.k.agarwal at gmail.com (Pooja K. Agarwal) Date: Mon, 24 Jan 2011 08:42:49 -0600 Subject: Nested lists, random order, and feedback Message-ID: Hi everyone, I'm trying to use e-Prime for my dissertation, and am having trouble creating an experiment with nested lists, both random and sequential ordering, and feedback (with the random order). I'm not a novice to e-Prime, however I am a novice in terms of writing and using scripts. In general, subjects will be reading passages and taking tests. I have eight passages, which need to be presented in sequential order. The first time passages are presented, subjects will simply be reading the passages one after another in order, so I have that part figured out. After reading all 8 passages, the critical conditions should be administered, in one of 8 different sequential orders (called CB in the attached program): never seen again (for 2 passage), reading again (2 passages), taking a version A test (2), or taking a version B test (2). Again, I have this sequential ordering figured out (but haven't typed it in for all CBs yet). For each test, I have 8 multiple-choice questions. Even though tests are presented in sequential order, I'd like the 8 questions presented in random order. For each question, I have 4 multiple-choice alternatives/choices. I'd like to present the question and all four alternatives on ONE slide, with the alternatives also presented in random order. How do I get all four alternatives, in random order, to show up on one slide? Also, immediately after a subject responds to a question, they need to make a rating, and then they need to receive feedback. If the alternatives are presented in random order, how do I specify what the correct answer is, in order for the feedback to be accurate? In the attached program, I have an order of the conditions (List:ConditionOrder), an order of the tests (List:ProcedureTest), a list for each set of 8 passage questions, and nested lists for each question containing its respective 4 multiple-choice alternatives. The order of conditions and tests are fine, but the order of questions and alternatives is not, and I also can't get 4 alternatives (in random order) nor the feedback to work. Because I don't know how to write script, if script is necessary, I would GREATLY appreciate an example script or even a written script. Thanks in advance, Pooja Agarwal P.S. Sorry for my desperation, but it'd be a life saver if I could find an answer by tomorrow (Tuesday, Jan. 25), so I've cross posted to the PST user forum. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Agarwal_Dissertation1.es2 Type: application/octet-stream Size: 351640 bytes Desc: not available URL: From mcfarla9 at msu.edu Mon Jan 24 22:12:54 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 24 Jan 2011 17:12:54 -0500 Subject: Nested lists, random order, and feedback In-Reply-To: Message-ID: Pooja, I don't have any quick solution for you, especially for such a complex design. I can only say that this looks for a job for nested Lists, and to get started on those you need to work through the Nested Lists tutorial in Appendix C of the Users Guide that came with E-Prime. Good luck, -- David McFarlane, Professional Faultfinder >I'm trying to use e-Prime for my dissertation, and am having trouble >creating an experiment with nested lists, both random and sequential >ordering, and feedback (with the random order). I'm not a novice to >e-Prime, however I am a novice in terms of writing and using scripts. > >In general, subjects will be reading passages and taking tests. I >have eight passages, which need to be presented in sequential order. >The first time passages are presented, subjects will simply be >reading the passages one after another in order, so I have that part >figured out. > >After reading all 8 passages, the critical conditions should be >administered, in one of 8 different sequential orders (called CB in >the attached program): never seen again (for 2 passage), reading >again (2 passages), taking a version A test (2), or taking a version >B test (2). Again, I have this sequential ordering figured out (but >haven't typed it in for all CBs yet). > >For each test, I have 8 multiple-choice questions. Even though tests >are presented in sequential order, I'd like the 8 questions >presented in random order. > >For each question, I have 4 multiple-choice alternatives/choices. >I'd like to present the question and all four alternatives on ONE >slide, with the alternatives also presented in random order. How do >I get all four alternatives, in random order, to show up on one slide? > >Also, immediately after a subject responds to a question, they need >to make a rating, and then they need to receive feedback. If the >alternatives are presented in random order, how do I specify what >the correct answer is, in order for the feedback to be accurate? > >In the attached program, I have an order of the conditions >(List:ConditionOrder), an order of the tests (List:ProcedureTest), a >list for each set of 8 passage questions, and nested lists for each >question containing its respective 4 multiple-choice alternatives. >The order of conditions and tests are fine, but the order of >questions and alternatives is not, and I also can't get 4 >alternatives (in random order) nor the feedback to work. > >Because I don't know how to write script, if script is necessary, I >would GREATLY appreciate an example script or even a written script. > > >Thanks in advance, >Pooja Agarwal > > >P.S. Sorry for my desperation, but it'd be a life saver if I could >find an answer by tomorrow (Tuesday, Jan. 25), so I've cross posted >to the PST user forum. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Tue Jan 25 03:37:37 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Mon, 24 Jan 2011 19:37:37 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? Message-ID: Im new to using E prime, and although I have the basics down, i have no idea how I would do this on E prime. In my experiment I need the participants to be able to increase or decrease the size of a symbols, and i need to be able to measure what size they make it. I think my unit of measurement will be in pixels but besides that I have no idea how I would be able to create this on E prime. Any help would be great, thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Tue Jan 25 05:07:53 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Mon, 24 Jan 2011 21:07:53 -0800 Subject: Mystery timing issue Message-ID: Hello, I have a simple visual priming task I want to run -- design is very simple (one block, one procedure repeated for 100 trials). No inline script or anything "fancy". When I run the script on one of the machines in my lab, the last few trials on the machine start slowing down -- there are stimulus timing/duration errors in the last few trials; when I run the same script again, the number of trials with timing issues increase and during a third run all trials have timing problems. I've tried this under "normal" conditions (Internet, background programs) and when the PC was unplugged from the Internet, screensaver was disabled, the PC was running under Diagnostic mode (so all background programs were turned off) without any significant changes in the outcome. Now, if I run the exact same script on another, very similar machine, there are no timing issues AT ALL and that's with Internet connected and background programs running their usual course. For various reasons I need to run my program on the "faulty" machine so I would appreciate any ideas of what might be causing these timing issues on one PC but not another. The "faulty" PC is running Windows XP Professional, version 202, Service Pack 3 AMD Athlon Core Processor 3800+ 2.00 Ghz, 2.00 GB of RAM Graphics card: NVIDIA GeForce8400GS, memory 512. MB, version 6.14.0011.8250, date March 2009 The "good" PC is running Windows XP Media center edition, version 2002, Service Pack 3 Pentium 4 CPU 3.06 GHz, 1.00 GB of RAM Graphics card: NVIDIA GeForce7300LE, version 8.2.6.8, date June 2006 Could it be that the better/newer graphics card on the "faulty" machine is not functioning properly and if so, how would I test it to verify? Could the monitor for whatever reason be a problem? Also, I've noticed that the duration errors appear when I repeating the SAME script -- if I run another script (which basically does the exact same thing but is created in another E-studio set), it seems to function fine. Any ideas will be greatly appreciated. Thank you! Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From liwenna at gmail.com Tue Jan 25 11:18:12 2011 From: liwenna at gmail.com (liwenna) Date: Tue, 25 Jan 2011 03:18:12 -0800 Subject: Mystery timing issue In-Reply-To: <506002e0-f85f-4377-a391-3a027277c229@p38g2000vbn.googlegroups.com> Message-ID: Hi Evelina, Does your task involve several pictures to be shown simultaneously or shortly after another? How shortly? Or any other 'more heavy' tasks? If the task design is actually a bit faster than the program is able to load, for instance pictures, than the accumulative delay could result in delays, although the pattern you describe (accumulating over several runs) is pretty particular. This might be solved of there is some space (timewise) in between the pictures that you can use to 'preload' the pictures which you'll have to tell the program with a little script. This script can be found elsewhere on this site or I can post it here but I rather first here if this might actually be the problem. If not, could you describe the task in a bit more detail? Best, liw On Jan 25, 6:07?am, Evelina Tapia wrote: > Hello, > > I have a simple visual priming task I want to run -- design is very > simple (one block, one procedure repeated for 100 trials). No inline > script or anything "fancy". When I run the script on one of the > machines in my lab, the last few trials on the machine start slowing > down -- there are stimulus timing/duration errors in the last few > trials; when I run the same script again, the number of trials with > timing issues increase and during a third run all trials have timing > problems. I've tried this under "normal" conditions (Internet, > background programs) and when the PC was unplugged from the Internet, > screensaver was disabled, the PC was running under Diagnostic mode (so > all background programs were turned off) without any significant > changes in the outcome. Now, if I run the exact same script on > another, very similar machine, there are no timing issues AT ALL and > that's with Internet connected and background programs running their > usual course. > > For various reasons I need to run my program on the "faulty" machine > so I would appreciate any ideas of what might be causing these timing > issues on one PC but not another. > > The "faulty" PC is running > Windows XP Professional, version 202, Service Pack 3 > AMD Athlon > Core Processor 3800+ > 2.00 Ghz, 2.00 GB of RAM > Graphics card: NVIDIA GeForce8400GS, memory 512. MB, version > 6.14.0011.8250, date March 2009 > > The "good" PC is running > Windows XP Media center edition, version 2002, Service Pack 3 > Pentium 4 CPU > 3.06 GHz, 1.00 GB of RAM > Graphics card: NVIDIA GeForce7300LE, version 8.2.6.8, date June 2006 > > Could it be that the better/newer graphics card on the "faulty" > machine is not functioning properly and if so, how would I test it to > verify? > > Could the monitor for whatever reason be a problem? > > Also, I've noticed that the duration errors appear when I repeating > the SAME script -- if I run another script (which basically does the > exact same thing but is created in another E-studio set), it seems to > function fine. > > Any ideas will be greatly appreciated. > Thank you! > > Evelina -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From njvack at wisc.edu Tue Jan 25 14:45:24 2011 From: njvack at wisc.edu (Nate Vack) Date: Tue, 25 Jan 2011 08:45:24 -0600 Subject: Mystery timing issue In-Reply-To: <506002e0-f85f-4377-a391-3a027277c229@p38g2000vbn.googlegroups.com> Message-ID: On Mon, Jan 24, 2011 at 11:07 PM, Evelina Tapia wrote: > For various reasons I need to run my program on the "faulty" machine > so I would appreciate any ideas of what might be causing these timing > issues on one PC but not another. Either PC should be beefy enough -- and your "good" one is far and away the slower of the two computers. So, your two potential problem sources could be: * Hardware -- it's possible something like a failing hard drive could cause this. * Software -- maybe something is janked up with your Windows install. Or a virus scanner is running amok. Or a virus. Or your drivers are screwy. If your computer came with a diagnostics disk, run diagnostics and fix any problems reported. If not, your easiest course of action is probably to reformat and reload Windows. Or, if you have a little bit of money and need it working really soon, buy the cheapest PC you can find and run the task on that. Newegg.com lists refurbished computers starting at $110 and a bunch of new stuff in the $200 range. Good luck, -Nate -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 16:26:25 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 11:26:25 -0500 Subject: SRBox Port Number configured at runtime? In-Reply-To: <5f038536-8563-41a4-8126-17ecf98581e0@1g2000yqz.googlegroup s.com> Message-ID: Doug, Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... What version of E-Prime do you use? More importantly, what do you mean by "when we plug the device into a computer, it will be assigned whatever COM port is available"? Do you really mean that any single computer has dynamically assigned COM ports that can change whenever you plug a device into it? I have never heard of such a thing, so I would like to know more. Typically COM port addresses remain static in any one machine, so once you know what it is on that machine you can plug the SRBox into the COM port and it will not change, and you can edit the .es or .es2 file for that machine to refer to the appropriate COM port (just make sure that the COM port lies in the range 1-4). There are ways to do something like what you ask in both EP1 and EP2, but I don't yet understand why your situation requires this. BTW, if you do not have admin access to these PCs, then how do you get EP installed on them in the first place? -- David McFarlane, Professional Faultfinder At 1/23/2011 09:30 AM Sunday, you wrote: >We are using an SRBox and it seems we have to configure the COM port >number at design time. This doesn't work for us since when we plug the >device into a computer, it will be assigned whatever COM port is >available. We won't have administrative access on these machines, so >we won't be able to reassign the COM port with Device Manager. Even if >we could, it is possible that another device is currently using that >COM port number. So basically, we need the ability to specify the COM >port number of the SRBox to e-Prime at runtime. Is there a way to do >this with an external config file or something? > >Thanks in advance for any suggestions, >Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 16:42:38 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 11:42:38 -0500 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Without going into detail, you can use the Stretch property of any ImageDisplay or SlideImage object to make the image fit into any given Width and Height, and you can set the Width and Height properties (on the Frame tab) using attribute references. From there it is just a matter of collecting responses from the keyboard, mouse, joystick, or whatever, and using c.SetAttrib to manipulate the attributes for Width and Height. This will of course require a fair amount of inline code (with global variables, etc.). If you don't know what any of that means, then first please work through all the tutorials in the Getting Started Guide and User's Guide that came with E-Prime. -- David McFarlane, Professional Faultfinder "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." (Richard Feynman, Nobel prize-winning physicist) >Im new to using E prime, and although I have the basics down, i have >no idea how I would do this on E prime. In my experiment I need the >participants to be able to increase or decrease the size of a symbols, >and i need to be able to measure what size they make it. I think my >unit of measurement will be in pixels but besides that I have no idea >how I would be able to create this on E prime. Any help would be >great, thanks. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Tue Jan 25 17:25:09 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Tue, 25 Jan 2011 09:25:09 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4d3efd87.45d12a0a.18c9.ffffbc37SMTPIN_ADDED@gmr-mx.google.com> Message-ID: I understand how to influence the width and height on my end, but how can the participant influence the size when they do the experiment? And what do you mean by the inline code, do you mean the script, not fully sure how I would program that, I dont have that much experience in programming. On Jan 25, 11:42?am, David McFarlane wrote: > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it. ?3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > Without going into detail, you can use the Stretch property of any > ImageDisplay or SlideImage object to make the image fit into any > given Width and Height, and you can set the Width and Height > properties (on the Frame tab) using attribute references. ?From there > it is just a matter of collecting responses from the keyboard, mouse, > joystick, or whatever, and using c.SetAttrib to manipulate the > attributes for Width and Height. ?This will of course require a fair > amount of inline code (with global variables, etc.). > > If you don't know what any of that means, then first please work > through all the tutorials in the Getting Started Guide and User's > Guide that came with E-Prime. > > -- David McFarlane, Professional Faultfinder > "For a successful technology, reality must take precedence over > public relations, for nature cannot be fooled." ?(Richard Feynman, > Nobel prize-winning physicist) > > > > >Im new to using E prime, and although I have the basics down, i have > >no idea how I would do this on E prime. In my experiment I need the > >participants to be able to increase or decrease the size of a symbols, > >and i need to be able to measure what size they make it. I think my > >unit of measurement will be in pixels but besides that I have no idea > >how I would be able to create this on E prime. Any help would be > >great, thanks.- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From njvack at wisc.edu Tue Jan 25 17:53:45 2011 From: njvack at wisc.edu (Nate Vack) Date: Tue, 25 Jan 2011 11:53:45 -0600 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <8c4dfb6f-525a-48ac-af31-ba332b69adc6@f20g2000prn.googlegroups.com> Message-ID: On Tue, Jan 25, 2011 at 11:25 AM, Josh wrote: > I understand how to influence the width and height on my end, but how > can the participant influence the size when they do the experiment? > And what do you mean by the inline code, do you mean the script, not > fully sure how I would program that, I dont have that much experience > in programming. How do you envision people interacting with your script? There are lots of ways people might make something big or small and then say they're done. Do you want them to use a keyboard? Mouse? Joystick? How do you want them to use the device? Cheers, -Nate -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From evelina at illinois.edu Tue Jan 25 18:57:19 2011 From: evelina at illinois.edu (Evelina Tapia) Date: Tue, 25 Jan 2011 10:57:19 -0800 Subject: Mystery timing issue In-Reply-To: Message-ID: Liw, I use Pre-load and my images are very simple -- several kbs in size so I don't think this is the problem. Nate, thanks for the suggestions. I will try several things and share results :))) -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Tue Jan 25 19:24:33 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Tue, 25 Jan 2011 14:24:33 -0500 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <8c4dfb6f-525a-48ac-af31-ba332b69adc6@f20g2000prn.googlegro ups.com> Message-ID: >I understand how to influence the width and height on my end, but how >can the participant influence the size when they do the experiment? Are you asking us to design your user interface (i.e., the user gestures with a mouse or joystick, or presses arrow keys on the keyboard, etc.), or are you asking what sort of code to use to implement your UI (which you have not yet described for us)? If the latter, then my answer remains the same, you implement user control through application of *attribute references* in the Width and Height attributes. And I repeat, before you even start to think about this project you need to work through *all* of the tutorials in the manuals that came with E-Prime. >And what do you mean by the inline code, do you mean the script, Yes. What the rest of the VBA world calls "code", PST perversely calls "script". > not fully sure how I would program that, I dont have that much experience >in programming. I have said this before, and here I say it again: then perhaps you should take a class in introduction to computer programming. -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From avarga2 at tigers.lsu.edu Tue Jan 25 23:13:42 2011 From: avarga2 at tigers.lsu.edu (Alejandra Vargas) Date: Tue, 25 Jan 2011 17:13:42 -0600 Subject: E-Prime sound loop inline Message-ID: Hey all, I'm trying to find a way to loop sound in an inline script for my experiment. I put an inline at the beginning of the session to load the sound initially: >Dim MyBuffer As SoundBuffer >Dim GenericSoundBufferInfo As SoundBufferInfo >GenericSoundBufferInfo. MaxLength = 30500 >Set MyBuffer = Sound.CreateBuffer(GenericSoundBufferInfo) >MyBuffer.Filename = "Unknowncut3.wav" >MyBuffer.Load So this is the inline I used in the beginning. I want the sound to be played during two separate text displays at two different times in my experiment. So I put the following inline before both text displays: >myBuffer.Play This works just fine except that I need to get my sound clip to loop so that it plays throughout the entire text display. The sound clip is only 30 seconds long and I need it to play for about 108 seconds so it needs to loop about 4 times. I've looked all over the internet trying to find what scripting language I should use and where to put it to make the sound loop, but I'm not finding the answer. I tried soundout objects and I do get the sound to loop, but it doesn't play during my second text display. I'd really rather find a way to put some code in the inline to loop the sound. I know there has to be a way to do this, but I just can't figure it out! Please help! Any help would verrrry much be appreciated! Thanks in advance :) -Alejandra -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Jedema at pitt.edu Wed Jan 26 13:11:19 2011 From: Jedema at pitt.edu (Hank Jedema) Date: Wed, 26 Jan 2011 05:11:19 -0800 Subject: E-Prime sound loop inline In-Reply-To: Message-ID: Hi Alejandra, I had a similar problem with the sound not looping. I did contact E- Prime about it (as well as this group) and E-Prime acknowledged that they had a problem. As a result they include a change in the audio looping protocol in a new release (2.08.90), which did fix the problem. So get the newest revision from their website and see whether that helps. Best, Hank On Jan 25, 6:13?pm, Alejandra Vargas wrote: > Hey all, I'm trying to find a way to loop sound in an inline script for my > experiment. I put an inline at the beginning of the session to load the > sound initially: > > > > >Dim MyBuffer As SoundBuffer > >Dim GenericSoundBufferInfo As SoundBufferInfo > >GenericSoundBufferInfo. > MaxLength = 30500 > >Set MyBuffer = Sound.CreateBuffer(GenericSoundBufferInfo) > >MyBuffer.Filename = "Unknowncut3.wav" > >MyBuffer.Load > > So this is the inline I used in the beginning. I want the sound to be played > during two separate text displays at two different times in my experiment. > So I put the following inline before both text displays: > > >myBuffer.Play > > This works just fine except that I need to get my sound clip to loop so that > it plays throughout the entire text display. The sound clip is only 30 > seconds long and I need it to play for about 108 seconds so it needs to loop > about 4 times. I've looked all over the internet trying to find what > scripting language I should use and where to put it to make the sound loop, > but I'm not finding the answer. I tried soundout objects and I do get the > sound to loop, but it doesn't play during my second text display. I'd really > rather find a way to put some code in the inline to loop the sound. I know > there has to be a way to do this, but I just can't figure it out! Please > help! Any help would verrrry much be appreciated! Thanks in advance :) > > -Alejandra -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From girish1m at gmail.com Wed Jan 26 16:57:58 2011 From: girish1m at gmail.com (newbie) Date: Wed, 26 Jan 2011 08:57:58 -0800 Subject: Hand grip task using Eprime Message-ID: Hi, I am a beginner to E-Prime and have so far worked only on visual stimuli experiments. I am planning to work on a task wherein the subjects would be required to use a hand dynamo-meter/any device that measures the force applied by the subject on the grip. I am wondering whether it would be possible to write an E-prime program that reads in the output of the handgrip device i. e. the amount of force applied and shows instructions accordingly. For example, they would see something like "Press as much as you can", then they press and I want the output to be displayed on the eprime screen. Can anyone help me with the type of dynamometer/handgrip device that I should consider buying? The ease of its integration with E-prime would be the major factor here. Thanks in advance! newbie -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From susangc7 at gmail.com Wed Jan 26 17:13:08 2011 From: susangc7 at gmail.com (Susan) Date: Wed, 26 Jan 2011 09:13:08 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <56956aff-8649-4db9-9472-3874763af4c2@z26g2000prf.googlegroups.com> Message-ID: Hi Josh, I suspect what you need to do is sit and break your problem down into the smallest component parts, and figure out which bits you know how to do and which you don't. People on this list could probably help you if you got to the point where you needed to figure out the finer points of mouse control, for instance, but they can't design your experiment for you. I also don't know of any extant examples that do anything similar (STEP didn't have any last I checked). If you're a novice at programming, I'll suggest that the mouse may not be your best option, however; the built-in support for mouse control in E-Prime is pretty rudimentary. Your arrow key idea is probably easier to implement (possibly with very little script, if you're really determined). HTH, Susan On Jan 26, 10:36?am, Josh wrote: > I want the user to be able to influence the size by a mouse although > it might be easier to do it by pressing the arrow keys because > collecting button presses would probably better than if they used a > mouse, and im asking what kind of script would I have to write to do > that? And to Davids advice about taking a intro to computer > programming, I would love to and might be planning to take a class > next year but at this time I only have a semester to get this thesis > done, so i dont have time to take a intro class. Although I can > definately understand how it would help. Oh and about the arrow keys I > would assume it would probably be the up arrow key would make the > object bigger and the down arrow key would make the object larger. > > thank you, and sorry for the trouble. > > On Jan 25, 2:24?pm, David McFarlane wrote: > > > >I understand how to influence the width and height on my end, but how > > >can the participant influence the size when they do the experiment? > > > Are you asking us to design your user interface (i.e., the user > > gestures with a mouse or joystick, or presses arrow keys on the > > keyboard, etc.), or are you asking what sort of code to use to > > implement your UI (which you have not yet described for us)? ?If the > > latter, then my answer remains the same, you implement user control > > through application of *attribute references* in the Width and Height > > attributes. ?And I repeat, before you even start to think about this > > project you need to work through *all* of the tutorials in the > > manuals that came with E-Prime. > > > >And what do you mean by the inline code, do you mean the script, > > > Yes. ?What the rest of the VBA world calls "code", PST perversely > > calls "script". > > > > ?not fully sure how I would program that, I dont have that much experience > > >in programming. > > > I have said this before, and here I say it again: ?then perhaps you > > should take a class in introduction to computer programming. > > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Wed Jan 26 15:36:44 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Wed, 26 Jan 2011 07:36:44 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4d3f237a.44842a0a.7103.ffffbb6fSMTPIN_ADDED@gmr-mx.google.com> Message-ID: I want the user to be able to influence the size by a mouse although it might be easier to do it by pressing the arrow keys because collecting button presses would probably better than if they used a mouse, and im asking what kind of script would I have to write to do that? And to Davids advice about taking a intro to computer programming, I would love to and might be planning to take a class next year but at this time I only have a semester to get this thesis done, so i dont have time to take a intro class. Although I can definately understand how it would help. Oh and about the arrow keys I would assume it would probably be the up arrow key would make the object bigger and the down arrow key would make the object larger. thank you, and sorry for the trouble. On Jan 25, 2:24?pm, David McFarlane wrote: > >I understand how to influence the width and height on my end, but how > >can the participant influence the size when they do the experiment? > > Are you asking us to design your user interface (i.e., the user > gestures with a mouse or joystick, or presses arrow keys on the > keyboard, etc.), or are you asking what sort of code to use to > implement your UI (which you have not yet described for us)? ?If the > latter, then my answer remains the same, you implement user control > through application of *attribute references* in the Width and Height > attributes. ?And I repeat, before you even start to think about this > project you need to work through *all* of the tutorials in the > manuals that came with E-Prime. > > >And what do you mean by the inline code, do you mean the script, > > Yes. ?What the rest of the VBA world calls "code", PST perversely > calls "script". > > > ?not fully sure how I would program that, I dont have that much experience > >in programming. > > I have said this before, and here I say it again: ?then perhaps you > should take a class in introduction to computer programming. > > -- David McFarlane, Professional Faultfinder -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Wed Jan 26 20:10:59 2011 From: doug.girard at gmail.com (DGirard) Date: Wed, 26 Jan 2011 12:10:59 -0800 Subject: SRBox Port Number configured at runtime? In-Reply-To: <4d3ef9b9.13bbe70a.516c.ffffd24aSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Thanks for your response, David. On one machine, the COM port number won't change once I plug in the USB SRBox and it gets assigned a port number. HOWEVER, from machine to machine, the COM ports assigned may be different. That is a problem for us. We would like to be able to develop and generate one script file and distribute it around to different machines that have only the runtime version of E-Prime on them (no developer components). Currently, when our application is "compiled" the COM port number basically gets hard-coded into the code, so we would have to generate 4 different versions of the code for all possible COM port assignments. This seems a bit ridiculous. To answer a few of your other questions: We are using E-Prime 2.0. And someone from the IT department installs the runtime components of E- Prime on our machines as an Administrator, but afterward we are only ever running as a User (not an admin). Thanks again, - Doug On Jan 25, 11:26?am, David McFarlane wrote: > Doug, > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > takes any and all questions athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > strive to respond to all requests in 24-48 hours -- this is pretty > much their substitute for proper documentation, so make full use of > it. ?3) If you do get an answer from PST Web Support, please extend > the courtesy of posting their reply back here for the sake of others. > > That said, here is my take... > > What version of E-Prime do you use? ?More importantly, what do you > mean by "when we plug the device into a computer, it will be assigned > whatever COM port is available"? ?Do you really mean that any single > computer has dynamically assigned COM ports that can change whenever > you plug a device into it? ?I have never heard of such a thing, so I > would like to know more. ?Typically COM port addresses remain static > in any one machine, so once you know what it is on that machine you > can plug the SRBox into the COM port and it will not change, and you > can edit the .es or .es2 file for that machine to refer to the > appropriate COM port (just make sure that the COM port lies in the range 1-4). > > There are ways to do something like what you ask in both EP1 and EP2, > but I don't yet understand why your situation requires this. > > BTW, if you do not have admin access to these PCs, then how do you > get EP installed on them in the first place? > > -- David McFarlane, Professional Faultfinder > > At 1/23/2011 09:30 AM Sunday, you wrote: > > >We are using an SRBox and it seems we have to configure the COM port > >number at design time. This doesn't work for us since when we plug the > >device into a computer, it will be assigned whatever COM port is > >available. We won't have administrative access on these machines, so > >we won't be able to reassign the COM port with Device Manager. Even if > >we could, it is possible that another device is currently using that > >COM port number. So basically, we need the ability to specify the COM > >port number of the SRBox to e-Prime at runtime. Is there a way to do > >this with an external config file or something? > > >Thanks in advance for any suggestions, > >Doug > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From jwilsond at connect.carleton.ca Wed Jan 26 20:12:46 2011 From: jwilsond at connect.carleton.ca (Josh) Date: Wed, 26 Jan 2011 12:12:46 -0800 Subject: how to use E prime to display symbols and allowing participants to influence their shape? In-Reply-To: <4787f72e-8028-4239-864c-2080a8665e1b@21g2000prv.googlegroups.com> Message-ID: thanks, ill try to get what I can figure out done. On Jan 26, 12:13?pm, Susan wrote: > Hi Josh, > > I suspect what you need to do is sit and break your problem down into > the smallest component parts, and figure out which bits you know how > to do and which you don't. People on this list could probably help you > if you got to the point where you needed to figure out the finer > points of mouse control, for instance, but they can't design your > experiment for you. I also don't know of any extant examples that do > anything similar (STEP didn't have any last I checked). > > If you're a novice at programming, I'll suggest that the mouse may not > be your best option, however; the built-in support for mouse control > in E-Prime is pretty rudimentary. Your arrow key idea is probably > easier to implement (possibly with very little script, if you're > really determined). > > HTH, > Susan > > On Jan 26, 10:36?am, Josh wrote: > > > > > I want the user to be able to influence the size by a mouse although > > it might be easier to do it by pressing the arrow keys because > > collecting button presses would probably better than if they used a > > mouse, and im asking what kind of script would I have to write to do > > that? And to Davids advice about taking a intro to computer > > programming, I would love to and might be planning to take a class > > next year but at this time I only have a semester to get this thesis > > done, so i dont have time to take a intro class. Although I can > > definately understand how it would help. Oh and about the arrow keys I > > would assume it would probably be the up arrow key would make the > > object bigger and the down arrow key would make the object larger. > > > thank you, and sorry for the trouble. > > > On Jan 25, 2:24?pm, David McFarlane wrote: > > > > >I understand how to influence the width and height on my end, but how > > > >can the participant influence the size when they do the experiment? > > > > Are you asking us to design your user interface (i.e., the user > > > gestures with a mouse or joystick, or presses arrow keys on the > > > keyboard, etc.), or are you asking what sort of code to use to > > > implement your UI (which you have not yet described for us)? ?If the > > > latter, then my answer remains the same, you implement user control > > > through application of *attribute references* in the Width and Height > > > attributes. ?And I repeat, before you even start to think about this > > > project you need to work through *all* of the tutorials in the > > > manuals that came with E-Prime. > > > > >And what do you mean by the inline code, do you mean the script, > > > > Yes. ?What the rest of the VBA world calls "code", PST perversely > > > calls "script". > > > > > ?not fully sure how I would program that, I dont have that much experience > > > >in programming. > > > > I have said this before, and here I say it again: ?then perhaps you > > > should take a class in introduction to computer programming. > > > > -- David McFarlane, Professional Faultfinder- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Thu Jan 27 00:09:42 2011 From: issabern at gmail.com (issabern) Date: Wed, 26 Jan 2011 16:09:42 -0800 Subject: Run-Time Error 999 Message-ID: I've been receiving the run time error 999, "Filename is an invalid attribute". Does anyone have an idea what could be causing this error? Thanks in advance! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jens.bernhardsson at gmail.com Thu Jan 27 10:32:39 2011 From: jens.bernhardsson at gmail.com (jens) Date: Thu, 27 Jan 2011 02:32:39 -0800 Subject: Run-Time Error 999 In-Reply-To: <12729817.115.1296086982105.JavaMail.geo-discussion-forums@yqmi40> Message-ID: >From PST knowledge base: This error will occur if a List object calls a Procedure that does not exist. Typically, a yellow question mark (?) will appear beneath the List object callin the invalid Procedure. Check your List objects and ensure that the names under the Procedure column reference an existing Procedure. Best Jens On 27 Jan, 01:09, issabern wrote: > I've been receiving the run time error 999, "Filename is an invalid > attribute". Does anyone have an idea what could be causing this error? > > Thanks in advance! -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From issabern at gmail.com Thu Jan 27 15:52:32 2011 From: issabern at gmail.com (issabern) Date: Thu, 27 Jan 2011 07:52:32 -0800 Subject: Run-Time Error 999 In-Reply-To: Message-ID: Thanks for the quick response Jens! However, that doesn't seem to be an issue. I'm only getting the problem when I read my stimuli from a txt file. If I have it embedded I don't get the error. Could this be causing the problem? Thanks, Bernie -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mcfarla9 at msu.edu Thu Jan 27 22:15:20 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Thu, 27 Jan 2011 17:15:20 -0500 Subject: SRBox Port Number configured at runtime? In-Reply-To: <818cfed4-8bd3-4a23-80cd-620864ac6cd3@j19g2000prh.googlegro ups.com> Message-ID: Doug, OK, thanks for fleshing out the details. As long as the COM port remains stable on each machine, and you know what it is for each machine, then the clumsy but simple way to work around this is just to make a custom E-Run (.ebs2) file for each possible COM port. I.e., on your development station, open your .es2 file, and generate a .ebs2 with COM set to 1 (label it something like "MyExpt(COM1).ebs2)"; then set COM to port 2 and generate another .ebs2 file (e.g., "MyExpt(COM2).ebs2)"), etc. Once you have a collection of .ebs2 files for any COM port, just copy the appropriate file to each machine, and voila, all should run. But say you want a single .ebs "image" that you can run on each machine, using an external "config" file to customize it for each machine. Since you have EP2, you can take advantage of the new StartupInfo File feature, and in fact this very situation is covered in section 1.6.2.6 of the New Features Guide (but PST staff should have told you this already). (If you used EP1 instead of EP2, the the documentation for the StartupInfo File points the way to another workaround: you could store the COM address in an external text file; then, with some inline code, read it using Input# statements, and then, using the SRBox initializaton code already generated in the InitDevices subroutine as a guide, construct your own inline code to initialize the appropriate COM port.) I was a bit afraid that your COM port could change arbitrarily from session to session on a single machine, and that you wanted E-Prime to dynamically configure itself on each session. That *would* have been a tall order! (BTW I regularly advise *against* using a "runtime" installation, as I have explained at http://support.pstnet.com/forum/Topic3736-4-1.aspx , http://groups.google.com/group/e-prime/browse_thread/thread/1ab4456e77da1eaf , and http://groups.google.com/group/e-prime/browse_thread/thread/caa60dee31e74f35 .) -- David McFarlane, Professional Faultfinder At 1/26/2011 03:10 PM Wednesday, you wrote: >Thanks for your response, David. On one machine, the COM port number >won't change once I plug in the USB SRBox and it gets assigned a port >number. HOWEVER, from machine to machine, the COM ports assigned may >be different. That is a problem for us. We would like to be able to >develop and generate one script file and distribute it around to >different machines that have only the runtime version of E-Prime on >them (no developer components). Currently, when our application is >"compiled" the COM port number basically gets hard-coded into the >code, so we would have to generate 4 different versions of the code >for all possible COM port assignments. This seems a bit ridiculous. > >To answer a few of your other questions: We are using E-Prime 2.0. And >someone from the IT department installs the runtime components of E- >Prime on our machines as an Administrator, but afterward we are only >ever running as a User (not an admin). > >Thanks again, >- Doug > >On Jan 25, 11:26 am, David McFarlane wrote: > > Doug, > > > > Stock reminder: 1) I do not work for PST. 2) PST's trained staff > > takes any and all questions > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > strive to respond to all requests in 24-48 hours -- this is pretty > > much their substitute for proper documentation, so make full use of > > it. 3) If you do get an answer from PST Web Support, please extend > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > What version of E-Prime do you use? More importantly, what do you > > mean by "when we plug the device into a computer, it will be assigned > > whatever COM port is available"? Do you really mean that any single > > computer has dynamically assigned COM ports that can change whenever > > you plug a device into it? I have never heard of such a thing, so I > > would like to know more. Typically COM port addresses remain static > > in any one machine, so once you know what it is on that machine you > > can plug the SRBox into the COM port and it will not change, and you > > can edit the .es or .es2 file for that machine to refer to the > > appropriate COM port (just make sure that the COM port lies in > the range 1-4). > > > > There are ways to do something like what you ask in both EP1 and EP2, > > but I don't yet understand why your situation requires this. > > > > BTW, if you do not have admin access to these PCs, then how do you > > get EP installed on them in the first place? > > > > -- David McFarlane, Professional Faultfinder > > > > At 1/23/2011 09:30 AM Sunday, you wrote: > > > > >We are using an SRBox and it seems we have to configure the COM port > > >number at design time. This doesn't work for us since when we plug the > > >device into a computer, it will be assigned whatever COM port is > > >available. We won't have administrative access on these machines, so > > >we won't be able to reassign the COM port with Device Manager. Even if > > >we could, it is possible that another device is currently using that > > >COM port number. So basically, we need the ability to specify the COM > > >port number of the SRBox to e-Prime at runtime. Is there a way to do > > >this with an external config file or something? > > > > >Thanks in advance for any suggestions, > > >Doug -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From dragoblu at gmail.com Sat Jan 29 17:59:40 2011 From: dragoblu at gmail.com (EC) Date: Sat, 29 Jan 2011 09:59:40 -0800 Subject: Experiment Start timestamp Message-ID: Hello everyone, in the experiment data, OnsetTime and all the other Time Audit variables are measured in milliseconds since the experiment started. Is there way to know when the experiment started in "computer time", that is - a timestamp (in milliseconds) of the system clock at the start? In other words, when "Clock.Read = 0" happened? :) I ask because I have an external device which has a clock synchronized to the computer clock and I would to be able to combine data from the external device with E-prime data. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From doug.girard at gmail.com Sun Jan 30 15:58:32 2011 From: doug.girard at gmail.com (DGirard) Date: Sun, 30 Jan 2011 07:58:32 -0800 Subject: SRBox Port Number configured at runtime? In-Reply-To: <4d41ee83.9915e70a.15d9.2c2eSMTPIN_ADDED@gmr-mx.google.com> Message-ID: Great. Using a local StartupInfo file is exactly what I wanted. - Doug On Jan 27, 5:15?pm, David McFarlane wrote: > Doug, > > OK, thanks for fleshing out the details. ?As long as the COM port > remains stable on each machine, and you know what it is for each > machine, then the clumsy but simple way to work around this is just > to make a custom E-Run (.ebs2) file for each possible COM > port. ?I.e., on your development station, open your .es2 file, and > generate a .ebs2 with COM set to 1 (label it something like > "MyExpt(COM1).ebs2)"; then set COM to port 2 and generate another > .ebs2 file (e.g., "MyExpt(COM2).ebs2)"), etc. ?Once you have a > collection of .ebs2 files for any COM port, just copy the appropriate > file to each machine, and voila, all should run. > > But say you want a single .ebs "image" that you can run on each > machine, using an external "config" file to customize it for each > machine. ?Since you have EP2, you can take advantage of the new > StartupInfo File feature, and in fact this very situation is covered > in section 1.6.2.6 of the New Features Guide (but PST staff should > have told you this already). ?(If you used EP1 instead of EP2, the > the documentation for the StartupInfo File points the way to another > workaround: ?you could store the COM address in an external text > file; then, with some inline code, read it using Input# statements, > and then, using the SRBox initializaton code already generated in the > InitDevices subroutine as a guide, construct your own inline code to > initialize the appropriate COM port.) > > I was a bit afraid that your COM port could change arbitrarily from > session to session on a single machine, and that you wanted E-Prime > to dynamically configure itself on each session. ?That *would* have > been a tall order! > > (BTW I regularly advise *against* using a "runtime" installation, as > I have explained athttp://support.pstnet.com/forum/Topic3736-4-1.aspx,http://groups.google.com/group/e-prime/browse_thread/thread/1ab4456e7... > , andhttp://groups.google.com/group/e-prime/browse_thread/thread/caa60dee3....) > > -- David McFarlane, Professional Faultfinder > > At 1/26/2011 03:10 PM Wednesday, you wrote: > > >Thanks for your response, David. On one machine, the COM port number > >won't change once I plug in the USB SRBox and it gets assigned a port > >number. HOWEVER, from machine to machine, the COM ports assigned may > >be different. That is a problem for us. We would like to be able to > >develop and generate one script file and distribute it around to > >different machines that have only the runtime version of E-Prime on > >them (no developer components). Currently, when our application is > >"compiled" the COM port number basically gets hard-coded into the > >code, so we would have to generate 4 different versions of the code > >for all possible COM port assignments. This seems a bit ridiculous. > > >To answer a few of your other questions: We are using E-Prime 2.0. And > >someone from the IT department installs the runtime components of E- > >Prime on our machines as an Administrator, but afterward we are only > >ever running as a User (not an admin). > > >Thanks again, > >- Doug > > >On Jan 25, 11:26 am, David McFarlane wrote: > > > Doug, > > > > Stock reminder: ?1) I do not work for PST. ?2) PST's trained staff > > > takes any and all questions > > athttp://support.pstnet.com/e%2Dprime/support/login.asp, and they > > > strive to respond to all requests in 24-48 hours -- this is pretty > > > much their substitute for proper documentation, so make full use of > > > it. ?3) If you do get an answer from PST Web Support, please extend > > > the courtesy of posting their reply back here for the sake of others. > > > > That said, here is my take... > > > > What version of E-Prime do you use? ?More importantly, what do you > > > mean by "when we plug the device into a computer, it will be assigned > > > whatever COM port is available"? ?Do you really mean that any single > > > computer has dynamically assigned COM ports that can change whenever > > > you plug a device into it? ?I have never heard of such a thing, so I > > > would like to know more. ?Typically COM port addresses remain static > > > in any one machine, so once you know what it is on that machine you > > > can plug the SRBox into the COM port and it will not change, and you > > > can edit the .es or .es2 file for that machine to refer to the > > > appropriate COM port (just make sure that the COM port lies in > > the range 1-4). > > > > There are ways to do something like what you ask in both EP1 and EP2, > > > but I don't yet understand why your situation requires this. > > > > BTW, if you do not have admin access to these PCs, then how do you > > > get EP installed on them in the first place? > > > > -- David McFarlane, Professional Faultfinder > > > > At 1/23/2011 09:30 AM Sunday, you wrote: > > > > >We are using an SRBox and it seems we have to configure the COM port > > > >number at design time. This doesn't work for us since when we plug the > > > >device into a computer, it will be assigned whatever COM port is > > > >available. We won't have administrative access on these machines, so > > > >we won't be able to reassign the COM port with Device Manager. Even if > > > >we could, it is possible that another device is currently using that > > > >COM port number. So basically, we need the ability to specify the COM > > > >port number of the SRBox to e-Prime at runtime. Is there a way to do > > > >this with an external config file or something? > > > > >Thanks in advance for any suggestions, > > > >Doug > > -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en. From mcfarla9 at msu.edu Mon Jan 31 21:41:19 2011 From: mcfarla9 at msu.edu (David McFarlane) Date: Mon, 31 Jan 2011 16:41:19 -0500 Subject: Experiment Start timestamp In-Reply-To: <63ec215f-733f-4148-9b56-887ccf7fae65@k14g2000pre.googlegro ups.com> Message-ID: Stock reminder: 1) I do not work for PST. 2) PST's trained staff takes any and all questions at http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive to respond to all requests in 24-48 hours -- this is pretty much their substitute for proper documentation, so make full use of it. 3) If you do get an answer from PST Web Support, please extend the courtesy of posting their reply back here for the sake of others. That said, here is my take... Hmm, you no doubt already know that SessionTime in the .edat file records the clock time for the start of the experiment, but I suspect you want something that records the clock time down the millisecond, whereas SessionTime goes only to the second. That will be a tall order, because typically Windows does not keep clock time down to ms resolution, E-Prime only gets that by interposing DirectX commands. E.g., you could use the Time$ function, but that goes down only to seconds (and is what SessionTime already uses anyway, as you can see by reading the generated E-Run code). You might instead use some common signal to start both your EP experiment and your external device at the same time, and then count from there. Or you might program your EP experiment to delay until the clock time reaches some round value, although once again I would not expect that to be accurate down to the millisecond. -- David McFarlane, Professional Faultfinder At 1/29/2011 12:59 PM Saturday, EC wrote: >Hello everyone, >in the experiment data, OnsetTime and all the other Time Audit >variables are measured in milliseconds since the experiment started. >Is there way to know when the experiment started in "computer time", >that is - a timestamp (in milliseconds) of the system clock at the >start? >In other words, when "Clock.Read = 0" happened? :) >I ask because I have an external device which has a clock synchronized >to the computer clock and I would to be able to combine data from the >external device with E-prime data. -- You received this message because you are subscribed to the Google Groups "E-Prime" group. To post to this group, send email to e-prime at googlegroups.com. To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com. For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.