[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] ensuring advanced search-and-replace
In message <eaef7a4155.fjgraute@xxxxxxxxx>
Fred Graute <fjgraute@xxxxxxxxx> wrote:
> In message <e1be534155.jim@xxxxxxxxxxxxxx>
> Jim Nagel <stred@xxxxxxxxxxxxxxxx> wrote:
> > I use !Keystroke (originally from Quantumsoft) to automate various
> > recurrent stuff on textfiles.
> > One of my keystrokes calls StrongEd's search-and-replace dialogue to
> > search for two newlines in a row. This of course requires the
> > "advanced" rather than "simple" S&R.
> > The keystroke definition simulates "s-F4" to open the dialogue box.
> > Trouble is that sometimes it opens with "simple" in effect, and other
> > times it opens with "advanced" in effect.
> Doing it via Keystroke doesn't seem possible. The engine field is a
> toggle and you have no way of knowing its current value nor can you set
> the value explicitly.
After a bit of a breather from most the RISC OS stuff (only some simple
work on 4.69f9 and 4.70a10) I've had another look at this and it now
kind of works. I say 'kind of' as it required changes to StrongED and
StrongED needed new buttons in the S&R dialogue box to open the menus
that are available (search history, replace history, engine and scope)
so that you can send a click to them from Keystroke. This work was
already planned to make the UI more style guide compliant and less
cryptic to new users (as had been done with the Save dialogue).
Keystroke had to be stopped from closing menus after sending a menu
selection, otherwise it would close the S&R dialogue immediately after
opening it by a faked click on 'Edit > Replace'.
Using 'Open dialogue' doesn't work as Keystroke assumes that dialogue
boxes hanging off menus are opened by decoding the selections given in
StrongED (and StrongMen) use special numbers for the 'Submenu pointer'
to specify which submenu or dialogue box to open. As Keystroke doesn't
know this number, 'Open dialogue' doesn't work (that you can open the
S&R dialogue this way is just accidental, in fact all menu items in the
Edit submenu open the S&R dialogue).
With Keystroke suitably modified it is now possible to force the S&R
dialogue to 'advanced' mode. Still feels like the long way round though
as it's much easier to define a toolbar icon / keystroke / menu item in
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html