Escape to Quit


Author
Message
Sam
Sam
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 4, Visits: 41
Hello,

I know about quit commands, but I was wondering if there's a way to turn the escape key into an exit from the program, either using quit commands or script abort functions? From what I can tell, quit commands require a two-key combination, and the script abort would only exit whatever phase of the experiment you're currently on, not the entire program.

Thank you!
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
Sam - 4/4/2022
Hello,

I know about quit commands, but I was wondering if there's a way to turn the escape key into an exit from the program, either using quit commands or script abort functions? From what I can tell, quit commands require a two-key combination, and the script abort would only exit whatever phase of the experiment you're currently on, not the entire program.

Thank you!

Using /quitcommand: No. It requires at least a two-key combination.

Using script.abort(), possibly, that would depend on your script and how/where you want to call script.abort().

Regarding " the script abort would only exit whatever phase of the experiment you're currently on", it depends on where you've defined /quitcommand. If you define in it a <batch> script's <defaults>, it should terminate everything.

<defaults>
/ quitcommand = (SHIFT+1) // SHIFT + ESC
</defaults>

<batch>
/ file = "a.iqx"
/ file = "b.iqx"
/ file = "c.iqx"
</batch>
Sam
Sam
New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)New Member (46 reputation)
Group: Forum Members
Posts: 4, Visits: 41

Thanks for confirming that! I suppose my other idea was to use a key press to "esc" to trigger a script.abort instead of using a quit command. But my experiment uses mouse input, not keyboard, so I don't think I can use a key to trigger a script.abort unless I use a quit command. 

Thank you again for your reply!

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
Sam - 4/4/2022

Thanks for confirming that! I suppose my other idea was to use a key press to "esc" to trigger a script.abort instead of using a quit command. But my experiment uses mouse input, not keyboard, so I don't think I can use a key to trigger a script.abort unless I use a quit command. 

Thank you again for your reply!

>[...] my experiment uses mouse input, not keyboard, so I don't think I can use a key to trigger a script.abort

That is correct, the script would not recognize the escape key.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search