Need help formatting conditions
 
 
 
PST User Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Need help formatting conditions Expand / Collapse
Author
Message
Posted 10/3/2008 4:05:29 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 10/9/2008 12:31:29 PM
Posts: 1, Visits: 5
Hello everyone!

I am wondering if anybody knows if you can integrate different experimental conditions into one program file. That is, if there is any way there can be an option to pick a condition when you begin the experiment instead of having separate files for each condition. If anyone can be of any help we would greatly appreciate it! If anyone requires more clarification of the situation please don't hesitate to let me know.

Thank you!
Post #2206
Posted 10/7/2008 4:32:25 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Forum Members
Last Login: Today @ 5:01:25 PM
Posts: 336, Visits: 897
QVCL,

One thought... Add an attribute such as "Condition" to the Startup Info of the the Experiment Object (for help on this, see the appropriate section of the Reference Guide that came with E-Prime). Then, in some script at the start of the program, use some If... Then.. Else..., or Select... Case, plus some Goto, such as


Select Case c.GetAttrib("Condition")
Case "A"
Goto LabelA
Case "B"
Goto LabelB
Case "C"
Goto LabelC
Case Else ' sanity check
MsgBox "Invalid input for Condition"
Goto LabelError
End Select


-- David McFarlane, Professional Faultfinder
Post #2236
Posted 10/7/2008 4:40:25 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Forum Members
Last Login: Today @ 5:01:25 PM
Posts: 336, Visits: 897
Wow, I just cannot stand seeing that without proper indenting, let's do that again using HTML nonbreaking spaces:

Select Case c.GetAttrib("Condition")
&nbps;&nbps;Case "A"
&nbps;&nbps;&nbps;&nbps;Goto LabelA
&nbps;&nbps;Case "B"
&nbps;&nbps;&nbps;&nbps;Goto LabelB
&nbps;&nbps;Case "C"
&nbps;&nbps;&nbps;&nbps;Goto LabelC
&nbps;&nbps;Case Else ' sanity check
&nbps;&nbps;&nbps;&nbps;MsgBox "Invalid input for Condition"
&nbps;&nbps;&nbps;&nbps;Goto LabelError
End Select

Say, could someone from PST give me a clue how to post examples that obey my indenting and embedded space formatting? Thanks.

-- David McFarlane, Professional Faultfinder
Post #2237
Posted 10/7/2008 4:42:02 PM
Forum MVP

Forum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVPForum MVP

Group: Forum Members
Last Login: Today @ 5:01:25 PM
Posts: 336, Visits: 897
Oops, I will keep trying this until I get it right...

Select Case c.GetAttrib("Condition")
  Case "A"
    Goto LabelA
  Case "B"
    Goto LabelB
  Case "C"
    Goto LabelC
  Case Else ' sanity check
    MsgBox "Invalid input for Condition"
    Goto LabelError
End Select

-- David McFarlane, Professional Faultfinder
Post #2238
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -5:00, Time now is 7:50pm

Powered By InstantForum.NET v4.1.4 © 2009
Execution: 0.078. 11 queries. Compression Disabled.