Posts: 3
Threads: 2
Joined: Feb 2006
Hello,
Is there a way to search for a text string in a window where the Windows Search / Find function is disabled?
Posts: 12,140
Threads: 142
Joined: Dec 2002
Depends on window (Internet Explorer, Windows Explorer, Notepad, etc). And what to do then (click, etc).
Posts: 3
Threads: 2
Joined: Feb 2006
Outlook Express 6, the properties dialog of an e-mail, Details tab. What I want to do is get the information from a specific field of the properties (most likely the "From" field). I want the sender's e-mail address, not a nickname, copied so that it's on the clipboard. The long way to do this would be to make the macro right-click in the properties, click "Select All", paste it into Notepad, and use the Find function there. I could do that I suppose, but it seems so unrefined. ^^;;
Posts: 12,140
Threads: 142
Joined: Dec 2002
1. Store all text to a variable. The text field is a control (window that is part of other window). To get its text, use Window dialog, "Get text" action. Drag the second "Drag" picture to capture the control. Delete window text to make the macro work with whatever message. Specify a variable.
2. Find needed string using findrx (if you know regular expressions) or other string functions.
3. Use setclip to store the found string to the clipboard.
str s.getwintext(id(136))
str email
if(findrx(s "^From: .*<(.+?)>$" 0 8|1 email 1)>=0)
,email.setclip