Page 1 of 1

Can I parse files from command line using Textpad?

Posted: Tue Nov 16, 2004 7:01 am
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?

Posted: Wed Nov 17, 2004 11:35 am
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.

Posted: Wed Nov 17, 2004 11:37 am
by jerra
Ok, thanks for the reply.

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

Posted: Wed Nov 17, 2004 12:38 pm
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

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

Posted: Wed Nov 17, 2004 12:42 pm
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.

Posted: Wed Nov 17, 2004 3:33 pm
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,

Posted: Wed Nov 17, 2004 4:18 pm
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

Posted: Thu Nov 18, 2004 6:28 am
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.

Posted: Thu Nov 18, 2004 7:06 am
by jerra
Regarding Ruby & Cyqwin. Are both these tools alive and kicking?

Posted: Thu Nov 18, 2004 10:52 am
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

Posted: Thu Nov 18, 2004 10:54 am
by jerra
skaemper wrote:Hope this helps
Certainly does. I'll have a look at it asap. Thanks a bunch!

:Over and out:

Posted: Thu Nov 18, 2004 2:39 pm
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