foolove Posted October 25, 2011 Share Posted October 25, 2011 I know there is a way to do this maybe it is pixelchecksuming the screen I want to do a series of mouseclicks that will work on any screen/video card/ etc if there isnt a sure fire way from my research pixelchecksum is the most accurate maybe? Link to comment Share on other sites More sharing options...
foolove Posted October 25, 2011 Author Share Posted October 25, 2011 I think the key here maybe would be to detect and map current screen resolution? hoping someone can clear this up for me Link to comment Share on other sites More sharing options...
Developers Jos Posted October 25, 2011 Developers Share Posted October 25, 2011 Doubt somebody can clear up anything until you be much clearer in what you really want. Be exact, be precise, be clear when you ask questions. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
foolove Posted October 25, 2011 Author Share Posted October 25, 2011 I am wanting this to do mouse clicks and have my script work on any screen resolution maybe detect the change of screen resolution and adjust accordingly. Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 25, 2011 Share Posted October 25, 2011 Intentionally vague questions are vague. And usually they're vague for a reason the rules would frown on. As for detecting screen resolution, have you looked at the selection of @macros in the help file? Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
foolove Posted October 25, 2011 Author Share Posted October 25, 2011 cool man so it appears for a given script maybe i can do as such be kind im new @DesktopHeight Height of the desktop screen in pixels. (vertical resolution) @DesktopWidth Width of the desktop screen in pixels. (horizontal resolution) pass the parameters for those then how would i specify a mouse click and have it autoadjust so if i give my script to a friend it will work on their resolution Link to comment Share on other sites More sharing options...
kaotkbliss Posted October 26, 2011 Share Posted October 26, 2011 how would i specify a mouse click and have it autoadjust so if i give my script to a friend it will work on their resolution MathHave a default resolution, then subtract or add depending on the new sizeFor simplicity sakeSay your default is 5 Width (@DesktopWidth = 5)but your friends is 10 you would need an if/then (probably the easiest to start with)If @DesktopWidth = 5 Then$mouseX = 2.5 (1/2 of 5, center of screen)ElseIf @DesktopWidth = 10 Then$mouseX = 5EndIf But that would be a lot of If's So you could do percentage of Desktop or find the difference between the "default" resolution and the user's resolution and adjust the click position based on the ratio again, Math 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Chimaera Posted October 26, 2011 Share Posted October 26, 2011 This will find the resolution If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 26, 2011 Share Posted October 26, 2011 (edited) $default_resolutionX = 800 $default_resolutionY = 600 $x_ratio = $default_resolutionX / @desktopwidth $y_ratio = $default_resolutionY / @desktopheight MouseMove(Round(400 * $x_ratio) , Round(300 * $y_ratio),15) No If statments required. If the monitor's in 800x600 ... it equals out to "1" May get into some rounding issues if single pixel precision is required though. Edit: Fixed a parentheses issue Edited October 26, 2011 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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