Author Topic: howto macro  (Read 3453 times)

Offline HotPieDip

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
howto macro
« on: December 31, 2014, 09:04:13 AM »
Is there a howto for macros?

I want to 'saveto' the current doc to c:\temp\test.txt
Record macro captured mouse clicks the File.SaveCopy dialog but doesn't record keys?
Searching the forum for MouseMove and File.SaveCopy has no result.

Code: [Select]
<Command cmd="File.SaveCopy"/>

How do you add keystrokes here?

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2225
  • Karma: +37/-3
    • HippoEDIT
Re: howto macro
« Reply #1 on: December 31, 2014, 05:58:27 PM »
there is no "howto" for using macros yet. But I feel that for purpose you are requesting macros usage is not a best way - you need scripting.
Macros just only record your actions, leaving all interactive steps, still interactive (if macro will record also document name you have entered, there will be no way to record interactive dialog where you can enter something).

For recording mouseMove you need to set in macro options "Record Mouse Movements".

For just saving the file under specific name you can use following JS code:
Code: Javascript
  1. ActiveDocument.Save("c:\temp\test.txt");

Use Scripting Plugin to create or tool script oк service script and add mentioned code to command handler (service script) or directly in script body (tool script). You can call tool script as any other tool; command from service script as any other built-in command.
More documentation can be found on wiki.

BR, Alex.
P.S: Happy New Year!