[texworks] Scrip: Questions about the API
Paul A Norman
paul.a.norman at gmail.com
Thu Mar 18 02:27:33 CET 2010
Dear Jonathan or Stefan,
Tremendous number of existing functions and a few properties. I though
the target.text porperty was a nice and useful surprise.
After I had a look through the debugger, I was left wondering about
1. is there any way I can call something like
TW.app.showMessage('some text'); (like window.alert() in browsers) ?
2. And do we have any mechanism for QTScript object / variable
persistence between calls in same editor session?
3. Can QTScript save text to a file on disk?
(looks like an indirect flow could be
target.saveAs(); target.close(); )
Helps JSON type persistence between sessions.
4. Can I request input form the user in, and returned to, QTScript -
a) like an input dialogue box? (window.input() in browsers)
b) ok - cancel, button box? (window.confirm() in browsers)
5. Can a file dialog box be used and the result returned as a
string to script?
6. a) Can I obtain the directory of the executable?
b) Can I obtain the scripts directory?
I apologise if these things are in the API, could you please point me to them?
More information about the texworks