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 

Get text position in a webpage? (non-string)

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



Joined: 05 Jul 2004
Posts: 1

PostPosted: Mon Jul 05, 2004 8:46 am    Post subject: Get text position in a webpage? (non-string) Reply with quote

Hi,
I'm new to this one, so I'm sorry if this question has been asked before. I've tried looking for teh answer, but could not find it.

Is there a way to work out a position of text in a window (like a webpage for example), so I can send the mouse click to it? Yes, I can work out the location from clicking on the webpage and recording it... but what if the position of the text is shifting? (things like a URL, or a button, or just text)

And is there a way to find a position, or a cell in a table, and get the information from it, without having to parse the webpage source code? Thanks
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Mon Jul 05, 2004 1:40 pm    Post subject: Reply with quote

If the object on the web page is in a control, it might be possible to get its position with ControlGetPos. Another option would be to use the tab key repeatedly to navigate to the correct URL or button. Also, you could try selecting sections of text with MouseClickDrag until you find the right one.

Finally, there is PixelGetColor/PixelSearch or some kind of 3rd party OCR method. By looking for a series of 2 or 3 pixels in exact colors and relative positions to each other, you might be able to recognize a unique trait of the target object (if there is anything about its image that is unique).
Back to top
View user's profile Send private message Send e-mail
WhiteCloud



Joined: 19 Jun 2004
Posts: 68

PostPosted: Mon Jul 05, 2004 4:14 pm    Post subject: Reply with quote

you can have the cursor move around and have it repeatedly check the status bar on internet explorer for any specified links. You can even have the cursor change direction if it gets to a nearby link. It sounds like something fun to code actually.

StatusBarGetText
Retrieves the text from a standard status bar control.


to get any information from a webpage i'm finding it's almost always best to parse the source since it's more reliable. It seems like a more complicated way but it's usually simpler for the tasks i've done.
_________________
AHK = Hella fun
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10463

PostPosted: Mon Jul 05, 2004 5:46 pm    Post subject: Reply with quote

That's a great idea.
Back to top
View user's profile Send private message Send e-mail
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