Jump to content

Recommended Posts

ControlSetText() does not return a value. It just returns 1 or 0 for success/fail. Are you trying to display the mouse position in the msgbox?

Link to post
Share on other sites

concretely i like to change the position of the mouse to the new pos.

Ok. You can use MouseMove() for that.

I like to include controlsettext function in other kind of things

What are you trying to do with controlsettext?
Link to post
Share on other sites

i think i am not explaining properly what i like to do. I like that in a msgbox appear a mouse position. After i like that this pos changes to see the new mouse pos coordenates inside the msgbox.

there is the reason i am trying to see the new position with controlsettext.

thanks

Link to post
Share on other sites

i think i am not explaining properly what i like to do.

Ya..Thats an understatement. :)

I like that in a msgbox appear a mouse position

MsgBox(0,'X,Y',MouseGetPos(0) & ',' & MouseGetPos(1))
Link to post
Share on other sites

Begee i like thath the coordinates changes acording to the mouse position

i tryed a new code like :

#include <GUIConstantsEx.au3>
$msg =  'X: ' & MouseGetPos(0) & ' Y: ' & MouseGetPos(1)
MsgBox(0, 'test', $msg)
while 1
$move = GUIGetMsg()
if $move = $GUI_EVENT_MOUSEMOVE then $msg = 'X: ' & MouseGetPos(0) & ' Y: ' & MouseGetPos(1) ;show the new mouse position
Sleep(100)
wend
EndIf

or something .

Thanks

Link to post
Share on other sites

$hgui = GUICreate('',200, 200)
$lPos = GUICtrlCreateLabel('Mouse', 25, 100, 100, 100)
GUISetState()
$Lastpos = MouseGetPos()
GUICtrlSetData($lPos, 'mouse = ' & $Lastpos[0] & ' , ' & $Lastpos[1])
While 1
Switch GUIGetMsg()
  Case -3
   Exit
EndSwitch
$pos = MouseGetPos()
If $pos[0] <> $Lastpos[0] Or $pos[1] <> $Lastpos[1] Then
  GUICtrlSetData($lPos, 'mouse = ' & $pos[0] & ' , ' & $pos[1])
  $Lastpos = $pos
EndIf
WEnd

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

    No registered users viewing this page.

×
×
  • Create New...