[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] SetTmp and selected blocks
In message <23ea42e553.gavin@xxxxxxxxxxxxxxxxxxxxx>
Gavin Wraith <gavin@xxxxxxxxxxxxxxx> wrote:
> Apologies if this has been raised before. The StrongED$Tmp_xxx
> system variables are very useful for exposing StrongED's current
> state to scripts. StrongED$Tmp_MarkWord, for example, gives
> the word that the cursor is in. Is there any reason for not
> so exposing the start and end indices of a selection (which I
> presume is also a 'marked block')? I can think of various things
> that one could do with that.
> I have checked for myself that the StrongED$Tmp_xxx variables
> get overwritten every time the SetTmp function is called. This
> is OK if you are only working on one textwindow. But sometimes
> it would be nice to work on more than one. One might want a script to
> take as input not only the state of the window to which it has been
> dragged, but also that of another window. For example, select some
> text in one window and then drag in a script to another window to copy
> the selection, perhaps modified appropriately to suit each
> destination, to all the places in the latter window which match a
> given pattern.
> I guess one could save the StrongED$Tmp_xxx variables to other
> temporary variables before issuing the SetTmp command. That
> would only mean amending the BaseMode file. But it is a bit kludgy
> because you have to be sure that no intermediate actions overwrite
> the new variables.
> Has anybody any ideas on this?
The problem here is that the script is applied to the text by an
external tool which knows nothing about StrongED except what gets
passed to it in the StrongED$Tmp_xxx system variables. The external
tool cannot request an other text be passed to it so the solution to
this must be found inside StrongED.
Perhaps altering the cs-Drag behaviour, instead of applying it to all
texts the script is applied to texts that are selected in the LoW. This
would mean a script could be applied to any set of files, including all
so that functionality isn't lost.
Just an off the cuff idea but it looks do-able. Any comments?
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxxxxx
List archives at http://www.Torrens.org.uk/RO/StrongED/index.html