[texworks] Help please with Integer constants and use in messageboxes
Paul A Norman
paul.a.norman at gmail.com
Sun Apr 25 13:19:46 CEST 2010
On 25 April 2010 21:24, Jonathan Kew <jfkthame at googlemail.com> wrote:
> It's pretty neat that this works;
Could write wrappers and other re-usable Tw specifc helper functions
in Libraries
>however, I think we should expose a readFile() method to directly read the text of a file, rather than going through the "open document, get text, close document" sequence. That's pretty inefficient, and could become a significant overhead if you were loading a number of script libraries.
readFile() would be really helpful for other things as well.
>
> I'm curious whether this:
>
>> thisLibrary = thisLibrary.replace(/\//g, '\\'); //MS Windows Specific
>
> is actually needed? Many programs and functions on Windows will accept either \ or / as path separators; did you try it without this conversion?
Thanks Jonathan, I started using that in early scripts (earlier Tw
vers) when it threw a message box (and an exception I think) saying
"Can not read file "dah dah": No such file or directory", and that
fixed the problem, but I just rem-ed it out and it is not necessary at
all now (windows Xp) it seems (Tw ver 0.3 r606).
>
> JK
>
>
>
>
More information about the texworks
mailing list