Joined: 08 Feb 2008
Location: British Columbia, Canada
|Posted: Sun Sep 04, 2011 5:46 pm Post subject: A macro editor - thoughts...
|wallywalters wrote: |
|a simple way to modify them or if I have to rerecord |
Ah, a man after my own taste. This very issue was on my mind, right from when I started documenting the plugins (BTW, plugins manual is badly out of date, but useful nonetheless). Instructor gave me some comments at that time, so I added a little about the macro format in the Plugins Manual.
Although I am not a very good programmer (maybe back in the DOS days!), I thought about a converter to translate the macros into a type of scripting language, and back again. That way, you could either modify a macro, or create a new one using a "script". There are several issues with this approach, however - the biggest being "crossed" keypresses.
For example, if you "memorize" (as part of a macro) a Copy operation (Ctrl+C), it should appear in a "script" something like (example only!):
|[CTRL down] [C down] [C up] [CTRL up] |
with the C down/up enclosed by the CTRL down/up, sort of like XML structure. However, if you ACTUALLY executed
|[CTRL down] [C down] [CTRL up] [C up] |
it would likely still work fine, but the scripting (converting to actual macro) would likely fail; it wouldn't be practical to try to detect every "crossed" case.
Another issue is automatic keyboard repeats - some might slip into the macro (by accident), but have no effect on the actual performance - these should be detect and dealt with.
In other words, it is not as simple as I first conceived. But it still might be do-able. Any programmers out there...?