Command Line Matlab/Windows Shell. Handover of SubjID and GroupID


Author
Message
wal
wal
Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)Respected Member (412 reputation)
Group: Forum Members
Posts: 4, Visits: 24
Heyho guys I got a little problem. 

I want to open an Inquisit experiment in Matlab handing over the subj ID and group ID from matlab to Inquisit. Matlab uses the windows shell (checked the output matlab produced, its fine. It matches with your guide.) and I tried it manually in the windows shell too. 
I used this guide: http://www.millisecond.com/support/docs/v5/html/howto/howtocommandline.htm

But all I can do is open Inquisit but the IDs don´t get handed over. The id prompt window still appears. I don´t want the participant to punch in his id and group five times through the experiment. 

Of course my path differs, but my command is this:
"C:\...\Inquisit.exe" "D:\....\Inq.exp" -s Bingo -g Bongo

While when I tried it in the win shell manually I just jumped to the file folder and used:
Inq.exp -s Bingo -g Bongo

Since I don´t know whats the cause I tried converting the file from Inq1.exp to Inq1.iqx. Didn´t matter.
I tried using two different PCs. Didn´t matter.
I tried doing the same thing with extra steps using a batch file using this guide: http://www.millisecond.com/support/docs/v5/html/articles/batchscripts.htm. Didn´t work either.

Results are always the same. I can start Inquisit, but subject ID and group ID don´t get handed over and I have to punch them in by hand. Which I´d like to avoid. 
What baffles me the most is, it used to work. With exactly the same code, I didn´t change it. Matlab wasn´t updated since it worked and neither was Inquisit which is still v4. 

Is there a different command or a different way I can try to do this?

// Matlab Code Looks like this if it is of any interest. But since I can´t get it to work with the windows shell too and the output of matlab seems fine this is more for beeing thorough:

progfile = '"C:\...\...\...\Inq1.exp"';
command = sprintf('-s %s -g %s', progfile, SUBJID,GROUPID);
system(command)

 SUBJID,GROUPID--> Variable defined at an earlier time. 


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: 104K
wal - Thursday, October 26, 2017
Heyho guys I got a little problem. 

I want to open an Inquisit experiment in Matlab handing over the subj ID and group ID from matlab to Inquisit. Matlab uses the windows shell (checked the output matlab produced, its fine. It matches with your guide.) and I tried it manually in the windows shell too. 
I used this guide: http://www.millisecond.com/support/docs/v5/html/howto/howtocommandline.htm

But all I can do is open Inquisit but the IDs don´t get handed over. The id prompt window still appears. I don´t want the participant to punch in his id and group five times through the experiment. 

Of course my path differs, but my command is this:
"C:\...\Inquisit.exe" "D:\....\Inq.exp" -s Bingo -g Bongo

While when I tried it in the win shell manually I just jumped to the file folder and used:
Inq.exp -s Bingo -g Bongo

Since I don´t know whats the cause I tried converting the file from Inq1.exp to Inq1.iqx. Didn´t matter.
I tried using two different PCs. Didn´t matter.
I tried doing the same thing with extra steps using a batch file using this guide: http://www.millisecond.com/support/docs/v5/html/articles/batchscripts.htm. Didn´t work either.

Results are always the same. I can start Inquisit, but subject ID and group ID don´t get handed over and I have to punch them in by hand. Which I´d like to avoid. 
What baffles me the most is, it used to work. With exactly the same code, I didn´t change it. Matlab wasn´t updated since it worked and neither was Inquisit which is still v4. 

Is there a different command or a different way I can try to do this?

// Matlab Code Looks like this if it is of any interest. But since I can´t get it to work with the windows shell too and the output of matlab seems fine this is more for beeing thorough:

progfile = '"C:\...\...\...\Inq1.exp"';
command = sprintf('-s %s -g %s', progfile, SUBJID,GROUPID);
system(command)

 SUBJID,GROUPID--> Variable defined at an earlier time. 


This sounds like something in Matlab breaks the command, i.e. the -s and -g command line parameters aren't transmitted / never reach the Inquisit executable. This can happen, for example, if there are spaces in the file path and the paths aren't properly encapsulated in double-quotes. Matlab might be omitting any double-quotes for your progfile variable, for example.

If Matlab keeps acting up, create a simple Windows batch (*.cmd) file to launch the experiment and then have Matlab launch that *.cmd file instead of Inquisit directly.

Go here some syntax examples: https://www.millisecond.com/forums/FindPost14951.aspx

Hope this helps.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search