Dizzy Posted October 10, 2006 Posted October 10, 2006 Hi all! Question: Where is the info "mouse position" of the autoit windows info gone? Look at the old picture in the attachment. Or how can i get the relativ mouse position in a window? Thanks Dizzy
Bert Posted October 10, 2006 Posted October 10, 2006 READ THE HELP FILE! It is in there. From the help file: MouseGetPos -------------------------------------------------------------------------------- Retrieves the current position of the mouse cursor. MouseGetPos ( [dimension]) Parameters Dimension An optional argument that determines what the return value will be. See Return Value. Return Value Dimension Values None Returns a two-element array that containing the mouse coordinates: $array[0] = X coord (horizontal), $array[1] = Y coord (vertical) 0 Returns the X co-ordinate as an integer. 1 Returns the Y co-ordinate as an integer. If dimension is not a number @error will be set to 1. Remarks See MouseCoordMode for relative/absolute position settings. If relative positioning, numbers may be negative. Related MouseClick, MouseClickDrag, MouseMove, MouseCoordMode (Option) Example $pos = MouseGetPos() MsgBox(0, "Mouse x,y:", $pos[0] & "," & $pos[1]) The Vollatran project My blog: http://www.vollysinterestingshit.com/
Dizzy Posted October 10, 2006 Author Posted October 10, 2006 READ THE HELP FILE! It is in there. From the help file:Hmm - this gives me not a position IN a specific window.See at the picture of my first post. GreetsDizzy
jvanegmond Posted October 10, 2006 Posted October 10, 2006 $pos = MouseGetPos() $pos2 = WinGetPos() ; fill in parameters!! MsgBox(0, "Relative Mouse x,y:", $pos[0]-$pos2[0] & "," & $pos[1]-$pos2[1]) github.com/jvanegmond
Administrators Jon Posted October 10, 2006 Administrators Posted October 10, 2006 It's still there... Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Moderators SmOke_N Posted October 10, 2006 Moderators Posted October 10, 2006 What version of AutoInfo are you using? (that looks ancient ).Class: SciTEWindowSize: X: -4 Y: -4 W: 1288 H: 902>>>>>>>>>>> Mouse Details <<<<<<<<<<<Client: X: 981 Y: 179Cursor ID: 5Under Mouse Details, it can be changed in Options, Change Coord Mode, 3 settings (Screen/Window/Client). Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Dizzy Posted October 10, 2006 Author Posted October 10, 2006 :"> there is something with my eyes I've to look to the Options - Coord Mode - Window Thats all - :"> Maybe this helps other which are blind as i was
herewasplato Posted October 10, 2006 Posted October 10, 2006 Or you might want to take the time to make your own set of little tools like this one:AutoItSetOption("MouseCoordMode", 1) ;Use Mouse Coordinates relative to: ;1-rel to desktop AutoItSetOption("TrayIconDebug", 1) HotKeySet("{PAUSE}", "Terminate") While 1 $pos = MouseGetPos() ToolTip("Desktop X: " & $pos[0] & ", " & "Desktop Y: " & $pos[1] & " Pause2exit") Sleep(10) WEnd Func Terminate() ClipPut('MouseClick("left",' & $pos[0] & ',' & $pos[1] & ',1,1) ; wrt DESKTOP') Exit EndFunc ;==>TerminateStart the script. Place the mouse over the location of interest. End the script via the hotkey. Paste the contents of the Windows clipboard into your script. [size="1"][font="Arial"].[u].[/u][/font][/size]
chie Posted October 20, 2006 Posted October 20, 2006 (edited) I also read the help file & its totally not helpful at all! until i finally managed find that hidden option in the newest autiolt window info ! this done & all good(I found the window mouse coords i want to set) but the mouse wont move to the currently active window position Iset...& thats depressing, because there is no examples how to use it nowhere Now look at this, Why isnt it working? any ideas? HotKeySet("!{numpad9}", "NO_monitor_Opera") Func NO_monitor_Opera() ; Dont monitor opera function begins Run("IDMan.exe", "", @SW_MAXIMIZE) ;Opens ID-MAN ", "", maximise the window sleep(600) MouseMove(91, 31, 10) EndFunc Edited October 20, 2006 by chie
ame1011 Posted October 21, 2006 Posted October 21, 2006 The helpfile is one of the most easy to understand of any language I've seen. No offense but i think my neice would be able to read and understand what the functions in it do... [font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]
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