EmEditor (text editor) Forum Index
   Questions and Answers about Macros
     custom find behavior
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Thyresias
Posted on: 8/13/2010 12:16 am
Just popping in
Joined: 8/6/2008
From:
Posts: 3
custom find behavior
こんにちは

I would like to implement the following behavior in a macro:
- if the selection is empty, repeat the last find command
- if it is not, find the selected text

I tried this:

if (document.selection.IsEmpty)
document.selection.FindRepeat(eeFindRepeatNext);
else
document.selection.Find(document.selection.Text, eeFindNext + eeFindAround);

It works when the selection is not empty, but when it is, it will repeat the last find entered through the dialog box, not the one performed by the macro through selection.Find.

Is there a way:
- to store the arguement of selection.Find as the last search
- to query EmEditor about the current find settings (ideally, if regular expressions are on, you just want to do "repeat find" even if the selection is not empty)

Thanks
-- Thierry
Flat Previous Topic | Next Topic


Subject Poster Date
 » custom find behavior Thyresias 8/13/2010 12:16 am
     Re: custom find behavior Yutaka 8/16/2010 7:56 pm

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文