Replace dialogue-RegExp box checked on starting TextPad6

General questions about using TextPad

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

Post Reply
MT_MANC
Posts: 12
Joined: Sat May 03, 2008 1:02 pm

Replace dialogue-RegExp box checked on starting TextPad6

Post by MT_MANC »

Any idea how to ensure the "Regular Expression" checkbox is always checked in the Search|Replace dialogue box on starting a TextPad6 session (Win7 Pro) - is there a TextPad .INI file setting I can edit to ensure it always is checked ?

Details - I use Textpad in a WinBatch batch file using SendKeys() - but cannot always ensure what the status of the RegExp checkbox will be (checked or unchecked ?) each time I invoke TextPad6 - so sometimes the WinBatch batch file invoking TextPad falls over !!

Most Kind
User avatar
kengrubb
Posts: 324
Joined: Thu Dec 11, 2003 5:23 pm
Location: Olympia, WA, USA

Post by kengrubb »

There are new commands RegexSet and RegexClear.

There should be an easier way to do what you want, and perhaps there is.

- Set a Keyboard shortcut to RegexSet
- Record a Macro (RegexSet, Search...Replace)
- Set the Keyboard shortcut for this new Macro to CTRL-H, or whatever you use for Search...Replace
(2[Bb]|[^2].|.[^Bb])

That is the question.
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

The RegexSet and RegexClear commands are only available in TextPad 7.0.0 and later. The OP is using TextPad 6.

If you want to fiddle with the configuration files, you can find the setting that controls/records the state of the Regular expression check box in the file %APPDATA%\Helios\TextPad\6\ConfigState.xml at this location:

Code: Select all

<TextPad>
        <Recent-Strings>
                <value name="FindFlags" type="uint">1</value>

0 = Regular expression check box cleared
1 = Regular expression check box set
MT_MANC
Posts: 12
Joined: Sat May 03, 2008 1:02 pm

Post by MT_MANC »

Thanks for assistance; couple of follow-ups:
TextPad6 - is there a WAY to ensure that RegExp box is ALWAYS checked on opening TextPad - cant seem to find an .INI file that wont then be overwritten as ConfigState.xml is (eg when manually unchecking RegExp box) - does such a "protected" .INI exist in TextPad?. Manual editing of ConfigState.xml is a workaround but not really a neat solution for batch file & I cant really add this to the Winbatch batch file itself as it would have to check the current status of the RegExp checkbox before responding appropriately !?

TextPad 7 - I cant seem to locate RegexSet, RegexClear (menu ?)commands in order to include on a keystroke macro - do they have to be added in somehow after installing ?

Thanks
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

TextPad 7's RegexClear and RegexSet commands are not on the menus. But you can assign keyboard shortcuts to them:
Configure | Preferences | Keyboard | Categories: Search | Commands: RegexClear
and
Configure | Preferences | Keyboard | Categories: Search | Commands: RegexSet
Post Reply