coder007 Posted November 20, 2019 Posted November 20, 2019 I am new to autoit is there a way to detect resolution and if i move my script to another computer with different graphics card and resolution within my screen the mouse will move to same area of screen?
Developers Jos Posted November 20, 2019 Developers Posted November 20, 2019 51 minutes ago, coder007 said: is there a way to detect resolution Sure and guess you didn't search the helpfile first? In the macro's section you will find: @DesktopHeight Height of the primary display in pixels. (Vertical resolution) @DesktopWidth Width of the primary display in pixels. (Horizontal resolution) 52 minutes ago, coder007 said: mouse will move to same area of screen That is something you will need to figure out as that heavily depends on what you are trying to do. ...so what exactly is the plan? 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.
Nine Posted November 20, 2019 Posted November 20, 2019 Simple math : #include <Constants.au3> Global Const $BaseX = 800, $BaseY = 600 MouseClickEX ("left",250,150,1) Func MouseClickEX ($sButton, $iPosX, $iPosY, $iClicks = 1, $iSpeed = 10) $iPosX = int ($iPosX/$BaseX*@DesktopWidth) $iPosY = int ($iPosY/$BaseY*@DesktopHeight) ConsoleWrite ("Clicking now " & $iPosX & "/" & $iPosY & @CRLF) MouseClick ($sButton, $iPosX, $iPosY, $iClicks, $iSpeed) EndFunc “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
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