Page 2 of 2

Re: How do I edit TextPad macros? RETHREAD

Posted: Fri Jan 19, 2001 9:52 pm
by Frank Fesevur
First of all, I was told that these were among the most requested features by Heidi (you know, the one that answers to support@textpad.com). She wrote it in an e-mail when I suggested them some time ago. BUT it doesn't garantuee a thing!

Personally I don't think a macro language would be that much work, as long as you take a third party language. There are several options: Python, C Styled Script, VBA (probably too expensive), etc.

IMHO it would require an interface from that language to all (key assignable) commands and some internal variables (like filename). When you would be able to execute all these commands from that script, most would be done. The script language handles your program flow, so that's a thing you don't have to worry about.

The choice, *what* scripting language is probably based own prefference, knowledge and experience. A discussion here on that part of the subject would probably end in a 'l like...', 'it must be...' and 'I hope...' (fill in your favorite language on the dots).

Regards,
Frank

Re: How do I edit TextPad macros? RETHREAD

Posted: Mon Jan 22, 2001 8:29 am
by Martin Sandin
But... but... but...

...my language _is_ clearly superior to yours! ;-D


-
Martin - wearing his flameresistant suit
come.to/vague

Re: How do I edit TextPad macros? RETHREAD

Posted: Sun Jan 28, 2001 9:37 am
by Randall McDougall
There are really three solutions to this ...

(1) wait a long time and have a custom macro language developed [and then learn it]

(2) write a simple compile/decompile for the existing Macros (and send the intermediate to Textpad for editting :-) ... could be done now, and lets you have control / update / quick change/fix capability but doesn't add any functionality (ie. decision points)

(3) get a scripting interface (custom or expanded DDE) to allow some (any) scripting language to pass commands and data and retrieve data and responses ... Scripting languages being your choice of PERL, REXX, ECMAScript, VBScript, TCL/TK, PYTHON, or several others ...

Re: How do I edit TextPad macros? RETHREAD

Posted: Thu Feb 01, 2001 1:27 pm
by Roy Beatty
Randall,

Of your menthods, we are already employing method number 1.

What are the practical steps we can take to implement 2 & 3?

Thanks,

Roy Beatty

Re: How do I edit TextPad macros? RETHREAD

Posted: Fri Feb 02, 2001 12:44 pm
by Randall McDougall
Well, #3 (which of course is what we really want) is really just a better/easier way of doing #1 (unfortunately, *any* real enhancement [like logic] is going to involve some direct cooperation from Textpad itself, because it has to expose the information on which the logical decisions are based) ... it would need to expose either a custom programming interface or a set of DDE commands that was greatly expanded and generalized, and then it would be relatively simple for any of the mentioned scripting languages to access it's features under program control. Basically there'd have to be a way to get information from Textpad so that the Macro would not be just typing blindly, plus the ability to enter any meaningful command w/parameters. While non-trivial, it shouldn't be too hard in theory -- in it's simplest form it means tying a modified Macro handler to an expanded DDE interface and providing feedback (mostly as return codes).

On the other hand, #2 could be done today by any competent systems programmer with access to a language that can read and write binary files. You have to figure out the current Macro structure and then read it in, parse and translate to a readable text file which you pass to Textpad ... the output (after user edits) would then be recompiled into the macro format with some simple error checking. The hardest part is documenting the existing format, but that wouldn't take more than a day or two's research with a binary display tool (like Textpad :-) ... some scripting languages (like REXX) could actually be used to do that, so the Practical step is the documentation of the current form.

Re: How do I edit TextPad macros? RETHREAD

Posted: Tue Feb 27, 2001 6:23 pm
by Randall McDougall
Well, I've played around with Macros a bit in my spare time and analyzed the results (hence a later thread concerning a few bugs and deficiencies) ... If I wrote it in REXX I could probably have a pretty good decompiler (and maybe re-compiler) done by the weekend ... but since most people aren't going to have that installed, I guess I should brush off my C++ and see what I can do -- I've been meaning to do *something* in that language as a learning experience anyway ...

We'll see how long it takes.

Re: How do I edit TextPad macros? RETHREAD

Posted: Sun Apr 01, 2001 12:33 am
by Ron Jensen
I'm needing/wanting a macro editor for textpad, too!

Any luck with decompiling/recompiling Randall?

Thanks.

Re: How do I edit TextPad macros? RETHREAD

Posted: Tue Apr 09, 2002 2:17 pm
by Scott Johnson
Actually a good choice for a macro language would be TCL, it was specifically designed to be a macro/glue language!