AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

highlightening an opened web page

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Benny-D
Guest





PostPosted: Wed Feb 20, 2008 4:59 pm    Post subject: highlightening an opened web page Reply with quote

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

PostPosted: Wed Feb 20, 2008 5:53 pm    Post subject: Reply with quote

maybe need winwaitactive?
_________________
Unless otherwise noted, all code is untested.
Common Answers: 1.(Loops, Viruses, etc.) 2. Search 3.RTFM
Back to top
View user's profile Send private message Visit poster's website
Erittaf



Joined: 03 Nov 2007
Posts: 182

PostPosted: Wed Feb 20, 2008 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Benny-D
Guest





PostPosted: Thu Feb 21, 2008 7:46 pm    Post subject: Reply with quote

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

PostPosted: Thu Feb 21, 2008 8:45 pm    Post subject: Reply with quote

oh, i had assumed Embarassed that you wanted the statusbarwait to timeout after 20 seconds. StatusBarWait, Done, , , , , 20 is correct for what you wanted to do.
Back to top
View user's profile Send private message Send e-mail
Benny-D
Guest





PostPosted: Fri Feb 22, 2008 6:16 am    Post subject: Reply with quote

oh, I see. Thank you
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group