Sign in to follow this  
Followers 0
Dizzy

Where is the "mouse position"?

10 posts in this topic

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? :lmao:

Thanks

Dizzy

post-83-1160469597_thumb.jpg

Share this post


Link to post
Share on other sites



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])

Share this post


Link to post
Share on other sites

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.

Greets

Dizzy

Share this post


Link to post
Share on other sites

What version of AutoInfo are you using? (that looks ancient :lmao: ).

Class: SciTEWindow

Size: X: -4 Y: -4 W: 1288 H: 902

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Client: X: 981 Y: 179

Cursor ID: 5

Under Mouse Details, it can be changed in Options, Change Coord Mode, 3 settings (Screen/Window/Client).

[center]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.[/center]

Share this post


Link to post
Share on other sites

:"> there is something with my eyes :lmao:

I've to look to the Options - Coord Mode - Window

Thats all - :">

Maybe this helps other which are blind as i was :ph34r:

Share this post


Link to post
Share on other sites

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   ;==>Terminate
Start 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]

Share this post


Link to post
Share on other sites

#9 ·  Posted (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 :lmao:

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 by chie

Share this post


Link to post
Share on other sites

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]

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0