Welcome! Log In Create A New Profile

Advanced

increase size of message box

Posted by lucast4 
increase size of message box
June 07, 2020 12:41PM
When I use a custom "user plot", the message box shrinks. Is there any way I can increase its size?
Thanks!
Re: increase size of message box
June 07, 2020 10:41PM
Why don't you use the dashboard function (to display texts on the control screen) or the text command (to display on the user plot)?

https://monkeylogic.nimh.nih.gov/docs_RuntimeFunctions.html#dashboard
https://www.mathworks.com/help/matlab/ref/text.html

user_text() and user_warning() are there for compatibility with the original ML, but they are slow and you don't have much control over how they look.
Re: increase size of message box
June 08, 2020 01:39PM
Thanks those are great alternatives - I did not know about the dashboard!
Re: increase size of message box
June 11, 2020 12:44AM
I've noticed in my case that dashboard only works on the first trial. On later trails nothing is printed. Any idea what's going on? Thanks!
Re: increase size of message box
June 11, 2020 07:18PM
That doesn't make sense. Please show your code.
Re: increase size of message box
June 14, 2020 04:58PM
The function seems to work fine, so I don't understand why you say nothing is printed.

You printed mostly static texts. Unless you change something in the string, you will see the same text every trial.

dashboard() itself does not display anything until the screen is updated. run_scene() or idle() should be executed afterward.

Also dashboard() does not clear the text of itself even a trial ends. If you want to delete it, call dashboard() again with an empty string.
Re: increase size of message box
June 15, 2020 07:02PM
thanks - my problem is not that I see static text, it's that I see text for the first trial and nothing on subsequent trials.
I used static text there for debugging purposes.
I will look closely at your other suggestions.
THanks
Re: increase size of message box
July 17, 2020 09:39AM
I still have not figured it out.
To reiterate: I see the text on trial 1, but do not see anything on trials 2, 3, ....
This is true even though I run idle() or run_scene() after calling dashboard().
Thanks
Re: increase size of message box
July 17, 2020 11:38AM
Try something simple like this.
dashboard(1,sprintf('Trial %d',TrialRecord.CurrentTrialNumber));
idle(1000);
Re: increase size of message box
July 18, 2020 09:28AM
It still only shows "Trial 1" on the first trail, and is then blank on subsequent trials...
I sent you the timing file by PM in case that helps.
Re: increase size of message box
July 18, 2020 05:37PM
See If you have multiple NIMH ML copies in the MATLAB path.

Sometimes MATLAB fails to delete old versions completely, when NIMH ML is installed and updated with the MATLAB installer. In that case, some functions may be called from the old versions. See the following link for how to check the app installation path.
https://monkeylogic.nimh.nih.gov/docs_GettingStarted.html#SoftwareInstallation
Re: increase size of message box
July 20, 2020 09:12AM
I didn't use the installer, I just added the files to my path.
So matlab.apputil.getInstalledAppInfo is actually empty.

I also confirmed that dashboard works for timing files you wrote, so seems like something about my timing file?

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.