changing contents and font size of message box simultaneously
I am working on a periodic random digit display for a psychology experiment. I am displaying these digits in a message box that i'm feeding from a text file. Part of the setup requires that the digits also change size with every new iteration. The version of this patch that I currently have, does this more or less.
The problem is that the fontsize message and the digit message get to the message box at different times (makes sense since they are two separate messages). This is problematic because the old digit changes size before the new digit comes in. If i reverse the order of arrival, a similar problem remains, where a digit would come in at the previous size, and then change. Ideally, every digit would appear only at one unique size.
Question: is it possible to combine these two messages into something like "fontsize 20 set 5". doing exactly that yields and error.
What other ideas do you guys have?
I hope the verbal explanation makes sense. If not i can post the patch. (it is currently too messy for anyone other than me to deal with ;-)
thanks!
you can use "set" to blank it out momentarily, then change fontsize, and finally set the number in the new size, and with some delays etc. you can fiddle so it looks OK.
If you're on Max 5 or later, you might try [textbutton] instead of [message], there are more options for formatting and text justification, and the vertical size isn't tied to the fontsize. Center-justification helps visually in some cases. Maybe a new variable for the experiment? ;)
I would be inclined to go with Textbutton as SeejayJames suggests, as the message box might resize itself inappropriately under automatic control (that is, become too narrow for multiple digit values to display correctly in larger font) but you can do what you want with something like this. Technically speaking, the *multiplication by 2 is inserted so the font size doesn't get too small).