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 

Post Message in Browser, clicking problem

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
SB99
Guest





PostPosted: Sat May 02, 2009 4:50 am    Post subject: Post Message in Browser, clicking problem Reply with quote

I can't seem to find if the information given from WinSpector is from the top left of the control, or based on screen size or what.

I send a PostMessage, 0x201 (left mouse button down) followed by PostMessage, 0x202 (left mouse button up) to a location in an IE browser.

Should that command work regardless of screen size/resolution, or are my clicks going to be off for another user?

If they will be off, is there any way to fix this?
If they should not be off, what could I be doing wrong that would cause my clicks to not be working.

Sorry if any of this is unclear. If you have questions or need additional info please ask.
Back to top
engunneer



Joined: 30 Aug 2005
Posts: 8255
Location: Maywood, IL

PostPosted: Sat May 02, 2009 4:55 am    Post subject: Reply with quote

why are you using postmessage for this? Can you use ControlClick instead? that gives you control (via CoordMode) of the window/screen issue. It's also much easier to read and understand.
_________________

(Common Answers)
Back to top
View user's profile Send private message Visit poster's website
SB99
Guest





PostPosted: Sat May 02, 2009 5:24 am    Post subject: Reply with quote

engunneer wrote:
why are you using postmessage for this? Can you use ControlClick instead? that gives you control (via CoordMode) of the window/screen issue. It's also much easier to read and understand.


I was hoping that this was not as dependent on x,y coords, but it appears I was wrong about that. Also I was just trying to learn a little about PostMessage as I have never used it before.

Also, if it matters I have embedded the browser in a GUI via COM which has helped some. I think I might just go about this via ControlClick.

Thanks!
Back to top
Lemming



Joined: 20 Dec 2005
Posts: 165
Location: Malaysia

PostPosted: Sat May 02, 2009 5:30 am    Post subject: overkill Reply with quote

Engunner's right; postmessage is overkill for this task. For IE, I normally use a combo of Winactivate, ControlFocus, and Click. The classNN for the main IE window is usually Internet Explorer_Server1

Code:
WinActivate, Insert Your Window Title
ControlFocus, ahk_class Internet Explorer_Server1, Insert Your Window Title
Click 20,30


If the code runs too fast, just insert delays (Sleep, xxx) between the lines.

BTW, IE is actually more AHK-friendly than Firefox.
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Sun May 03, 2009 12:49 am    Post subject: Reply with quote

wrong method al together
but hey what do i know
_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
Display posts from previous:   
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