Skip to main content
12-Amethyst
October 26, 2012
Question

Editor from command line actions on current file

  • October 26, 2012
  • 2 replies
  • 670 views


Hello All,


I have a query i hoped someone can throw some light on please.


How to drive AE from external application, eg. to get it to run anything simple like "beep" or "caret" from the command line, on an XML file that is already open.


Starting Editor fresh and doing this on a newly opened file is no problem (as below).


[editor.exe -C2 "beep" "myfile.xml"]
OR
[editor.exe -C2 "source mycommands.acl" "myfile.xml"]


I have tried variations of getting the current doc, focusing the current window, current this and that, with no luck so far

Any suggestions would be welcome.


Many thanks


Chris

    2 replies

    1-Visitor
    October 26, 2012
    Chris,

    You might want to try using the doc_list ACL function to get a list of open
    document identifiers, then use functions like doc_name or doc_path to find
    the one you're after. Once you have the right document identifier, you
    should be able to do what you want.

    You might try using -b and -c to have the ACL run silently without opening
    a new window. I'm not sure, but you may be able to use these to just run
    the ACL commands without specifying a file to open. If not, you might try
    just specifying a dummy file.

    -Brandon 🙂


    12-Amethyst
    October 27, 2012


    Thank you Brandon for the hints, i'll have a look into this approach the next opportunity.


    Best Regards


    Chris