Reply to topic  [ 1 post ] 
Macros: making progress 
Author Message

Joined: 2005-07-29 06:35:13
Posts: 9
Location: UK
I have posted twice with no replies. Really hoping I'll have some feedback now. ;-)

Here's what I want to do:

Change the color of all text matching a regular expression to red

Can't use perl because it can't do text styles (yet).

Can't do just menu commands, as I can't put in the text to be found.

So try AppleScript. I am trying a way to open the find window, paste an expression, then continue from there. But I can't get AppleScript to see it as a window. I have written the following script.

tell application "Nisus Writer Express"
   Do Menu Macro with macro "Edit:Find:Find…"
   --   set color of selected text of document 1 to "red"
   copy the (count of windows of frontmost application) to num
   repeat with i from 1 to the num
      if name of window i contains "Find" then
         display dialog (name of window i) as string
      end if
   end repeat
end tell

But it does not see a window with "Find" in the name.

Can anyone comment or suggest anything? A pointer to some examples would be useful.[/b][/code]

Kaveh Bazargan

2005-08-02 02:45:37
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 3 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