Page 1 of 1

Replace dialogue-RegExp box checked on starting TextPad6

Posted: Tue Oct 29, 2013 5:58 pm
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

Posted: Tue Oct 29, 2013 8:13 pm
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

Posted: Tue Oct 29, 2013 11:45 pm
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

Posted: Wed Oct 30, 2013 6:33 pm
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

Posted: Wed Oct 30, 2013 9:26 pm
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