Reply to topic  [ 3 posts ] 
Open the Find window and setting the cursor 
Author Message

Joined: 2007-04-12 14:59:36
Posts: 229
I often need to find a certain type of numerical expression that occurs after a tab, and I thought I might write a simple macro that opens the find window, puts a tab and sets the cursor after it, like
Find and Replace '\t', '', 'E!'
Show find
Select End

But unexpectedly I run into two problems:
1) If the Find window is already open „Show find“ makes it disappear.
2) It seems the the Select end command does not execute in the find window
Is there a solution to this?

2007-07-30 01:19:14
Official Nisus Person
User avatar

Joined: 2002-07-11 17:14:10
Posts: 4251
Location: San Diego, CA
I'm sorry to say that there is no solution to this. I'll file two issues on this: first that the selection commands can't modify the Find dialog and another that Show Find menu should be literal in macros (and we should have a Hide Find command as well). Thanks.

2007-07-30 13:53:01
Profile WWW

Joined: 2008-05-17 04:02:32
Posts: 400
This one will do the job in NWP 1.3 or later.
$find = Cast to String '\t'
Find and Replace $find, '', 'E!'
Set Find Shown true
Send Selector 'moveToEndOfParagraph:'
or, if it is unnecessary to set the find options, …
Set Find Shown true
Send Text '\t'

Edit: added the second macro.

2009-12-27 20:17:28
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software