Command line parameter for session?


Author
Message
AKrishna
AKrishna
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 93, Visits: 291
Hi,

I was wondering whether by any chance there was an undocumented parameter that would allow me to set the session number in Inquisit via command line. According to https://www.millisecond.com/support/docs/current/html/howto/howtocommandline.htm, you can set the subject and group parameters, but there's no information on session. This would help me in testing a new script which relies on the session parameter.

Specifically, it's part of my experiment prep to create a large dataset of monkey files in order to check whether conditions are being correctly assigned, stimuli correctly randomized, and whether the data file contains all necessary information before going live. I use a self-written batch file for this:

@echo off

::This command forces the batch to recognize Umlaute (ü,ä,ö) within path names.
CHCP 65001

::The /p options will make the batch ask you for input for that variable.
::Alternatively, you can just copy+paste your names and/or directory into this file before running it.
::Remove the :: before any line you want to use and add it before the lines you don't.

::name of the Inquisit file for copying into here (.iqx is assumed)
::set iqxname=YourFileName
::name of the Inquisit file if you want to be asked by the batch when it runs
set /p iqxname=Enter the name of your Inquisit file (without .iqx).

::path to the Inquisit file (no backslash at end) for copying into here
::set pathtoiqx=YourPathName
::path to the Inquisit file if you want to be asked by the batch when it runs
set /p pathtoiqx=Enter the path to your Inquisit file (without a backslash \ at the end).
::if you want to copy the batch into the same directory as your Inquisit file and run it there
::set pathtoiqx=%cd%

::user entry of drive containing inquisit installation
set /p inquisitdrive=Enter the drive letter where Inquisit is installed (default is "C:").
if "%inquisitdrive%"=="" (set inquisitdrive=C:)

set /p firstsubject=Enter the first subject number you want as a monkey datafile.
set /p lastsubject=Enter the last subject number you want as a monkey datafile (all subjects between %firstsubject% and this number will be run; make sure it's bigger then %firstsubject%).

FOR /L %%A IN (%firstsubject%,1,%lastsubject%) DO (
"%inquisitdrive%\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe" "%pathtoiqx%\%iqxname%.iqx" -s %%A -g 1 -m monkey
)

pause


I want to add a sub-loop that cycles through each required session per subject id, which is why I need the parameter.

Thanks!

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: 99K
AKrishna - 5/2/2024
Hi,

I was wondering whether by any chance there was an undocumented parameter that would allow me to set the session number in Inquisit via command line. According to https://www.millisecond.com/support/docs/current/html/howto/howtocommandline.htm, you can set the subject and group parameters, but there's no information on session. This would help me in testing a new script which relies on the session parameter.

Specifically, it's part of my experiment prep to create a large dataset of monkey files in order to check whether conditions are being correctly assigned, stimuli correctly randomized, and whether the data file contains all necessary information before going live. I use a self-written batch file for this:

@echo off

::This command forces the batch to recognize Umlaute (ü,ä,ö) within path names.
CHCP 65001

::The /p options will make the batch ask you for input for that variable.
::Alternatively, you can just copy+paste your names and/or directory into this file before running it.
::Remove the :: before any line you want to use and add it before the lines you don't.

::name of the Inquisit file for copying into here (.iqx is assumed)
::set iqxname=YourFileName
::name of the Inquisit file if you want to be asked by the batch when it runs
set /p iqxname=Enter the name of your Inquisit file (without .iqx).

::path to the Inquisit file (no backslash at end) for copying into here
::set pathtoiqx=YourPathName
::path to the Inquisit file if you want to be asked by the batch when it runs
set /p pathtoiqx=Enter the path to your Inquisit file (without a backslash \ at the end).
::if you want to copy the batch into the same directory as your Inquisit file and run it there
::set pathtoiqx=%cd%

::user entry of drive containing inquisit installation
set /p inquisitdrive=Enter the drive letter where Inquisit is installed (default is "C:").
if "%inquisitdrive%"=="" (set inquisitdrive=C:)

set /p firstsubject=Enter the first subject number you want as a monkey datafile.
set /p lastsubject=Enter the last subject number you want as a monkey datafile (all subjects between %firstsubject% and this number will be run; make sure it's bigger then %firstsubject%).

FOR /L %%A IN (%firstsubject%,1,%lastsubject%) DO (
"%inquisitdrive%\Program Files\Millisecond Software\Inquisit 6\Inquisit.exe" "%pathtoiqx%\%iqxname%.iqx" -s %%A -g 1 -m monkey
)

pause


I want to add a sub-loop that cycles through each required session per subject id, which is why I need the parameter.

Thanks!

> I was wondering whether by any chance there was an undocumented parameter that would allow me to set the session number in Inquisit via command line.

Unfortunately there isn't (a definite oversight).

A possible workaround would be scripting automated testing using Inquisit Web (if you have that available). On the web, you could pass in subjectid, groupid and sessionid URL parameters, as well as monkeymode=true, e.g.

https://mili2nd.co/jagc?subjectid=testsubject&groupid=4&sessionid=3&monkeymode=true

AKrishna
AKrishna
Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)Distinguished Member (3.2K reputation)
Group: Forum Members
Posts: 93, Visits: 291
Cheers and thanks as usual for the fast response. :)

That's a shame, but not insurmountable. The idea of using Web is interesting, but I'm not sure about scripting multiple web sessions via URL without manual input from me (e.g. to start the study using the Launch button, etc.). It might well be possible, but I would probably have to use tools I'm not yet familiar with (autoclickers, some kind of script that opens a link automatically on event, or perhaps after a fixed interval). No worries, I'll just make my monkey dataset smaller and do the session input manually.

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: 99K
AKrishna - 5/2/2024
Cheers and thanks as usual for the fast response. :)

That's a shame, but not insurmountable. The idea of using Web is interesting, but I'm not sure about scripting multiple web sessions via URL without manual input from me (e.g. to start the study using the Launch button, etc.). It might well be possible, but I would probably have to use tools I'm not yet familiar with (autoclickers, some kind of script that opens a link automatically on event, or perhaps after a fixed interval). No worries, I'll just make my monkey dataset smaller and do the session input manually.

You can, in principle, instrument the InquisitPlayer.exe via the command line to forego any actual launch page interactions. That's a bit fiddly, but it's doable.

"%USERPROFILE%\AppData\Roaming\Millisecond Software\Inquisit 6 Player\InquisitPlayer.exe" "inquisit66://inquisit.millisecond.com/6/6_6/player/win64/IQWebPlayerSetup_661.exe?ExperimentId=71689&AccountId=2837&GroupId=4&SubjectId=testsubject&SessionId=4&MonkeyMode=monkey&FinishPage=https%253A%252F%252Fmili2nd.net%252Finquisit6%252Ffinish%253Fsubjectid%253Dtestsubject%2526groupid%253D4%2526sessionid%253D4%2526monkeymode%253Dtrue&Version=6.6&HomeServer=mili2nd.net&DataUrl=&WindowMode=false"


should launch the example web experiment I linked earlier via the command line.

If you're interested in doing this, you can get the launch URL for your own web experiments from the player log file (Tests tab -> Log); search for the "Run Command Line" entries, the part of interest is that under "URL=".

Edited 2 Weeks Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search