Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| plugins:macro_conversion [2015/08/19 19:29] – [More] admin | plugins:macro_conversion [2018/01/10 20:36] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | During design of macro recording in HippoEDIT it was rather hard to select format for storing of the macro steps between sessions. It was very tempting to merge the macro serialization language and scripting, but after some thoughts and checks I have end up in xml serialization. | + | During |
| ==== Why I did so: ==== | ==== Why I did so: ==== | ||
| - | * when selecting of the scripting language for serialization which to take? HippoEDIT supports several languages: JavaScript, VBScript (by default), PHP, Perl, ActionScript (with additional engines for Active Scripting). Shell I did a special setting to select language for storing or ask every time? If I can serialize to known languages, but what to do if would be installed not known scripting language: syntax for every language different? | + | * when selecting of the scripting language for serialization which to take? HippoEDIT supports several languages: JavaScript, VBScript (by default), PHP, Perl, ActionScript (with additional engines for Active Scripting). Shell, I did a special setting to select |
| - | * where to serialize between session, should be stored in workspace, ideally, but then script should be escaped to be stored as XML CDATA etc. | + | * where to serialize between session, should be stored in a workspace, ideally, but then the script should be escaped to be stored as XML CDATA etc. |
| - | * if script would be modified, how to handle special macro play features (till document end, stop if search fails). It is rather complex to handle for ordinary script. | + | * if the script would be modified, how to handle special macro play features (till document end, stop if a search fails). It is rather complex to handle for an ordinary script. |
| - | So, because of mentioned problems, I have decided to use xml format for storing of macros. XML serialization is " | + | So, because of mentioned problems, I have decided to use XML format for storing of macros. XML serialization is " |
| - | But still I want to have the way to get a script from a macro And this was solved by special Macro Converting script. It can be written in any scripting language, supported by HippoEDIT (Active Scripting) and does translating of stored macro steps into desired scripting language. So, this make it possible to extend HE with converters in any scripting language, the code is open and can be modified, and feature can be added only if you need it, by installing script-plugin. | + | But still I want to have the way to get a script from a macro And this was solved by special Macro Converting script. It can be written in any scripting language, supported by HippoEDIT (Active Scripting) and does translating of stored macro steps into desired scripting language. So, this makes it possible to extend HE with converters in any scripting language, the code is open and can be modified, and the feature can be added only if you need it, by installing script-plugin. |
| ==== Disadvantages: | ==== Disadvantages: | ||
| - | Macro converted to a script, could not be converted back. There are some limitations during conversion from macro to script. | + | Macro converted to a script, could not be converted back. There are some limitations during conversion from macro to a script. |
| ===== What you get ===== | ===== What you get ===== | ||