[texworks] SCRIPTING: 1. __FILE__ not quite true and 2. TW.system not handling - or _ in path structure(?)
Paul A Norman
paul.a.norman at gmail.com
Thu May 19 04:03:25 CEST 2011
Some unexpected results ...
TW.information(null, "", __FILE__);
Shows the path and file name - but the first segment between the first
delimeter / / set is set to lowercase and I have some capitals there.
Real path is:
But __FILE__ copies to clipboard in Script as:
All the other capitals are ok.
Also, If I change this part of the path /Image Handling/ to either
of /Image-Handling/ /Image_Handling/
I get strange results when I try to pass this through TW.system even
just for: cmd /c dir /b \" + scriptPath + "\\*.txt\""
"Parameter format not correct - "latexportable"."
The above works fine when it is /Image Handling/ in the path (with the space).
And copying cmd /c dir /b \" + scriptPath + "\\*.txt\"" in expanded
form to the clipboard in script and then pasting it into a dos prompt
works fine for all three path versions of /Image Handling/
Any thoughts appreciated please,
More information about the texworks