 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Benny-D Guest
|
Posted: Wed Feb 20, 2008 4:59 pm Post subject: highlightening an opened web page |
|
|
Why does this script not highlighten the opened web-page?
| Code: | Run, www.yahoo.com
MouseMove, 0, 0 ; Prevents the status bar from showing a mouse-hover link instead of "Done".
WinWait, Yahoo! -
WinActivate
StatusBarWait, Done, , , , , 20
if ErrorLevel
MsgBox the command timed out before a match could be found in the status bar.
else
Send ^a ; Highlighten the opened page |
|
|
| Back to top |
|
 |
engunneer
Joined: 30 Aug 2005 Posts: 6772 Location: Pacific Northwest, US
|
Posted: Wed Feb 20, 2008 5:53 pm Post subject: |
|
|
maybe need winwaitactive? _________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM |
|
| Back to top |
|
 |
Erittaf
Joined: 03 Nov 2007 Posts: 182
|
Posted: Wed Feb 20, 2008 6:05 pm Post subject: |
|
|
| Code: |
Run, www.yahoo.com
MouseMove, 0, 0 ; Prevents the status bar from showing a mouse-hover link instead of "Done".
WinWait, Yahoo! -
WinActivate
StatusBarWait, Done, 10
if ErrorLevel
MsgBox the command timed out before a match could be found in the status bar.
else
Send {tab}{tab}^a ; Highlight the opened page
return |
read the doc on statusbarwait...
the tabs are needed so the focus is in a position on the yahoo page to highlight everything. otherwise the focus is in the search field (or button) and a ^a does not hit the page, just the search field. |
|
| Back to top |
|
 |
Benny-D Guest
|
Posted: Thu Feb 21, 2008 7:46 pm Post subject: |
|
|
Thank you, except I don't understand why you've changed
parameters in in StatusBarWait command. I wanted the status
bar to be checked - while the command is waiting - every
20 milliseconds. Why did you take this parameter away?
[ Moderator!: Remove the redundant quote. Please do not quote the previous post unneccessarily ] |
|
| Back to top |
|
 |
Erittaf
Joined: 03 Nov 2007 Posts: 182
|
Posted: Thu Feb 21, 2008 8:45 pm Post subject: |
|
|
oh, i had assumed that you wanted the statusbarwait to timeout after 20 seconds. StatusBarWait, Done, , , , , 20 is correct for what you wanted to do. |
|
| Back to top |
|
 |
Benny-D Guest
|
Posted: Fri Feb 22, 2008 6:16 am Post subject: |
|
|
| oh, I see. Thank you |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|