Quitting a batch file


Author
Message
briancjo
briancjo
Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)
Group: Forum Members
Posts: 25, Visits: 167
Supreme Being Davidoff,

I searched around but I couldn't find anything where a subject could quit all of scripts in a batch.

For example, using Inquisit Web, if a subject signs a consent and then decides in the next script to quit, quitting (eg, alt+18) would only get them out of that current script.
Then the subject would have to quit or I guess force quit the program. Is there an other way?

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: 12K, Visits: 98K
To terminate an entire <batch>, you need to use the script.abort() function if consent is declined.

See https://www.millisecond.com/support/docs/v4/html/language/functions/abort.htm and
the consent form demo at https://www.millisecond.com/download/library/Tutorials/

Instead, however, you may simply want to integrate your consent form into the launch page via the consent form option. That way, no scripts would ever be run if the person declines consent, making use of script.abort() unnecessary.

https://www.millisecond.com/forums/uploads/images/8478367c-2bdd-4c8f-a50f-c3f5.jpg

briancjo
briancjo
Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)
Group: Forum Members
Posts: 25, Visits: 167
Dave,
1. IN my study, i have 3 parts: questionnaires, computer tasks, questionnaires.
With regard to quitting the entire batch, let's say a participant consents, but then decides during or after the questionnaires, they do not want to continue, what are my options to them in the script to abort the rest of the batch?

2. for one of my tasks, i have a long series of instructions. originally i had it in a powerpoint and then saved/presented as a pdf.
Now that i've decided to put it on the web, i translated these instructions into an iqx by copy/pasting each slides into a doc and then saved it as an htm file.
long-winded, but it worked beautifullly. howeevr, in testing it on a PC (i wrote the script on a mac) none of the pictures appear. any thoguhts?

Code:
<expt>
/ preinstructions = (intro)
/ blocks = [1=DISC1WebHTM]
/ postinstructions = (end)
</expt>

<data>
/columns =[date time subject blocknum trialnum trialcode response latency stimulus]
/format=tab
</data>

<defaults>
/screencolor = (200, 200, 200)
/font = ("Arial", -24, 700, 0, 49)
/txbgcolor = (255,255,255)
/ quitcommand = (Alt+18)
/inputdevice = mouse
</defaults>

**********************************
**********************************
HTML CODE
**********************************
**********************************

<htmlpage Disc1WebHTM>
/ file="Disc1WebHTMbig.htm"
</htmlpage>

<block Disc1WebHTM>
/ postinstructions=(Disc1WebHTM)
</block>

**********************************
**********************************
Pre/Post

<page intro>
The next screen introduces the first computer task and provides specific instructions for the task. Please read this carefully.^^

To scroll, click on the center window and use the up/down keys, or use the mouse scroll function.
</page>

<page end>
Click 'Next' for the practice puzzle.
</page>

<instruct>
/windowsize = (800, 600)
/ finishlabel = "Next"
</instruct>

Id really hate to create trial-base script of each slides as a picture, but do you have any thoughts on why it doesn't show up on PCs (tested the script on 2 separate ones). Is there another way to take a pdf/doc and upload it as instructions?

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: 12K, Visits: 98K
Re. #1:
> [...] let's say a participant consents, but then decides during or after the questionnaires, they do not want to continue, what are my options to
> them in the script to abort the rest of the batch?

The same as in the consent script. You need to designate / include a response in the script that indicates "I want to quit" and then call the script.abort() function if that response occurs.

Re. #2:
- Word generates horrible HTML. It's better to use an actual HTML editor to create such pages.
- I don't know why "the pictures don't appear". Obviously, the images need to be actually there for them to be able to be displayed on a HTML page. If you want things to work on the web, the images may also not reside in a sub-directory.
- Generally, it may be better to convert your PowerPoint slides to simple images and then display those images in your script using standard a <picture> and <trial> element.

Hope this helps.

briancjo
briancjo
Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)
Group: Forum Members
Posts: 25, Visits: 167
Dave - Tuesday, October 25, 2016
Re. #1:
> [...] let's say a participant consents, but then decides during or after the questionnaires, they do not want to continue, what are my options to
> them in the script to abort the rest of the batch?

The same as in the consent script. You need to designate / include a response in the script that indicates "I want to quit" and then call the script.abort() function if that response occurs.

Re. #2:
- Word generates horrible HTML. It's better to use an actual HTML editor to create such pages.
- I don't know why "the pictures don't appear". Obviously, the images need to be actually there for them to be able to be displayed on a HTML page. If you want things to work on the web, the images may also not reside in a sub-directory.
- Generally, it may be better to convert your PowerPoint slides to simple images and then display those images in your script using standard a <picture> and <trial> element.

Hope this helps.

So I created the picture trial element. Because the pictures are instructions, I want subjects to be able to go back to previous instruction pages if they wish. This seems really simple but I can't figure out how to do it. Is there a way to just have 2 buttons per trial page to go next or back?

Here's my relevant code

<block DISC1WebRules>
/ trials = [1-36=Rules]
</block>

<instruct>
/windowsize = (800, 600)
/ finishlabel = "Press <Spacebar> to continue"
/nextkey = (57)
/nextlabel = "Next"
/prevkey = (28)
/prevlabel = "Back"
</instruct>
values>
/ itemnumber = 1
</values>

<item Disc1WebRules>
/1 = "Disc1WebRules01.jpg"
/2 = "Disc1WebRules02.jpg"
/3 = "Disc1WebRules03.jpg"
/4 = "Disc1WebRules04.jpg"
/5 = "Disc1WebRules05.jpg"
/6 = "Disc1WebRules06.jpg"
/7 = "Disc1WebRules07.jpg"
/8 = "Disc1WebRules08.jpg"
/9 = "Disc1WebRules09.jpg"
/10 = "Disc1WebRules10.jpg"
/11 = "Disc1WebRules11.jpg"
/12 = "Disc1WebRules12.jpg"
/13 = "Disc1WebRules13.jpg"
/14 = "Disc1WebRules14.jpg"
/15 = "Disc1WebRules15.jpg"
/16 = "Disc1WebRules16.jpg"
/17 = "Disc1WebRules17.jpg"
/18 = "Disc1WebRules18.jpg"
/19 = "Disc1WebRules19.jpg"
/20 = "Disc1WebRules20.jpg"
/21 = "Disc1WebRules21.jpg"
/22 = "Disc1WebRules22.jpg"
/23 = "Disc1WebRules23.jpg"
/24 = "Disc1WebRules24.jpg"
/25 = "Disc1WebRules25.jpg"
/26 = "Disc1WebRules26.jpg"
/27 = "Disc1WebRules27.jpg"
/28 = "Disc1WebRules28.jpg"
/29 = "Disc1WebRules29.jpg"
/30 = "Disc1WebRules30.jpg"
/31 = "Disc1WebRules31.jpg"
/32 = "Disc1WebRules32.jpg"
/33 = "Disc1WebRules33.jpg"
/34 = "Disc1WebRules34.jpg"
/35 = "Disc1WebRules35.jpg"
/36 = "Disc1WebRules36.jpg"
</item>

<picture Rules>
/items = DISC1WebRules
/select = values.itemnumber
</picture>

<trial Rules>
/ontrialbegin = [values.itemnumber=values.itemnumber+1]
/stimulusframes = [1 = Rules]
/validresponse = (28,57)
</trial>

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: 12K, Visits: 98K
briancjo - Friday, November 11, 2016
Dave - Tuesday, October 25, 2016
Re. #1:
> [...] let's say a participant consents, but then decides during or after the questionnaires, they do not want to continue, what are my options to
> them in the script to abort the rest of the batch?

The same as in the consent script. You need to designate / include a response in the script that indicates "I want to quit" and then call the script.abort() function if that response occurs.

Re. #2:
- Word generates horrible HTML. It's better to use an actual HTML editor to create such pages.
- I don't know why "the pictures don't appear". Obviously, the images need to be actually there for them to be able to be displayed on a HTML page. If you want things to work on the web, the images may also not reside in a sub-directory.
- Generally, it may be better to convert your PowerPoint slides to simple images and then display those images in your script using standard a <picture> and <trial> element.

Hope this helps.

So I created the picture trial element. Because the pictures are instructions, I want subjects to be able to go back to previous instruction pages if they wish. This seems really simple but I can't figure out how to do it. Is there a way to just have 2 buttons per trial page to go next or back?

Here's my relevant code

<block DISC1WebRules>
/ trials = [1-36=Rules]
</block>

<instruct>
/windowsize = (800, 600)
/ finishlabel = "Press <Spacebar> to continue"
/nextkey = (57)
/nextlabel = "Next"
/prevkey = (28)
/prevlabel = "Back"
</instruct>
values>
/ itemnumber = 1
</values>

<item Disc1WebRules>
/1 = "Disc1WebRules01.jpg"
/2 = "Disc1WebRules02.jpg"
/3 = "Disc1WebRules03.jpg"
/4 = "Disc1WebRules04.jpg"
/5 = "Disc1WebRules05.jpg"
/6 = "Disc1WebRules06.jpg"
/7 = "Disc1WebRules07.jpg"
/8 = "Disc1WebRules08.jpg"
/9 = "Disc1WebRules09.jpg"
/10 = "Disc1WebRules10.jpg"
/11 = "Disc1WebRules11.jpg"
/12 = "Disc1WebRules12.jpg"
/13 = "Disc1WebRules13.jpg"
/14 = "Disc1WebRules14.jpg"
/15 = "Disc1WebRules15.jpg"
/16 = "Disc1WebRules16.jpg"
/17 = "Disc1WebRules17.jpg"
/18 = "Disc1WebRules18.jpg"
/19 = "Disc1WebRules19.jpg"
/20 = "Disc1WebRules20.jpg"
/21 = "Disc1WebRules21.jpg"
/22 = "Disc1WebRules22.jpg"
/23 = "Disc1WebRules23.jpg"
/24 = "Disc1WebRules24.jpg"
/25 = "Disc1WebRules25.jpg"
/26 = "Disc1WebRules26.jpg"
/27 = "Disc1WebRules27.jpg"
/28 = "Disc1WebRules28.jpg"
/29 = "Disc1WebRules29.jpg"
/30 = "Disc1WebRules30.jpg"
/31 = "Disc1WebRules31.jpg"
/32 = "Disc1WebRules32.jpg"
/33 = "Disc1WebRules33.jpg"
/34 = "Disc1WebRules34.jpg"
/35 = "Disc1WebRules35.jpg"
/36 = "Disc1WebRules36.jpg"
</item>

<picture Rules>
/items = DISC1WebRules
/select = values.itemnumber
</picture>

<trial Rules>
/ontrialbegin = [values.itemnumber=values.itemnumber+1]
/stimulusframes = [1 = Rules]
/validresponse = (28,57)
</trial>

Yes, you can do that by either in- or decreasing values.itemnumber depending on the response /ontrialend.

<block DISC1WebRules>
/ trials = [1=Rules]
/ stop = [values.itemnumber > 36 && trial.rules.response == 57]

</block>

<values>
/ itemnumber = 1
</values>

<item Disc1WebRules>
/1 = "Disc1WebRules01.jpg"
/2 = "Disc1WebRules02.jpg"
/3 = "Disc1WebRules03.jpg"
/4 = "Disc1WebRules04.jpg"
/5 = "Disc1WebRules05.jpg"
/6 = "Disc1WebRules06.jpg"
/7 = "Disc1WebRules07.jpg"
/8 = "Disc1WebRules08.jpg"
/9 = "Disc1WebRules09.jpg"
/10 = "Disc1WebRules10.jpg"
/11 = "Disc1WebRules11.jpg"
/12 = "Disc1WebRules12.jpg"
/13 = "Disc1WebRules13.jpg"
/14 = "Disc1WebRules14.jpg"
/15 = "Disc1WebRules15.jpg"
/16 = "Disc1WebRules16.jpg"
/17 = "Disc1WebRules17.jpg"
/18 = "Disc1WebRules18.jpg"
/19 = "Disc1WebRules19.jpg"
/20 = "Disc1WebRules20.jpg"
/21 = "Disc1WebRules21.jpg"
/22 = "Disc1WebRules22.jpg"
/23 = "Disc1WebRules23.jpg"
/24 = "Disc1WebRules24.jpg"
/25 = "Disc1WebRules25.jpg"
/26 = "Disc1WebRules26.jpg"
/27 = "Disc1WebRules27.jpg"
/28 = "Disc1WebRules28.jpg"
/29 = "Disc1WebRules29.jpg"
/30 = "Disc1WebRules30.jpg"
/31 = "Disc1WebRules31.jpg"
/32 = "Disc1WebRules32.jpg"
/33 = "Disc1WebRules33.jpg"
/34 = "Disc1WebRules34.jpg"
/35 = "Disc1WebRules35.jpg"
/36 = "Disc1WebRules36.jpg"
</item>

<picture Rules>
/items = DISC1WebRules
/select = values.itemnumber
</picture>

<trial Rules>
/ ontrialend = [if (trial.rules.response == 57) values.itemnumber += 1; ]
/ ontrialend = [if (trial.rules.response == 28) values.itemnumber -= 1; ]
/ ontrialend = [if (values.itemnumber <= 0) values.itemnumber = 1; ]

/stimulusframes = [1 = Rules]
/validresponse = (28,57)
/ branch = [trial.rules]
</trial>

briancjo
briancjo
Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)Distinguished Member (3.9K reputation)
Group: Forum Members
Posts: 25, Visits: 167
Thanks Dave.

Here is the code for my 2 condition batch script.
***
<batch>
/ subjects = (1 of 2)
/groupassignment = groupnumber
/ file = "Consent.iqx"
/ file = "JoBrianDemo.iqx"
/ file = "BJoQ1.iqx"
/ file = "Disc2WebRules.iqx"
/ file = "Disc2Web.iqx"
/ file = "ST-IAT-SC.iqx"
/ file = "IPANAT.iqx"
/ file = "CBFinal.iqx"
/ file = "ST-IAT-DPD.iqx"
/ file = "BJoQ2.iqx"
/ file = "DebriefS.iqx"
</batch>

<batch>
/subjects = (2 of 2)
/groupassignment = groupnumber
/ file = "Consent.iqx"
/ file = "JoBrianDemo.iqx"
/ file = "BJoQ1.iqx"
/ file = "Disc1WebRules.iqx"
/ file = "Disc1Web.iqx"
/ file = "ST-IAT-SC.iqx"
/ file = "IPANAT.iqx"
/ file = "CBFinal.iqx"
/ file = "ST-IAT-DPD.iqx"
/ file = "BJoQ2.iqx"
/ file = "DebriefF.iqx"
</batch>
***
Having done all the coding (Thanks a BUNCH) now I am having trouble setting up a web script.
1.Problem with GroupID input to set the condition
-Like you recommended, the consent is now apart of the launch page, so that the script does not even run if they choose to quit. However, this brings up a problem because while the web player prompts for subject ID, it does not prompt for group id like the lab version does. So if there is no prompt for group id, how does the subject input the correct groupnumber so that the correct condition will be setup for them. Does this have anything to do with the groupid question during the script wizard "Choose how groupid is chosen" because I have no idea which of the 4 choices i need to choose?

Furthermore, once I enter a subject id, my script goes to a blank script, I assume because my first script in the batch is the consent form. SO...
2. if i choose to do the consent during the launch page, I assume I should take my consent script out of the batch files?


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: 12K, Visits: 98K
briancjo - Saturday, November 12, 2016
Thanks Dave.

Here is the code for my 2 condition batch script.
***
<batch>
/ subjects = (1 of 2)
/groupassignment = groupnumber
/ file = "Consent.iqx"
/ file = "JoBrianDemo.iqx"
/ file = "BJoQ1.iqx"
/ file = "Disc2WebRules.iqx"
/ file = "Disc2Web.iqx"
/ file = "ST-IAT-SC.iqx"
/ file = "IPANAT.iqx"
/ file = "CBFinal.iqx"
/ file = "ST-IAT-DPD.iqx"
/ file = "BJoQ2.iqx"
/ file = "DebriefS.iqx"
</batch>

<batch>
/subjects = (2 of 2)
/groupassignment = groupnumber
/ file = "Consent.iqx"
/ file = "JoBrianDemo.iqx"
/ file = "BJoQ1.iqx"
/ file = "Disc1WebRules.iqx"
/ file = "Disc1Web.iqx"
/ file = "ST-IAT-SC.iqx"
/ file = "IPANAT.iqx"
/ file = "CBFinal.iqx"
/ file = "ST-IAT-DPD.iqx"
/ file = "BJoQ2.iqx"
/ file = "DebriefF.iqx"
</batch>
***
Having done all the coding (Thanks a BUNCH) now I am having trouble setting up a web script.
1.Problem with GroupID input to set the condition
-Like you recommended, the consent is now apart of the launch page, so that the script does not even run if they choose to quit. However, this brings up a problem because while the web player prompts for subject ID, it does not prompt for group id like the lab version does. So if there is no prompt for group id, how does the subject input the correct groupnumber so that the correct condition will be setup for them. Does this have anything to do with the groupid question during the script wizard "Choose how groupid is chosen" because I have no idea which of the 4 choices i need to choose?

Furthermore, once I enter a subject id, my script goes to a blank script, I assume because my first script in the batch is the consent form. SO...
2. if i choose to do the consent during the launch page, I assume I should take my consent script out of the batch files?


Re. #1: The option you should choose is the query parameter option. Then give each subject a link that already includes the correct groupnumber for the participant via that query parameter. If you merely want to randomly assign your participants to one of the two conditions (first <batch> or second <batch>), you can select either the randomly or sequentially generated group number option.

I have no idea what "goes to a blank script" means once you enter a subject number. This would suggest there is some kind of mistake in the first script.

Re. #2: Yes, if you integrate the consent form on the launch page, you should not need the consent script. As already discussed in this thread, if a participant declines consent on the launch page, no scripts will ever be run -- and there seems to be no reason to ask for consent again via the "consent.iqx" script if the participants has already given consent via the launch page.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search