Millisecond Forums

Redirecting between websurvey and Inquisit on a local computer

https://forums.millisecond.com/Topic14943.aspx

By Topher Hübel - 11/10/2014

I've got one survey on https://www.soscisurvey.de/

And I have a programmed experiment with some surveys on a local computer.
Is it possible to redirect from the local Inquisit experiment to a web survey?

By Dave - 11/10/2014

Yes (in a sense). See the "Running Sequences of Inquisit Scripts and Other Applications" topic in the documentation. In a nutshell, you write a Windows batch file (or shell script equivalent under OSX) that runs your Inquisit scripts and fires up a browser with the URL to your survey afterwards.
By Topher Hübel - 11/10/2014

"C:\Program Files (x86)\Microsoft Application Virtualization Client\sfttray.exe" /launch "Inquisit 4 v 4.0.2.0" "\\fs02\huebel$\Dokumente\MASCOT\MASCOT.iqx" -s %1 -g 1
"C:\Program Files\Internet Explorer\iexplore.exe"
"C:\Program Files (x86)\Microsoft Application Virtualization Client\sfttray.exe" /launch "Inquisit 4 v 4.0.2.0" "\\fs02\huebel$\Dokumente\MASCOT\survey.iqx" -s %1 -g 1

1) I programmed that, but it only fires up all two experiments and the browser at the same time and not in a row.
2) How can I Programm to open a certain web page?

By Dave - 11/10/2014

You'll have to familiarize yourself with batch syntax. You'll want to use the start command and its /wait switch, cf. http://technet.microsoft.com/en-us/library/bb491005.aspx .

Also see http://msdn.microsoft.com/en-us/library/ie/hh826025%28v=vs.85%29.aspx
By Dave - 11/11/2014

If using Windows batch files, you'll want to do something like this:

@echo off
set INQUISITPATH="C:\Program Files\Millisecond Software\Inquisit 4\Inquisit.exe"
set SCRIPTPATH="D:\myscript.iqx"
set /p SID=Enter subject ID:
set /p GID=Enter group ID:

start "" /wait %INQUISITPATH% %SCRIPTPATH% -s %SID% -g %GID%
start iexplore.exe https://www.google.com/?q=%SID%%GID%
By Topher Hübel - 11/11/2014

@echo off
set INQUISITPATH="C:\Program Files (x86)\Microsoft Application Virtualization Client\sfttray.exe" /launch "Inquisit 4 v 4.0.2.0"
set SCRIPTPATH="\\fs02\huebel$\Dokumente\MASCOT\MASCOT.iqx"
set SCRIPTPATH2="\\fs02\huebel$\Dokumente\MASCOT\surveys.iqx"
set /p SID=Enter subject ID:
set /p GID=Enter group ID:

start "" /wait %INQUISITPATH% %SCRIPTPATH% -s %SID% -g %GID%
start /wait iexplore.exe https://www.soscisurvey.de/DUCTUS/
start "" /wait %INQUISITPATH% %SCRIPTPATH2% -s %SID% -g %GID%

Nearly everything is working fine now, but the Internet Explorer and the second Experiment fire up at the same time.
I can't manage that. Any idea how to fix it?

That would be great!

By Dave - 11/11/2014

> ... but the Internet Explorer and the second Experiment fire up at the same time.

Not on my system. Start of the 2nd script is properly delayed until the iexplore.exe process shuts down.
By Topher Hübel - 11/11/2014

Weird. I shut down my computer and started it again today. Now it's working properly.

Thank you for your help!
By Dave - 11/11/2014

Strange indeed. If this happens again, perhaps use a different browser than IE that's available on your system (e.g. Firefox, Chrome). Calling those via the command line basically works the same.