Posted 24 May 2004 - 06:18 PM
i dont know whats the problem when i open my desired windows to get the X,Y poisition for macroing, i move my cursor on the desired position, then write the X,Y coord, when i move my mouse and put the cursor on the same place again i have a big difference of 100*pixel .. (using AutoIt Window Spy) never the same result i tried to start each time from coord 0, 0 then move back to the desired position .. always the same problem and btw i dont have any cursor acceleration
Posted 24 May 2004 - 06:57 PM
Posted 24 May 2004 - 07:00 PM
Posted 24 May 2004 - 07:01 PM
Posted 24 May 2004 - 07:06 PM
but is not the problem the problem is how to get an "absolute window coordinate"
can you explain more what you are talking about Pekster?
Posted 24 May 2004 - 07:15 PM
Edited to correct a small typo, and again to remove larger picture
Edited by pekster, 24 May 2004 - 08:05 PM.
Posted 24 May 2004 - 07:16 PM
EDIT: its impossible for me to get the right coord cause when i move my mouse around and trying to get the coord again it always change sometime i can have 330,30 .. or 576,60 etc.. etc..
Edited by Zykl02, 24 May 2004 - 07:20 PM.
Posted 24 May 2004 - 07:23 PM
well, what's your hotspot? I button on a dialog, a picture on a webpage? there's numerous ways to get a location and then have a mouse click on it...
ok thanks for the info but the main problem still unresolved... how do i get THE coordinate of my hotspot.
here's a little snipet that looks for a specific color then moves the mouse to that coord. I wrote it in a do loop to play curveball.swf automatically (it sucks, but it does move the mouse to that color)
$moveto = PixelSearch(113, 145, 689, 540, 0xA0FFB2 , 10 , 2) If Not @error Then MouseMove( $moveto, $moveto ,0 ) EndIf
in this case I just went with absolute coords and avoided the issue of windows size and location by resizing the IE window to 800x600 at the start of the script.
Posted 24 May 2004 - 07:54 PM
Posted 24 May 2004 - 10:09 PM
well, really, what're you trying to click? there's probably a better and less iffy way than pixel searching... can you do whatever you're trying to do by just using the keyboard? that's the best way to get autoit to work right everytime... well, second best, the best is really to us controls...
ok thanks i will try to make my macro using pixel color its a little more tricky but it should work too
Posted 24 May 2004 - 10:19 PM
Please elaborate to help us help you...
Some helpful information:
- Your Operating System (or Systems if this is a cross platform issue)
- Script snipit of the script that's not working (try to isolate just the part that's not working)
- what you've already tried to make it work (snipits of that code doesn't hurt if you have it)
- what version of autoit you're running
- what you're trying to make the script do (someone may have already
- figured it out, or it might be in the FAQ)
- what you've already read in the FAQ or Help File that didn't work
- And whatever else you think might be helpful in helping us help you...
Posted 25 May 2004 - 12:00 AM
Posted 25 May 2004 - 12:40 AM
Posted 25 May 2004 - 01:43 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users