﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Millisecond Forums » Millisecond Forums » Inquisit 5  » running multiple scripts based on participants choice</title><generator>InstantForum 2017-1 Final</generator><description>Millisecond Forums</description><link>https://forums.millisecond.com/</link><webMaster>Millisecond Forums</webMaster><lastBuildDate>Thu, 23 Apr 2026 19:46:44 GMT</lastBuildDate><ttl>20</ttl><item><title>running multiple scripts based on participants choice</title><link>https://forums.millisecond.com/Topic23921.aspx</link><description>Hey,&lt;br/&gt;&lt;br/&gt;I have a study that I want to run in 3 different language versions through Inquisit Web. Those language versions are in separate .iqx files.&lt;br/&gt;&lt;br/&gt;So what I need to do is to make participants choose their preferred language and run a relevant version based on their response. I thought about &amp;lt;batch&amp;gt; element stored in a separate file that would be dynamically adapted based on participants language, but I am not sure if it can be done this way.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Can anyone help me out with that?&lt;br/&gt;&lt;br/&gt;To sum up:&lt;br/&gt;- web-based study with language versions in separate scripts&lt;br/&gt;- first step: participants choose their language&lt;br/&gt;- based on that choice a relevant script is run.&lt;br/&gt;&lt;br/&gt;Help :)&lt;br/&gt;&lt;br/&gt;Robert</description><pubDate>Wed, 28 Feb 2018 03:54:32 GMT</pubDate><dc:creator>RBalas</dc:creator></item><item><title>RE: running multiple scripts based on participants choice</title><link>https://forums.millisecond.com/Topic23935.aspx</link><description>&lt;div data-id="23934" class="if-quote-wrapper" unselectable="on" data-guid="1519818853290"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23934" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23934" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23934" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23934"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23927" class="if-quote-wrapper" unselectable="on" data-guid="1519818853290"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23927" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23927" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23927" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23927"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23921" class="if-quote-wrapper" unselectable="on" data-guid="1519818853290"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23921" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23921" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23921" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;RBalas - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23921"&gt;&lt;div class="if-quote-message-margin"&gt;Hey,&lt;br/&gt;&lt;br/&gt;I have a study that I want to run in 3 different language versions through Inquisit Web. Those language versions are in separate .iqx files.&lt;br/&gt;&lt;br/&gt;So what I need to do is to make participants choose their preferred language and run a relevant version based on their response. I thought about &amp;lt;batch&amp;gt; element stored in a separate file that would be dynamically adapted based on participants language, but I am not sure if it can be done this way.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Can anyone help me out with that?&lt;br/&gt;&lt;br/&gt;To sum up:&lt;br/&gt;- web-based study with language versions in separate scripts&lt;br/&gt;- first step: participants choose their language&lt;br/&gt;- based on that choice a relevant script is run.&lt;br/&gt;&lt;br/&gt;Help :)&lt;br/&gt;&lt;br/&gt;Robert&lt;a class="if-quote-goto quote-link" href="#" data-id="23921"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Not sure things can be made to work that way. Definite options are:&lt;br/&gt;&lt;br/&gt;Either each script needs to have all languages implemented and selectable like this one: &lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;&lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, set up a &amp;lt;batch&amp;gt; script with three conditions -- one per language:&lt;br/&gt;&lt;br/&gt;// language 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language1.iqx"&lt;br/&gt;/ file = "scriptb_language1.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language2.iqx"&lt;br/&gt;/ file = "scriptb_language2.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 3&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language3.iqx"&lt;br/&gt;/ file = "scriptb_language3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;Configure the web experiment to read the groupnumber from a query parameter, let's call the parameter "lang" for the sake of example. Then provide your participants with three separate links, i.e.&lt;br/&gt;&lt;br/&gt;To complete the study in language 1, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;https://mili2nd.co/abcd?lang=1&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 2, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;https://mili2nd.co/abcd?lang=2&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 3, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;https://mili2nd.co/abcd?lang=3&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Perhaps there is yet another way to do something with conditional &amp;lt;include&amp;gt; elements and/or by leveraging &amp;lt;batch&amp;gt; parameters and values, but I'll have to think about this some more first.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23927"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Okay, having thought this through now, here's a solution based on &amp;lt;batch&amp;gt; parameters and values (cf. &lt;a href="https://www.millisecond.com/support/docs/v5/html/howto/batchparameters.htm"&gt;&lt;a href="https://www.millisecond.com/support/docs/v5/html/howto/batchparameters.htm"&gt;https://www.millisecond.com/support/docs/v5/html/howto/batchparameters.htm&lt;/a&gt;&lt;/a&gt; ).&lt;br/&gt;&lt;br/&gt;The batch.iqx file looks like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;parameters&amp;gt;&lt;br/&gt;/ lang = 0&lt;br/&gt;&amp;lt;/parameters&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ lang_selected = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch multilang&amp;gt;&lt;br/&gt;/ file = "selectlang.iqx"&lt;br/&gt;/ file = "lang1.iqx"&lt;br/&gt;/ file = "lang2.iqx"&lt;br/&gt;/ file = "lang3.iqx"&lt;br/&gt;/ onscriptend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (batch.multilang.currentscript == "selectlang.iqx")&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.lang = values.lang_selected; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;]&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;We first run a small language selection script, selectlang.iqx, which looks like this&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ lang_selected = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block selectlangblock&amp;gt;&lt;br/&gt;/ trials = [1=selectlangpage]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage selectlangpage&amp;gt;&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.lang_selected = dropdown.selectlangq.response;&lt;br/&gt;]&lt;br/&gt;/ questions = [1=selectlangq]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;dropdown selectlangq&amp;gt;&lt;br/&gt;/ caption = "Please select your language:"&lt;br/&gt;/ options = ("Language 1", "Language 2", "Language 3")&lt;br/&gt;/ optionvalues = ("1", "2", "3")&lt;br/&gt;&amp;lt;/dropdown&amp;gt;&lt;br/&gt;&lt;br/&gt;and then pass the language chosen on to the batch &amp;lt;paramaters&amp;gt; "lang" per &lt;br/&gt;&lt;br/&gt;&amp;lt;batch multilang&amp;gt;&lt;br/&gt;/ file = "selectlang.iqx"&lt;br/&gt;/ file = "lang1.iqx"&lt;br/&gt;/ file = "lang2.iqx"&lt;br/&gt;/ file = "lang3.iqx"&lt;br/&gt;&lt;strong&gt;/ onscriptend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (batch.multilang.currentscript == "selectlang.iqx")&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.lang = values.lang_selected; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/batch&amp;gt; &lt;br/&gt;&lt;br/&gt;The remaining scripts -- lang1.iqx to lang3.iqx, representing the three different languages -- then can check the value of that parameter /onexptbegin to decide if they should run or not. In other words, if the language of the script doesn't match the language chosen / stored in the "lang" parameter, the given script aborts immediately, and the batch moves on to the next (rinse, repeat for the other scripts). &lt;br/&gt;&lt;br/&gt;lang1.iqx looks like this&lt;br/&gt;&lt;br/&gt;&amp;lt;parameters&amp;gt;&lt;br/&gt;/ lang = 0&lt;br/&gt;&amp;lt;/parameters&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;&lt;strong&gt;/ onexptbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (parameters.lang != 1) script.abort(false)&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ blocks = [1=myblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("This is script &amp;lt;%script.filename%&amp;gt;.")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;and lang2.iqx as well as lang3.iqx are set up analogously.&lt;br/&gt;&lt;br/&gt;The end result is that only the script(s) matching the language selected in the initial script should be administered. I've attached the full set of example scripts below.&lt;br/&gt;&lt;br/&gt;Hope this helps!&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23934"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Dave,&lt;br/&gt;&lt;br/&gt;Thank you again! It worked excellent.&lt;br/&gt;&lt;br/&gt;Robert</description><pubDate>Wed, 28 Feb 2018 03:54:32 GMT</pubDate><dc:creator>RBalas</dc:creator></item><item><title>RE: running multiple scripts based on participants choice</title><link>https://forums.millisecond.com/Topic23934.aspx</link><description>&lt;div data-id="23927" class="if-quote-wrapper" unselectable="on" data-guid="1519770584111"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23927" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23927" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23927" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;Dave - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23927"&gt;&lt;div class="if-quote-message-margin"&gt;&lt;div data-id="23921" class="if-quote-wrapper" unselectable="on" data-guid="1519770584111"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23921" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23921" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23921" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;RBalas - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23921"&gt;&lt;div class="if-quote-message-margin"&gt;Hey,&lt;br/&gt;&lt;br/&gt;I have a study that I want to run in 3 different language versions through Inquisit Web. Those language versions are in separate .iqx files.&lt;br/&gt;&lt;br/&gt;So what I need to do is to make participants choose their preferred language and run a relevant version based on their response. I thought about &amp;lt;batch&amp;gt; element stored in a separate file that would be dynamically adapted based on participants language, but I am not sure if it can be done this way.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Can anyone help me out with that?&lt;br/&gt;&lt;br/&gt;To sum up:&lt;br/&gt;- web-based study with language versions in separate scripts&lt;br/&gt;- first step: participants choose their language&lt;br/&gt;- based on that choice a relevant script is run.&lt;br/&gt;&lt;br/&gt;Help :)&lt;br/&gt;&lt;br/&gt;Robert&lt;a class="if-quote-goto quote-link" href="#" data-id="23921"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Not sure things can be made to work that way. Definite options are:&lt;br/&gt;&lt;br/&gt;Either each script needs to have all languages implemented and selectable like this one: &lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;&lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, set up a &amp;lt;batch&amp;gt; script with three conditions -- one per language:&lt;br/&gt;&lt;br/&gt;// language 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language1.iqx"&lt;br/&gt;/ file = "scriptb_language1.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language2.iqx"&lt;br/&gt;/ file = "scriptb_language2.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 3&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language3.iqx"&lt;br/&gt;/ file = "scriptb_language3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;Configure the web experiment to read the groupnumber from a query parameter, let's call the parameter "lang" for the sake of example. Then provide your participants with three separate links, i.e.&lt;br/&gt;&lt;br/&gt;To complete the study in language 1, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;https://mili2nd.co/abcd?lang=1&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 2, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;https://mili2nd.co/abcd?lang=2&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 3, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;https://mili2nd.co/abcd?lang=3&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;Perhaps there is yet another way to do something with conditional &amp;lt;include&amp;gt; elements and/or by leveraging &amp;lt;batch&amp;gt; parameters and values, but I'll have to think about this some more first.&lt;br/&gt;&lt;a class="if-quote-goto quote-link" href="#" data-id="23927"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Okay, having thought this through now, here's a solution based on &amp;lt;batch&amp;gt; parameters and values (cf. &lt;a href="https://www.millisecond.com/support/docs/v5/html/howto/batchparameters.htm"&gt;https://www.millisecond.com/support/docs/v5/html/howto/batchparameters.htm&lt;/a&gt; ).&lt;br/&gt;&lt;br/&gt;The batch.iqx file looks like this:&lt;br/&gt;&lt;br/&gt;&amp;lt;parameters&amp;gt;&lt;br/&gt;/ lang = 0&lt;br/&gt;&amp;lt;/parameters&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ lang_selected = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;batch multilang&amp;gt;&lt;br/&gt;/ file = "selectlang.iqx"&lt;br/&gt;/ file = "lang1.iqx"&lt;br/&gt;/ file = "lang2.iqx"&lt;br/&gt;/ file = "lang3.iqx"&lt;br/&gt;/ onscriptend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (batch.multilang.currentscript == "selectlang.iqx")&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.lang = values.lang_selected; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;]&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;We first run a small language selection script, selectlang.iqx, which looks like this&lt;br/&gt;&lt;br/&gt;&amp;lt;values&amp;gt;&lt;br/&gt;/ lang_selected = 0&lt;br/&gt;&amp;lt;/values&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block selectlangblock&amp;gt;&lt;br/&gt;/ trials = [1=selectlangpage]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;surveypage selectlangpage&amp;gt;&lt;br/&gt;/ ontrialend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; values.lang_selected = dropdown.selectlangq.response;&lt;br/&gt;]&lt;br/&gt;/ questions = [1=selectlangq]&lt;br/&gt;/ showpagenumbers = false&lt;br/&gt;/ showquestionnumbers = false&lt;br/&gt;&amp;lt;/surveypage&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;dropdown selectlangq&amp;gt;&lt;br/&gt;/ caption = "Please select your language:"&lt;br/&gt;/ options = ("Language 1", "Language 2", "Language 3")&lt;br/&gt;/ optionvalues = ("1", "2", "3")&lt;br/&gt;&amp;lt;/dropdown&amp;gt;&lt;br/&gt;&lt;br/&gt;and then pass the language chosen on to the batch &amp;lt;paramaters&amp;gt; "lang" per &lt;br/&gt;&lt;br/&gt;&amp;lt;batch multilang&amp;gt;&lt;br/&gt;/ file = "selectlang.iqx"&lt;br/&gt;/ file = "lang1.iqx"&lt;br/&gt;/ file = "lang2.iqx"&lt;br/&gt;/ file = "lang3.iqx"&lt;br/&gt;&lt;strong&gt;/ onscriptend = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (batch.multilang.currentscript == "selectlang.iqx")&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; parameters.lang = values.lang_selected; &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;&amp;lt;/batch&amp;gt; &lt;br/&gt;&lt;br/&gt;The remaining scripts -- lang1.iqx to lang3.iqx, representing the three different languages -- then can check the value of that parameter /onexptbegin to decide if they should run or not. In other words, if the language of the script doesn't match the language chosen / stored in the "lang" parameter, the given script aborts immediately, and the batch moves on to the next (rinse, repeat for the other scripts). &lt;br/&gt;&lt;br/&gt;lang1.iqx looks like this&lt;br/&gt;&lt;br/&gt;&amp;lt;parameters&amp;gt;&lt;br/&gt;/ lang = 0&lt;br/&gt;&amp;lt;/parameters&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;expt&amp;gt;&lt;br/&gt;&lt;strong&gt;/ onexptbegin = [&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (parameters.lang != 1) script.abort(false)&lt;br/&gt;]&lt;/strong&gt;&lt;br/&gt;/ blocks = [1=myblock]&lt;br/&gt;&amp;lt;/expt&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;block myblock&amp;gt;&lt;br/&gt;/ trials = [1=mytrial]&lt;br/&gt;&amp;lt;/block&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;trial mytrial&amp;gt;&lt;br/&gt;/ stimulusframes = [1=mytext]&lt;br/&gt;/ validresponse = (57)&lt;br/&gt;&amp;lt;/trial&amp;gt;&lt;br/&gt;&lt;br/&gt;&amp;lt;text mytext&amp;gt;&lt;br/&gt;/ items = ("This is script &amp;lt;%script.filename%&amp;gt;.")&lt;br/&gt;&amp;lt;/text&amp;gt;&lt;br/&gt;&lt;br/&gt;and lang2.iqx as well as lang3.iqx are set up analogously.&lt;br/&gt;&lt;br/&gt;The end result is that only the script(s) matching the language selected in the initial script should be administered. I've attached the full set of example scripts below.&lt;br/&gt;&lt;br/&gt;Hope this helps!&lt;br/&gt;</description><pubDate>Tue, 27 Feb 2018 14:40:50 GMT</pubDate><dc:creator>Dave</dc:creator></item><item><title>RE: running multiple scripts based on participants choice</title><link>https://forums.millisecond.com/Topic23927.aspx</link><description>&lt;div data-id="23921" class="if-quote-wrapper" unselectable="on" data-guid="1519752509544"&gt;&lt;a class="quote-para" unselectable="on" style="display: none;" href="#" data-id="23921" title="Move Cursor Below" contenteditable="false"&gt;&lt;span unselectable="on"&gt;+&lt;/span&gt;&lt;/a&gt;&lt;a class="quote-delete" unselectable="on" style="display: none;" href="#" data-id="23921" title="Delete Quote" contenteditable="false"&gt;&lt;span unselectable="on"&gt;x&lt;/span&gt;&lt;/a&gt;&lt;span unselectable="on" class="quote-markup"&gt;[quote]&lt;/span&gt;&lt;div unselectable="on" class="if-quote-header" contenteditable="false"&gt;&lt;div unselectable="on" class="if-quote-toggle-wrapper"&gt;&lt;a class="if-quote-toggle quote-link" href="#" data-id="23921" title=" "&gt;&lt;/a&gt;&lt;/div&gt;&lt;span unselectable="on" class="quote-markup"&gt;[b]&lt;/span&gt;RBalas - Tuesday, February 27, 2018&lt;span unselectable="on" class="quote-markup"&gt;[/b]&lt;/span&gt;&lt;/div&gt;&lt;div class="if-quote-message if-quote-message-23921"&gt;&lt;div class="if-quote-message-margin"&gt;Hey,&lt;br/&gt;&lt;br/&gt;I have a study that I want to run in 3 different language versions through Inquisit Web. Those language versions are in separate .iqx files.&lt;br/&gt;&lt;br/&gt;So what I need to do is to make participants choose their preferred language and run a relevant version based on their response. I thought about &amp;lt;batch&amp;gt; element stored in a separate file that would be dynamically adapted based on participants language, but I am not sure if it can be done this way.&amp;nbsp;&lt;br/&gt;&lt;br/&gt;Can anyone help me out with that?&lt;br/&gt;&lt;br/&gt;To sum up:&lt;br/&gt;- web-based study with language versions in separate scripts&lt;br/&gt;- first step: participants choose their language&lt;br/&gt;- based on that choice a relevant script is run.&lt;br/&gt;&lt;br/&gt;Help :)&lt;br/&gt;&lt;br/&gt;Robert&lt;a class="if-quote-goto quote-link" href="#" data-id="23921"&gt;&lt;span class="goto"&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="quote-markup"&gt;[/quote]&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;Not sure things can be made to work that way. Definite options are:&lt;br/&gt;&lt;br/&gt;Either each script needs to have all languages implemented and selectable like this one: &lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;&lt;a href="https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip"&gt;https://www.millisecond.com/download/library/v5/iat/multilanguageiat/iat_multilanguage.iqzip&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;Alternatively, set up a &amp;lt;batch&amp;gt; script with three conditions -- one per language:&lt;br/&gt;&lt;br/&gt;// language 1&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (1 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language1.iqx"&lt;br/&gt;/ file = "scriptb_language1.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 2&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (2 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language2.iqx"&lt;br/&gt;/ file = "scriptb_language2.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;// language 3&lt;br/&gt;&amp;lt;batch&amp;gt;&lt;br/&gt;/ subjects = (3 of 3)&lt;br/&gt;/ groupassignment = groupnumber&lt;br/&gt;/ file = "scripta_language3.iqx"&lt;br/&gt;/ file = "scriptb_language3.iqx"&lt;br/&gt;&amp;lt;/batch&amp;gt;&lt;br/&gt;&lt;br/&gt;Configure the web experiment to read the groupnumber from a query parameter, let's call the parameter "lang" for the sake of example. Then provide your participants with three separate links, i.e.&lt;br/&gt;&lt;br/&gt;To complete the study in language 1, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;&lt;a href="https://mili2nd.co/abcd?lang=1"&gt;https://mili2nd.co/abcd?lang=1&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 2, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;&lt;a href="https://mili2nd.co/abcd?lang=2"&gt;https://mili2nd.co/abcd?lang=2&lt;/a&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;To complete the study in language 3, click&lt;br/&gt;&lt;br/&gt;&lt;a href="https://mili2nd.co/qehb"&gt;&lt;/a&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;&lt;a href="https://mili2nd.co/abcd?lang=3"&gt;https://mili2nd.co/abcd?lang=3&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;/a&gt;&lt;br/&gt;Perhaps there is yet another way to do something with conditional &amp;lt;include&amp;gt; elements and/or by leveraging &amp;lt;batch&amp;gt; parameters and values, but I'll have to think about this some more first.&lt;br/&gt;</description><pubDate>Tue, 27 Feb 2018 09:38:03 GMT</pubDate><dc:creator>Dave</dc:creator></item></channel></rss>