Can I parse files from command line using Textpad?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Can I parse files from command line using Textpad?

Post by jerra »

Would like to start Textpad from a command script and execute a macro on a textfile and then exit textpad. The user should not have to do anything else than to initiate the execution by starting the command script. Is this possible with Textpad?
User avatar
helios
Posts: 710
Joined: Sun Mar 02, 2003 5:52 pm
Location: Helios Software Solutions
Contact:

Post by helios »

I'm sorry, but it isn't possible to run a TextPad macro from the Command line. The Command line parameters that are available for use when starting TextPad, are listed in the Reference information section of the Help files.
Helios Software Solutions
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Post by jerra »

Ok, thanks for the reply.
User avatar
skaemper
Posts: 51
Joined: Mon Mar 03, 2003 1:07 pm
Location: (Northern) Germany
Contact:

Re: Can I parse files from command line using Textpad?

Post by skaemper »

Hi,
jerra wrote:Would like to start Textpad from a command script and execute a macro on a textfile and then exit textpad. The user should not have to do anything else than to initiate the execution by starting the command script. Is this possible with Textpad?
Depending on what you try to accomplish, running (and writing :wink:) a script would be my suggestion.
If it can be done with a TextPad macro it can certainly done with small script.
So... what do you wnat to do?

Cheers

Stephan
"It's POLYMORPHIC!"
A former colleague
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Re: Can I parse files from command line using Textpad?

Post by jerra »

skaemper wrote: So... what do you wnat to do?
Well I would want to do pretty advanced formatting in text files which demands regexp & macros. I was thinking if it was possible to use textpad more or less like a command line tool and not having to interact with Textpad's application window in any way.
User avatar
lionelb
Posts: 34
Joined: Fri Mar 19, 2004 11:58 am
Location: Brighton, UK

Post by lionelb »

Well I would want to do pretty advanced formatting in text files which demands regexp & macros.
Sounds like you want a scripting tool rather than a text editor (which just happens to have some scripting capabilities).

If you were on a Unix system you'd probably use sed or awk for this. There are Windows ports of Unix tools (e.g. Cygwin http://www.cygwin.com/) which supply such things.

Regards,
Lionel B
User avatar
skaemper
Posts: 51
Joined: Mon Mar 03, 2003 1:07 pm
Location: (Northern) Germany
Contact:

Post by skaemper »

I'd recommend Ruby on pretty much every OS, be it OX X, Linux, other unixoides or Windows of whatever flavour...

Ruyb is really easy to learn, the community is extremly friendly, polite and helpful.

Stephan
"It's POLYMORPHIC!"
A former colleague
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Post by jerra »

lionelb wrote:Sounds like you want a scripting tool rather than a text editor (which just happens to have some scripting capabilities).
Yes youre right about that, I just wanted to check that it was not possible. I use Textpad as my default editor and considering the number of features I thought it might even be capable of scripting the way I wanted.. :) Thanks for the tip, I will download and try it out.
skaemper wrote:I'd recommend Ruby on pretty much every OS...
Thanks, I will try that one also, we need a good tool here at work and either of these tools seems to do the job.

Btw we work with Windows and Tru64 & some Linux.
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Post by jerra »

Regarding Ruby & Cyqwin. Are both these tools alive and kicking?
User avatar
skaemper
Posts: 51
Joined: Mon Mar 03, 2003 1:07 pm
Location: (Northern) Germany
Contact:

Post by skaemper »

jerra wrote:Regarding Ruby & Cyqwin. Are both these tools alive and kicking?
Don't know much about histor, errr, Cygwin but I think it's alive since the latest DLL is from "Nov 11 2004". See http://www.cygwin.com/

Ruby is certainly alive :arrow: http://www.ruby-lang.org/en/
If you're on Windows you might like to try either http://rubyforge.org/projects/rubyinstaller/ or http://rubyinstaller.rubyforge.org/wiki/wiki.pl (they're to views of the same thing). That's the Ruby I use in my WinXP box, on Linux I build it myself.
There's a vivid news group and mailing-list (which are connected to each other by Ruby code BTW).There are excellent introductions to Ruyb on the 'net: Hope this helps

Stephan
"It's POLYMORPHIC!"
A former colleague
User avatar
jerra
Posts: 6
Joined: Tue Nov 16, 2004 6:52 am

Post by jerra »

skaemper wrote:Hope this helps
Certainly does. I'll have a look at it asap. Thanks a bunch!

:Over and out:
User avatar
skaemper
Posts: 51
Joined: Mon Mar 03, 2003 1:07 pm
Location: (Northern) Germany
Contact:

Post by skaemper »

jerra wrote:
skaemper wrote:Hope this helps
Certainly does. I'll have a look at it asap. Thanks a bunch!
Great to hear that. That reminds me of something I forgot: The Ruby community is friendly, polite and helpful.
Out and over. :D
Stephan
"It's POLYMORPHIC!"
A former colleague
Post Reply