[texworks] SCRIPTING: TW.app.applicationVersion

Paul A Norman paul.a.norman at gmail.com
Tue Jan 4 09:03:41 CET 2011


On 4 January 2011 19:31, Stefan Löffler <st.loeffler at gmail.com> wrote:
t.
>
>> There is another blank one TW.version;
>
> Odd, I don't see this.

Apologies, it is top level, try

 TW.information(null, "Version of Application", version());

Returns      1
uhm?
QtScript version perhaps?

>> When in Script writing we write
>>
>> //Version: 0.3
>>
>> Will the scripting engine be testing  for this and refusing to run the
>> script if the applications actual revision number is too low?
>> Could this provide an initial basis for testing for feature sets in
>> scripts perhaps?
>> In that the script writer would be nominating the lowest acceptable
>> version number needed to run the script - is that the intention of
>> //Version: 0.3 at all?
>
> No, but this is a common misunderstanding (that I've fallen victim to
> myself in the past ;)).
> The version header is just for informational purposes, and marks the
> version of the script.

Hard case!  - thanks for clearing that up I'll write it up later.

>
> Yeah. As I wrote above, this is the version of the script, not of Tw
> (otherwise we would probably have called it something like
> "RequiredTwVersion" or ).

//MinimalTwVersion 0.4

...   uhm -  Now that does sound interesting, especially if actually
tied into with

TW.app.revisonNumber

and

//MinimalTwRevision

;)

Paul

>
> HTH
> Stefan
>



More information about the texworks mailing list