Neo Editable Macros
Posted: Tue Apr 17, 2001 4:06 pm
I was thinking about editable macros again / TextPad scripting again. It seems to me that it should be possible to implement it with two specific and simple (I hope) enhancements.
I. TOOLS TO EXECUTE MACROS<br>
----------------------------<br>
Allow a tool program to execute a TextPad macro. And by "macro" I do not mean "tool parameter" macros. I do not mean "page header/footer" macros. I mean allowing a tool program to invoke keystroke macros. Moreover, I suggest that tool programs execute macros *by filename* rather than by their ordinal position on the Macro menu. When this is implemented, someone, probably Jeff Epstein, will submit to "TextPad Add-ons" a set of elementary keystroke macros with standardized names, thus creating for tool programs a virtual "sendkeys" capability.
Benefit: With Sendkeys, can we achieve everything we hope to achieve with edittable macros?
II. TOOL STAYS RUNNING DURING MACRO<br>
------------------------------------<br>
Allow a tool program to invoke a keystroke macro WHILE IT IS STILL RUNNING, allowing it to invoke any number of macros during its execution. If those invoked macros cause execution of the same program (which could still be running), I ask that TextPad permit the recursions, presuming the user is using a tool/language that can keep things straight. Obviously I am envisioning a tool whose "Command Results" consist of changes it makes in the active window. Therefore it would be nice, though not strictly necessary, to allow a tool definition to suppress involvement with TextPad's built-in Command Results window.
Benefit: Potentially, all user-defined shortcuts could all execute one program that would operate differently based on the keystrokes used in calling the it.
III. TOOL PARAMETER MACRO IMPROVEMENTS<br>
--------------------------------------<br>
(a) New: $LastKey: Holds the last keystroke character hit prior to tool running.<br>
(b) New: $LastShortcut: Holds the keystroke characters comprising the last invoked shortcut.<br>
(c) New: $MacroPaths: Current search paths (";" separated) TextPad is using to finding macros.<br>
(d) Change: $Sel: If selection spans lines, have $Sel refer to all lines, not just the first.<br>
Extra credit: allow a tool program to replace the selected text with a string built by the tool program. (Again, it would be nice if the change takes effect in the TextPad window while the program continues execution.)
Other information would also be useful, difficulty permitting:<br>
(e) number of bookmarks before the cursor<br>
(f) number of bookmarks after the cursor<br>
(g) window size<br>
------------------------------------------------
I'd appreciate any feedback as to whether (I) and (II) would satisfy our needs.
Thanks,
Roy
rrbeatty@hot[^spam]mail.com
I. TOOLS TO EXECUTE MACROS<br>
----------------------------<br>
Allow a tool program to execute a TextPad macro. And by "macro" I do not mean "tool parameter" macros. I do not mean "page header/footer" macros. I mean allowing a tool program to invoke keystroke macros. Moreover, I suggest that tool programs execute macros *by filename* rather than by their ordinal position on the Macro menu. When this is implemented, someone, probably Jeff Epstein, will submit to "TextPad Add-ons" a set of elementary keystroke macros with standardized names, thus creating for tool programs a virtual "sendkeys" capability.
Benefit: With Sendkeys, can we achieve everything we hope to achieve with edittable macros?
II. TOOL STAYS RUNNING DURING MACRO<br>
------------------------------------<br>
Allow a tool program to invoke a keystroke macro WHILE IT IS STILL RUNNING, allowing it to invoke any number of macros during its execution. If those invoked macros cause execution of the same program (which could still be running), I ask that TextPad permit the recursions, presuming the user is using a tool/language that can keep things straight. Obviously I am envisioning a tool whose "Command Results" consist of changes it makes in the active window. Therefore it would be nice, though not strictly necessary, to allow a tool definition to suppress involvement with TextPad's built-in Command Results window.
Benefit: Potentially, all user-defined shortcuts could all execute one program that would operate differently based on the keystrokes used in calling the it.
III. TOOL PARAMETER MACRO IMPROVEMENTS<br>
--------------------------------------<br>
(a) New: $LastKey: Holds the last keystroke character hit prior to tool running.<br>
(b) New: $LastShortcut: Holds the keystroke characters comprising the last invoked shortcut.<br>
(c) New: $MacroPaths: Current search paths (";" separated) TextPad is using to finding macros.<br>
(d) Change: $Sel: If selection spans lines, have $Sel refer to all lines, not just the first.<br>
Extra credit: allow a tool program to replace the selected text with a string built by the tool program. (Again, it would be nice if the change takes effect in the TextPad window while the program continues execution.)
Other information would also be useful, difficulty permitting:<br>
(e) number of bookmarks before the cursor<br>
(f) number of bookmarks after the cursor<br>
(g) window size<br>
------------------------------------------------
I'd appreciate any feedback as to whether (I) and (II) would satisfy our needs.
Thanks,
Roy
rrbeatty@hot[^spam]mail.com