Using the Include element to conditionally select vids based on OS


Author
Message
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Great! Thanks for confirming that.


LibbyLu43
LibbyLu43
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 22, Visits: 1

That did it!!! You were correct, "windows" needed to be changed to "win" in the syntax.


Thanks Dave!!


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Alternatively, there may be something wrong with the /preconditions in your <include>s. Check what the computer.platform property returns (the documentation is unfortunately inconsistent regarding this) by displaying:


<text mytext>
/ items = ("<%computer.platform%>")
</text>


Do the same on the Mac.


It might be "win" for Windows and "mac" for MacOS, the example in the <include> language reference mentions "windows", though.


As far as I can tell, it's "win".


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

Check your scripts. The error indicates you have not renamed the elements properly, i.e., in all include files (see all the portions highlighted in red in my previous reply).


LibbyLu43
LibbyLu43
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 22, Visits: 1

Ok, that makes sense.


I changed the block names to what you indicated in red, but now I'm getting the below error message.



















System error QFile::5: The system cannot find the path specified.
Line 265, File Path.cpp



Could not locate element 'HN'.



block 1 is unassigned.





Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K


<expt>
/ blocks = [1=HNm; 2=HNw]
</expt>


Note that this does not make sense. I very much doubt you'd want the script to run *both* blocks (w for windows, m for mac). And that obviously can't work because only one file will be included, and that file will only contain one of those blocks. What you want is


Include script:
<defaults>
/ windowsize = (90%, 90%)
</defaults>

<expt>
/ blocks = [1=HN]
</expt>

<include>
/precondition = [computer.platform == "windows"]
/file = "HNvidWMV.iqx"
</include>

<include>
/precondition = [computer.platform == "mac"]
/file = "HNvidMOV.iqx"
</include>


MOV video script:
<block HN>
/ trials = [1=HNvidm]
</block>

<trial HNvidm>
/ stimulustimes = [0=HNvidm]
/ response = noresponse
/ timeout = 1
</trial>

<video HNvidm>
/ items = ("High Negative.mov")
/ playthrough = true
/ position = (50%, 50%)
/ size = (50%, 50%)
</video>


WMV video script
<block HN>
/ trials = [1=HNvidw]
</block>

<trial HNvidw>
/ stimulustimes = [0=HNvidw]
/ response = noresponse
/ timeout = 1
</trial>

<video HNvidw>
/ items = ("HN.wmv")
/ playthrough = true
/ position = (50%, 50%)
/ size = (50%, 50%)
</video>


Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 108K

I'm still getting an error when I test online


And that error would be?


Have you made sure you've uploaded all the additional files to the server?


LibbyLu43
LibbyLu43
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 22, Visits: 1

oh, and the file names for each script are


Batch:
"Batch"


Include:
"HN"


MOV video script:
"HNvidMOV"


WMV video script:
"HNvidWMV"


LibbyLu43
LibbyLu43
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 22, Visits: 1

Ok, I followed all the instructions for <include> i.e. the syntax, and also from this page: (http://www.millisecond.com/support/docs/v3/html/howto/multiplescripts.htm), but I'm still getting an error when I test online (and also getting a major headache lol as I'm sure you are too from all my posts). Here are examples of one set of my scripts (i.e. the batch, the include script, the script for the MOV video, and the script for the WMV video):


Batch:
<batch GroupHN>
/ subjects = (1 of 5)
/ file = "Consent.iqx"
/ file = "SoundTest.iqx"
/ file = "Demographics.iqx"
/ file = "Emotions1.iqx"
/ file = "Stroop1.iqx"
/ file = "HN.iqx"
/ file = "Emotions2.iqx"
/ file = "Stroop2.iqx"
/ file = "Part2.iqx"
</batch>



Include script:
<defaults>
/ windowsize = (90%, 90%)
</defaults>

<expt>
/ blocks = [1=HNm; 2=HNw]
</expt>

<include>
/precondition = [computer.platform == "windows"]
/file = "HNvidWMV.iqx"
</include>

<include>
/precondition = [computer.platform == "mac"]
/file = "HNvidMOV.iqx"
</include>



MOV video script:
<block HNm>
/ trials = [1=HNvidm]
</block>

<trial HNvidm>
/ stimulustimes = [0=HNvidm]
/ response = noresponse
/ timeout = 1
</trial>

<video HNvidm>
/ items = ("High Negative.mov")
/ playthrough = true
/ position = (50%, 50%)
/ size = (50%, 50%)
</video>



WMV video script
<block HNw>
/ trials = [1=HNvidw]
</block>

<trial HNvidw>
/ stimulustimes = [0=HNvidw]
/ response = noresponse
/ timeout = 1
</trial>

<video HNvidw>
/ items = ("HN.wmv")
/ playthrough = true
/ position = (50%, 50%)
/ size = (50%, 50%)
</video>


LibbyLu43
LibbyLu43
Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)Expert (1.2K reputation)
Group: Forum Members
Posts: 22, Visits: 1

Right, I knew how to write the syntax, just not where it should go (i.e. in the batch script, in the video script, or in it's own separate file) - so thanks for clearing that up!


Have a good one,


Libby


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search