How do I edit TextPad Macros?
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
How do I edit TextPad Macros?
Is it possible to edit TextPad macros? I have some fairly complex ones that are a pain to implement with the macro recorder.
Thanks,
Elliott Smith
Thanks,
Elliott Smith
Re: How do I edit TextPad Macros?
Unfortunately there is no real way. The commands are not recorded in any easily readable format - take a look at the tpm files (open one in your favourite text editor - e.g. Textpad).
Re: How do I edit TextPad Macros?
I've also been missing a macro language in TextPad. UltraEdit has one, but I prefer to work with TextPad. I hope it will be implemented in the next release.
Re: How do I edit TextPad Macros?
I understood the macro language and the nested syntax defenitions are among the most requested features for a new release, so let's indeed hope they will be implemented!
Regards,
Frank
Regards,
Frank
Re: How do I edit TextPad Macros?
Editing macros is definitely my biggest request.
But these new functionalities are SUCH major upgrades, it's killing me thinking about how long we'll be waiting for them. I want it to be "right", of course, but I also just WANT it.
Does anyone have experience with this type of development (meaning the experience similar to those that actually develop TextPad)? Do you have any estimates on the time we're talking here, to get this major of an upgrade completed?
Version 4 was the last major upgrade, and that was in July 1999--not even two years ago. I was introduced to TextPad around a year before that, so I don't know when the previous major upgrade happened...
-----------------
Some thoughts about this "new macro language" (grain of salt: I don't have experience creating this type of application--TextPad, although I am an experienced programmer):
It seems that the right thing to do, for creating this "macro language" would be to use an already-existing language. Such as C++ or Java. This is opposed to creating an entirely new language just for TextPad macros.
To create a TextPad specific/exclusive macro language, I think would severely (1) limit how complicated our macros can be and (2) increase the development and maintaining time that an entirely new language would require. New languages take a loooong time to mature, and a lot of effort and input to do so.
I don't pretend to understand what would be necessary to *limit* C++ or Java, so that it doesn't have the ability to do rogue and inappropriate things that all-out C++ or Java--full-fledged languages--can really do.
How would this "plugging in" of an existing language work? WOULD it work? Is, indeed, an entirely new (and limited) TextPad-specific macro language the way to go?
:' )
But these new functionalities are SUCH major upgrades, it's killing me thinking about how long we'll be waiting for them. I want it to be "right", of course, but I also just WANT it.
Does anyone have experience with this type of development (meaning the experience similar to those that actually develop TextPad)? Do you have any estimates on the time we're talking here, to get this major of an upgrade completed?
Version 4 was the last major upgrade, and that was in July 1999--not even two years ago. I was introduced to TextPad around a year before that, so I don't know when the previous major upgrade happened...
-----------------
Some thoughts about this "new macro language" (grain of salt: I don't have experience creating this type of application--TextPad, although I am an experienced programmer):
It seems that the right thing to do, for creating this "macro language" would be to use an already-existing language. Such as C++ or Java. This is opposed to creating an entirely new language just for TextPad macros.
To create a TextPad specific/exclusive macro language, I think would severely (1) limit how complicated our macros can be and (2) increase the development and maintaining time that an entirely new language would require. New languages take a loooong time to mature, and a lot of effort and input to do so.
I don't pretend to understand what would be necessary to *limit* C++ or Java, so that it doesn't have the ability to do rogue and inappropriate things that all-out C++ or Java--full-fledged languages--can really do.
How would this "plugging in" of an existing language work? WOULD it work? Is, indeed, an entirely new (and limited) TextPad-specific macro language the way to go?
:' )
Re: How do I edit TextPad Macros?
Oh yes. And my very-close-second request is that the 64 macro limit be eliminated or SOOOOOO increased. Currently, it is only possible to assign 64 macros to key-combinations.
I'm currently up to 58 macros that I *truly* use every day...I swear! I'm soon getting to the point where I won't be able to develop macros anymore, unless this barrier can be broken. :' (
And yes, I've already submitted this request through the official channels :' )
I'm currently up to 58 macros that I *truly* use every day...I swear! I'm soon getting to the point where I won't be able to develop macros anymore, unless this barrier can be broken. :' (
And yes, I've already submitted this request through the official channels :' )
Re: How do I edit TextPad Macros?
Hi Jeff,
A macro language doesn't have to be as complicated as a "true" programming language. I think that what is (more or less) needed is a couple of commands for controlling the flow of the macro (e.g. if..then..else), and a syntax so that you can do the same stuff that you do when you choose a command from the menues (e.g find,save etc). My guess is that it is more complicated to code the logic for recording a macro than to implement a macro language. I haven't personally tried to write a text editor, so I'm not completely sure about my last statement though.
Brgds
/Daniel
A macro language doesn't have to be as complicated as a "true" programming language. I think that what is (more or less) needed is a couple of commands for controlling the flow of the macro (e.g. if..then..else), and a syntax so that you can do the same stuff that you do when you choose a command from the menues (e.g find,save etc). My guess is that it is more complicated to code the logic for recording a macro than to implement a macro language. I haven't personally tried to write a text editor, so I'm not completely sure about my last statement though.
Brgds
/Daniel
Re: How do I edit TextPad Macros?
Okay, I do understand that a full blown programming language might not be necessary. What you say makes sense to me.
Certainly, if I were TextPad God, these things are needed:
--If/then/else, for, while
--Commenting: //Single line and /**multi line**/
--Current macro behavior: Calling menu entries and commands, detecting dialog boxes and cursor movement.
--Parameters: Feeding specific string values into the macros at runtime. What other parameter types (aside from strings) would be helpful?
--GOTO: Would greatly help organize the code in a single macro file. I don't dare ask for full object orientation or even procedural functions, unless you insist :' )
--Calling another macro, and being able to pass parameters to *it*. This would essentially give you functions, and reusable code. Yay! These functions, even though they may not be full macros, can be distributed! Yay!
--Trivial logging, maybe to the "Command Results" window. Just write a line of text, with the time stamp and the macro that is doing the writing. The more complicated the macro, the more this helps.
--Getting "environment" information, like:
-----Clip books and their entries, which could therefore be inserted
-----The current file: Name, directory, date created and modified, size, characters, lines, exact cursor/selection position, ...
-----Same info about any open file, and even closed ones.
-----Workspace information
-----Configuration setup, like the directories in which macros/clips/... exist, installation directory, key commands, ...
-----Current date, and other simple operating system things
What else? How difficult are these things to implement?
I know a full blown language is too much to create from scratch, and I definitiely want to balance features with stability. Not to mention being able to actually receive a stable upgrade of TextPad in the next ten years!
:' )
Jeff
http://www.jeffyjeffy.com/textpad
Certainly, if I were TextPad God, these things are needed:
--If/then/else, for, while
--Commenting: //Single line and /**multi line**/
--Current macro behavior: Calling menu entries and commands, detecting dialog boxes and cursor movement.
--Parameters: Feeding specific string values into the macros at runtime. What other parameter types (aside from strings) would be helpful?
--GOTO: Would greatly help organize the code in a single macro file. I don't dare ask for full object orientation or even procedural functions, unless you insist :' )
--Calling another macro, and being able to pass parameters to *it*. This would essentially give you functions, and reusable code. Yay! These functions, even though they may not be full macros, can be distributed! Yay!
--Trivial logging, maybe to the "Command Results" window. Just write a line of text, with the time stamp and the macro that is doing the writing. The more complicated the macro, the more this helps.
--Getting "environment" information, like:
-----Clip books and their entries, which could therefore be inserted
-----The current file: Name, directory, date created and modified, size, characters, lines, exact cursor/selection position, ...
-----Same info about any open file, and even closed ones.
-----Workspace information
-----Configuration setup, like the directories in which macros/clips/... exist, installation directory, key commands, ...
-----Current date, and other simple operating system things
What else? How difficult are these things to implement?
I know a full blown language is too much to create from scratch, and I definitiely want to balance features with stability. Not to mention being able to actually receive a stable upgrade of TextPad in the next ten years!
:' )
Jeff
http://www.jeffyjeffy.com/textpad
Re: How do I edit TextPad Macros?
So what about UltraEdit? What's good and bad about the macro language in that text editor? I'm not familiar.
Re: How do I edit TextPad Macros?
Jeff:
That seem like a fairly major undertaking every way you look at it. There are many possible ways to go for this. Java and (especially) C++ seem to be the wrong way. They are compiled, complicated, and statically typed languages with fairly rough learning curves (again, C++ is the worse of the two).
One fairly interesting way would be to use the Windows Scripting Host and then provide a ActiveX interface for any language that runs with the WSH (VBscript, JScript, Python, Perl, ....).
Another way would be to give an exclusive shot to one of these languages which would all be a LOT more appropriate than Java/C++ for this macros language imho. My preference is ofcourse Python, which is fast, extremly flexible, dynamic, easy to read and develop, Open Source, and so on. It also has excellent regexp support. And it's supposed to be easy to integrate
-
Martin
come.to/vague
That seem like a fairly major undertaking every way you look at it. There are many possible ways to go for this. Java and (especially) C++ seem to be the wrong way. They are compiled, complicated, and statically typed languages with fairly rough learning curves (again, C++ is the worse of the two).
One fairly interesting way would be to use the Windows Scripting Host and then provide a ActiveX interface for any language that runs with the WSH (VBscript, JScript, Python, Perl, ....).
Another way would be to give an exclusive shot to one of these languages which would all be a LOT more appropriate than Java/C++ for this macros language imho. My preference is ofcourse Python, which is fast, extremly flexible, dynamic, easy to read and develop, Open Source, and so on. It also has excellent regexp support. And it's supposed to be easy to integrate

-
Martin
come.to/vague
Re: How do I edit TextPad Macros?
Here is a second vote for Python. Included in Martin's "and so on" -- it is object oriented. Third party support (so Helios doesn't have to support the language). I didn't know if it was easy to integrate, but you (Martin) seem to know that end. I've felt for a while that the first editor to incorporate Pythin would gain a competitive advantage over its rivals. A strategic advantage, really, given its ease of use.
As for my Jeff, my phellow Philadelphian, and his 58 macros: just a suggestion -- I've no idea if it's possible -- keep several "banks" of macros under different user branches in the Windows Registry and switch among them. Or keep several different archived versions of the TextPad Registry branch and overlay them as appropriate.
Or are we at the point yet of getting Helios to change its business model and sell us components of TextPad so we can assemble the editor of our dreams into "our own image?"
These are just increasingly random thoughts from a very tired guy at work.
Roy
As for my Jeff, my phellow Philadelphian, and his 58 macros: just a suggestion -- I've no idea if it's possible -- keep several "banks" of macros under different user branches in the Windows Registry and switch among them. Or keep several different archived versions of the TextPad Registry branch and overlay them as appropriate.
Or are we at the point yet of getting Helios to change its business model and sell us components of TextPad so we can assemble the editor of our dreams into "our own image?"
These are just increasingly random thoughts from a very tired guy at work.
Roy
Re: How do I edit TextPad Macros?
Hi Jeff,
Here are the commands that UltraEdit uses for the macros:
Bottom,CloseFile,ColumnModeOff,ColumnModeOn,ColumnCut,ColumnDelete,
ColumnInsert,ColumnInsertNum,Copy,Cut,DeleteLine,DosToMac,DosToUnix,
Else,EndIf,EndLoop ,EndSelect,ExitLoop ,ExitMacro ,Find,GetString,GetValue,
GotoBookMark,GotoBookMarkSelect,GotoLine,GotoLineSelect,GotoPage,GotoPageSelect,HexDelete,HexInsert,HexOff,HexOn,IfCharIs,IfColNum,IfEof,IfFound,IfNotFound,IfSel,InsertMode,InvertCase,Loop ,Key,NextWindow,Open,OverStrikeMode,Paste,PlayMacro,PreviousWindow,Replace,ReturnToWrap,RunTool,Save,SaveAs,SelectToBottom,SelectToTop,SelectWord,SortAsc,SortDes,SpacesToTabs,SpacesToTabsAll,StartSelect,TabsToSpaces,Template,TimeDate,ToCaps,ToggleBookMark,ToLower,Top,ToUpper,TrimTrailingSpaces,UnixMactoDos,WrapToReturn.
Something similar to this is the only thing that I need. I don't think it should be more complicated. Textpad's strength is that it is simple to use for a beginner, yet powerful enough for more advanced users.
Here are the commands that UltraEdit uses for the macros:
Bottom,CloseFile,ColumnModeOff,ColumnModeOn,ColumnCut,ColumnDelete,
ColumnInsert,ColumnInsertNum,Copy,Cut,DeleteLine,DosToMac,DosToUnix,
Else,EndIf,EndLoop ,EndSelect,ExitLoop ,ExitMacro ,Find,GetString,GetValue,
GotoBookMark,GotoBookMarkSelect,GotoLine,GotoLineSelect,GotoPage,GotoPageSelect,HexDelete,HexInsert,HexOff,HexOn,IfCharIs,IfColNum,IfEof,IfFound,IfNotFound,IfSel,InsertMode,InvertCase,Loop ,Key,NextWindow,Open,OverStrikeMode,Paste,PlayMacro,PreviousWindow,Replace,ReturnToWrap,RunTool,Save,SaveAs,SelectToBottom,SelectToTop,SelectWord,SortAsc,SortDes,SpacesToTabs,SpacesToTabsAll,StartSelect,TabsToSpaces,Template,TimeDate,ToCaps,ToggleBookMark,ToLower,Top,ToUpper,TrimTrailingSpaces,UnixMactoDos,WrapToReturn.
Something similar to this is the only thing that I need. I don't think it should be more complicated. Textpad's strength is that it is simple to use for a beginner, yet powerful enough for more advanced users.