Jump to content

Recommended Posts

Posted

What I have been trying to do is try to make a program where the gui will show the Mouse's position. This is kinda like what AutoIt Window info program does. Anyone knows the script in doing this?

Thanks

Posted (edited)

Check out GUIGetCursorInfo in the helpfile.

Edit : Ooh. Did you mean that you want to show the numbers returned from

MouseGetPos in a GUI ? If so, just create a GUI, a label (or whatever) and put

the data there with GUICtrlSetData. Check out some GUI-examples if you're

new with GUIs.

Edited by Helge
Posted

Edit : Ooh. Did you mean that you want to show the numbers returned from

MouseGetPos in a GUI ? If so, just create a GUI, a label (or whatever) and put

the data there with GUICtrlSetData. Check out some GUI-examples if you're

new with GUIs.

Yup, anyway, is it something like this?

$pos = MouseGetPos()

GUICtrlSetData ( -1, $pos[0],$pos[1] )

Posted

Get rid of the 2nd comma and you maybe close. GuiCtrlSetData usually uses 2 parameters. :whistle:

Yargg! did that and an error showed up :S

GuiCtrlSetData (-1,$pos[0]$pos[1])

GuiCtrlSetData(-1,^Error

Error:Error in Expression

  • Moderators
Posted

If IsArray($pos) Then

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.

Posted (edited)

If IsArray($pos) Then

If you read the error-message then you will see that that's not the problem in his case.

Not the use of the &'s.

GuiCtrlSetData (-1,$pos[0] & "x" & $pos[1])

Edit : Icekirby1 beat me to it. Multi-tasking isn't working very well for me :whistle:

Edited by Helge

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...