[texworks] Help please with Integer constants and use in messageboxes

Jonathan Kew jfkthame at googlemail.com
Sat Apr 24 13:49:58 CEST 2010

On 24 Apr 2010, at 12:36, Paul A Norman wrote:

> I have found that the messagebox with 1024 can be suppressed by
> setting its result to null as below.
> Should I be setting the result of the script to null?

Currently, the return value of the script (if not null) gets displayed by texworks in a dialog; and an assignment statement returns the value being assigned, hence the behavior you see.

(This was originally the simplest/only way for a script to display something to the user - e.g. imagine a word-count script that wants to display its result.)

To suppress this, I usually just use the line


at the end of the script; this (obviously) evaluates to a null value and so no message is displayed.

Now that we have various ways for scripts to present messages, though, I'm thinking that using the script result as a way to display something to the user isn't really needed, and it is often a nuisance. So perhaps this will change (which would mean that existing scripts that INTEND to display a result by returning it will have to be changed to use TW.information or similar).

Any thoughts on this would be welcome....


More information about the texworks mailing list