PcExpert Posted December 19, 2006 Share Posted December 19, 2006 Hi,Howto make a program that clicks on every monitor size at the same place? For Example: You programmed a script to click at x: 125 and y: 125. When you excute the script on a computer with a 15 inch it clicks at x: 125 and y: 125, then you try the script on an 21 inch monitor and it clicks also at x: 125 and y: 125.I Thought that the script must look like this:MouseClick("left", @DesktopHeight 125, @DesktopWidth 125, 1)But that doesn't work. Thanks for your help Link to comment Share on other sites More sharing options...
Helge Posted December 19, 2006 Share Posted December 19, 2006 Eehm..MouseClick("left", 125, 125, 1) Link to comment Share on other sites More sharing options...
PcExpert Posted December 19, 2006 Author Share Posted December 19, 2006 OK, sorry for this stupid question, but I was thinking that there was another way to do so. Link to comment Share on other sites More sharing options...
PcExpert Posted December 20, 2006 Author Share Posted December 20, 2006 (edited) I tested it. So the code I wrote was: MouseClick("left", 341, 125, 1) On the PC (with a 15,4" screen) where I wrote the script it clicks the right button, but when I excute the script at an other computer (with a 19" screen) It just clicks my desktop, not a button. Whats wrong? Tried it again, but then with only the mouseclick in the script, but that didn't work either. Edited December 20, 2006 by PcExpert Link to comment Share on other sites More sharing options...
HackerZer0 Posted December 20, 2006 Share Posted December 20, 2006 you must use the same resolution Earn money on CASHCRATE by sitting around doing nothing.. Link to comment Share on other sites More sharing options...
PaulIA Posted December 21, 2006 Share Posted December 21, 2006 Actually, the problem is that he's asking the wrong question. The question isn't how do you click in the same spot on the screen. The MouseClick function does exactly that, regardless of what size the monitor is. The question he should have asked is, how do I click on a (button, item, etc) in/on (notepad, IE, desktop, etc.). Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
PcExpert Posted December 21, 2006 Author Share Posted December 21, 2006 PaulIA, You're totally right! So my question is: how do I click on a button in/on notepad with different screen resolution? Link to comment Share on other sites More sharing options...
Helge Posted December 21, 2006 Share Posted December 21, 2006 PaulIA, You're totally right! So my question is: how do I click on a button in/on notepad with different screen resolution?That's partially why I chose the word I did in my previous post. The other reason was the invalid parameters, 2 and 3.Anyway, I would recommend you to check out ControlClick, and the similar functions. What kind of application do youwant to interact with btw ? Link to comment Share on other sites More sharing options...
PcExpert Posted December 21, 2006 Author Share Posted December 21, 2006 Id like to interact with the program spysweeper. Link to comment Share on other sites More sharing options...
MHz Posted December 21, 2006 Share Posted December 21, 2006 Use Opt('MouseCoordMode', 2) will allow relative coords to the client area of the active window. Remember to also set Window Info Tool to Client in Coord mode within Options to get the right coordinates to click on the target window. That should help minimize resolution issues with mouseclicking on the windows. Link to comment Share on other sites More sharing options...
PcExpert Posted December 21, 2006 Author Share Posted December 21, 2006 OK, Thanks! ControlClick doesn't work because the controlID changes when the program is restarted. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now