app.fileSaveAs()

TXS - Help
2013-09-22
2013-09-22
  • crumbedfish
    crumbedfish
    2013-09-22

    Hi,

    I am trying to write a macro using scripting. When I use app.fileSaveAs() I get an error in a pop-up dialog window entitled 'Script-Error', with the following message:

    Uncaught exception at line 1: TypeError: Result of expression 'app.fileSaveAs' [undefined] is not a function.

    Backtrace <anonymous>()@1

    My script is as follows:

    %SCRIPT
    app.fileSaveAs('tricoloring.tex');
    

    I am just testing out this functionality as I will use it as part of a larger script, but I want to see how it works first.

    If this is a bug, then is there any indication as to when it may be fixed?

    Thanks!

     
    Last edit: crumbedfish 2013-09-22
  • Tim Hoffmann
    Tim Hoffmann
    2013-09-22

    Until 2.6.2 app.fileSaveAs has not been exposed to scripting. However, this has been changed. You may try out 2.6.4 beta if you are on windows or compile from the hg repository yourself for other os (or wait for the next official release).

     
  • crumbedfish
    crumbedfish
    2013-09-22

    Ok, thanks for that. I'll wait for the next release to come out.