Aha, that all makes sense and is very helpful, thank you!
– Nick
Hi Chris,
Everything’s going well on our end (we’re collecting human behavior data on our tasks now), but I have a couple small MWorks questions:
- Is it possible to start one protocol from another protocol? Currently I have in my mwel script one main protocol for running a general task, and a bunch of tiny 1-line protocols that set task variables before running the general task. This means that to play a particular task I must first run a variable-setting protocol in the client, then run the general task protocol in the client. For reference, here’s the code:
Is there a better way to do this? Is it possible to run one protocol from another, so the general task is automatically started from the small variable-setters? Or is there inheritance in protocols, so I could make the task-specific protocols inherit from the general protocol?
- Is it possible to set the log directory programmatically? I know I can do that manually in the client, but I would like to automatically set it to a path based on the python config name in my mwel script.
Thanks,
Nick
Hi Nick,
Is it possible to run one protocol from another, so the general task is automatically started from the small variable-setters? Or is there inheritance in protocols, so I could make the task-specific protocols inherit from the general protocol?
It’s not possible to run one protocol from another. However, you can turn the body of your “Run Task” protocol into a statement macro and invoke it in each specific task protocol. See the attached modification of your MWEL file for a demonstration.
Is it possible to set the log directory programmatically?
I’m not sure what you mean by “log directory”.
If you mean the directory where the event file is stored, then yes, you can control that programmatically using a data file device in your MWEL file. See this discussion for more info.
If you mean the directory selected with the “Save” button in the console window, then no, there’s no way to control that programmatically.
Cheers,
Chris
Attachment: oog_modified.mwel.zip (2.37 KB)
Hi Chris,
Thank you, both of those answers worked and solved the issues!
– Nick