[texworks] Scrip: Questions about the API
Paul A Norman
paul.a.norman at gmail.com
Thu Mar 18 02:51:20 CET 2010
Jonathan, did you mention a while ago that QT could display an html
If so can QTScript call this and communicate with it through the
browser's object's DOM?
Then we could design user interaction windows and use them from script.
On 18 March 2010 14:27, Paul A Norman <paul.a.norman at gmail.com> wrote:
> 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
> these things,
> 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
> app.fileNew(); target.inserText();
> 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?
> Many thanks,
More information about the texworks