Discussion:
[praat-users] Size of the form windows in scipts
annelauremaigrot@yahoo.co.uk [praat-users]
2015-10-13 12:49:34 UTC
Permalink
Hi,


I am writing a script on Praat and the first thing I want to do is to open a form. The problem is there is too many lines and when it opens I can not see everything on the screen and there is no ways to scroll down or to resize the window. I try to make it open two separate and successive forms but it just skips the second one then ...


How can I resize it to see everything ? Or have two successive forms ?


Thanks a lot
Anne-Laure
José Joaquín Atria jjatria@gmail.com [praat-users]
2015-10-13 16:43:23 UTC
Permalink
`form` blocks are special, in that they are always the first thing
that gets executed in your script (regardless of where they are) and
you can only have one. You can also not use any variable interpolation
in them (since it seems as if they are run before variables are
assigned).

You can reproduce much of the behaviour of forms using pause menus,
though, and those behave much more intuitively. The problem is that
you cannot use them to pass arguments to the script as you can with
regular forms. A script that uses forms can be called automatically
from another one (using eg. runScript), but a script that uses pauses
can never be run in a non-interactive mode (unless you conditionally
skip the pause somehow).

Maybe the solution is to reduce the size of your initial form: nothing
scares users more than being presented with too many options. Maybe
they don't need access to all of those? And even if they do, maybe
some of them can be read from a config file, instead of input from the
initial form every time?

Scripts with too many options often smell, because they are likely
trying to do too many things at the same time. Maybe you can separate
it into smaller scripts, each of which can have a smaller form.

Good luck.

José Joaquín Atria

www.pinguinorodriguez.cl
Post by ***@yahoo.co.uk [praat-users]
Hi,
I am writing a script on Praat and the first thing I want to do is to open a
form. The problem is there is too many lines and when it opens I can not see
everything on the screen and there is no ways to scroll down or to resize
the window. I try to make it open two separate and successive forms but it
just skips the second one then ...
How can I resize it to see everything ? Or have two successive forms ?
Thanks a lot
Anne-Laure
Paul Boersma paul.boersma@uva.nl [praat-users]
2015-10-13 19:17:07 UTC
Permalink
Post by ***@yahoo.co.uk [praat-users]
I am writing a script on Praat and the first thing I want to do is to open a form. The problem is there is too many lines and when it opens I can not see everything on the screen and there is no ways to scroll down or to resize the window.
So you have more than 30 fields to fill in? If many of them are radio buttons, then consider to create option menus instead.
Post by ***@yahoo.co.uk [praat-users]
I try to make it open two separate and successive forms but it just skips the second one then 

Read the scripting tutorial. There can be only one form/endform structure in each script file. For sequences of pausing dialog boxes ("wizard" behavior), look for "pause forms".
_____

Paul Boersma
University of Amsterdam
Linguistics
Spuistraat 210, room 303
1012VT Amsterdam, The Netherlands
http://www.fon.hum.uva.nl/paul/

Loading...