keywords + uppercase

General questions about using TextPad

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

Post Reply
audley

keywords + uppercase

Post by audley »

Greetings,

Is there a way to "sweep" through a document and automatically convert to uppercase all those words (i.e. reserved words) that have already been colorized by the syntax file. In other words, I'm looking for some kind of macro I guess that converts, say, all Keywords 1 in a document to uppercase.

I've read the various entries requesting an autocomplete feature and the various responses both for and against. I, for one, don't like tools that wrest control from me -- isn't that why we use Textpad instead of Word.... ;). But I would like some automation when I desire it...

Any suggestions?

Thanks. I appreciate it.

Cheers.
Roy Beatty

Re: keywords + uppercase

Post by Roy Beatty »

I think you need a "programmable" macro, and TextPad does not have that feature. All I can suggest is perhaps a Perl program hanging off of your TextPad Tool menu that <br>
1) saves any changes<br>
2) opens the relevant syntax file for the file you're editting<br>
3) parses the list of keywords<br>
4) reads in the file you're editting<br>
5) uses regex to upcase any occurrences<br>
6) saves the file (TextPad would then inform you that the file has been changed and offer to re-open the changed version of the file).

HTH,

Roy
Peter

Re: keywords + uppercase

Post by Peter »

Thanks, Roy

I think you're right. Writing something like that would be a good exercise.

Thanks for the suggestion.

Cheers,

Peter
Post Reply