It would be very useful to be able to set a group of shortcut keys in a macro.
My use case: I program in various languages, and would like to be able to put equivalent code constructs into a file by pressing the same key combinations regardless of what language I'm working with. For example, inserting a Class skeleton by pressing, say, Alt-F. When I'm working in Python, having set my keyboard to the Python mappings, I'd insert a basic Class structure in Python syntax; when using Java, having called up the Java macro, the same keypress would create a skeleton Java Class.
Macros to set shortcut key mappings
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
You asked:
============================
Oops, I just realized that this was the wrong forum. The information above is to create a macro in Macro Scheduler. I am so used to answering macro questions on that forum, that I forgot I was on TextPad. I use both products daily to get the bost from both. TextPad for the editing and parsing, and Macro Scheduler for the macros and scheduling. Well maybe this will still be useful. Enjoy!
Here is an untested rough skeleton for the macro:would like to be able to put equivalent code constructs into a file by pressing the same key combinations regardless of what language I'm working with. For example, inserting a Class skeleton by pressing, say, Alt-F.
Create this macro replacing "Do.....stuff" with the keystrokes you want to happen in that application. Assign a hot-key combination that you want to trigger this macro. As noted in this example, ALT-F11 would run the macro. This would allow one hot-key, ALT-F11, to do different things in Notepad, JavaDeveloper, and Other applications. Edit the macro as needed when new applications need this same hotkey combo.//HotKey for this macro is ALT-F11
GetActiveWindow>window_title,...............
If>%window_title%=Notepad,Notepad
If>%window_title%=JavaDeveloper,Java
If>%window_title%=OtherName,Other
Repeat as needed for multiple programs
Goto End
Label>Notepad
Do stuff
Goto End
Label>Java
Do other stuff
Goto End
Label>Other
Do more stuff
Goto End
Label>End
============================
Oops, I just realized that this was the wrong forum. The information above is to create a macro in Macro Scheduler. I am so used to answering macro questions on that forum, that I forgot I was on TextPad. I use both products daily to get the bost from both. TextPad for the editing and parsing, and Macro Scheduler for the macros and scheduling. Well maybe this will still be useful. Enjoy!
Hope this was helpful.............good luck,
Bob
Bob
From Bob Hansen:
From bveldkamp:
I'm not opposed to adding a poll, but I have no idea how to do that. It doesn't seem to be a hot issue in any case, judging by the ground swell of controversy or lack thereof.
I've worked in environments where the tools had the capability I'm talking about, and I found it to be a great productivity aid in the kind of programming techniques that Textpad lends itself to. If I only worked with one language, it wouldn't be an issue, though.
Yeah, it's the "Do stuff" part that's the hangup. Unless I'm mistaken, there's not a reasonable way to set keypad shortcuts in Textpad, other than manually, one at a time.Here is an untested rough skeleton for the macro:
Quote:
//HotKey for this macro is ALT-F11
GetActiveWindow>window_title,...............
If>%window_title%=Notepad,Notepad
If>%window_title%=JavaDeveloper,Java
If>%window_title%=OtherName,Other
Repeat as needed for multiple programs
Goto End
Label>Notepad
Do stuff
Goto End
Label>Java
Do other stuff
Goto End
...
From bveldkamp:
Sounds good, why don't you add a poll, so we can vote for it?
I'm not opposed to adding a poll, but I have no idea how to do that. It doesn't seem to be a hot issue in any case, judging by the ground swell of controversy or lack thereof.
I've worked in environments where the tools had the capability I'm talking about, and I found it to be a great productivity aid in the kind of programming techniques that Textpad lends itself to. If I only worked with one language, it wouldn't be an issue, though.