| View previous topic :: View next topic |
| Author |
Message |
SB99 Guest
|
Posted: Sat May 02, 2009 4:50 am Post subject: Post Message in Browser, clicking problem |
|
|
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
|
Posted: Sat May 02, 2009 4:55 am Post subject: |
|
|
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 |
|
 |
SB99 Guest
|
Posted: Sat May 02, 2009 5:24 am Post subject: |
|
|
| 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
|
Posted: Sat May 02, 2009 5:30 am Post subject: overkill |
|
|
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 |
|
 |
tank
Joined: 21 Dec 2007 Posts: 3700 Location: Louisville KY USA
|
Posted: Sun May 03, 2009 12:49 am Post subject: |
|
|
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 |
|
 |
|