Newscritpz Posted October 17, 2013 Share Posted October 17, 2013 Hi I'm using this formula to adapt my mouseclick based script (controlclick doesn't work) to different resolutions: ;(<screen x position> / <screen x dimension>) * 100 = % $pctX = (< x coords of the pixel to be clicked >/$desktopwidth)*100 $pctY = (< y coords... > /$desktopheight)*100 MouseClick("left",($pctX * $desktopwidth)/100, ($pctY * $desktopheight)/100, 1, 0) But this method can be used only with monitors with the same ratio of mine ( 16:9 ), if I try for example with a 16:10 or 5:4 the coords don't match. How can I modify the formula to let it work on different monitors? Link to comment Share on other sites More sharing options...
JohnOne Posted October 17, 2013 Share Posted October 17, 2013 I have seen a "formula" on the forums, just don't know where try a search. However there are usually easier ways, a pixel is a pixel whatever the screen resolution, so using MouseCoordMode will usually fix the problem. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Newscritpz Posted October 17, 2013 Author Share Posted October 17, 2013 Sorry I didn't explain the problem very well because of my english... The pixels I want to click are in some windows which are automaticaly resized to fit in the screen. So even if I use relative/client mouseclick mode it doesn't work because the windows are adapted to the different resolution and the coordinates change. The method I posted before works with different resolutions, but only if the aspect ratio is the one I'm using on my monitor (16:9). Link to comment Share on other sites More sharing options...
Bert Posted October 17, 2013 Share Posted October 17, 2013 can you use controlclick? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
BigDod Posted October 17, 2013 Share Posted October 17, 2013 can you use controlclick? Read first line of OP Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Bert Posted October 17, 2013 Share Posted October 17, 2013 :doh: :doh: :doh: :doh: The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Newscritpz Posted October 18, 2013 Author Share Posted October 18, 2013 There's no way to solve my problem? Link to comment Share on other sites More sharing options...
Bert Posted October 18, 2013 Share Posted October 18, 2013 Why can't you use control click? You say you can't but not the reason why. If you told us the name of the application maybe we could figure out a workaround. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Sori Posted October 18, 2013 Share Posted October 18, 2013 Dim $xMove = @DesktopWidth Dim $yMove = @DesktopHeight MouseMove((<coordinate % in decimal form> * $xMove), (<coordinate % in decimal form> * $yMove), 0) ----- This is what I usually use. If you need help with your stuff, feel free to get me on my Skype. I often get bored and enjoy helping with projects. 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