Sign in to follow this  
Followers 0
markitus90

Controlsettext help

13 posts in this topic

Hi guys,

I like to include controlsettext function in other kind of things. I include the structure i need to use. I dont know how to use this properly. 0 is always returned.

Thanks to give me your help.

$msg = ControlSetText('test', '', 'static1', MouseGetPos(1))
MsgBox(0, 'test', $msg)

Share this post


Link to post
Share on other sites



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?

Share this post


Link to post
Share on other sites

hi beege,

thansks to give me this information i dont know that

how to explain, i like to change this value to a new value setted by me.

Thanks.

Share this post


Link to post
Share on other sites

I like to do that without closing the windows. Thats the point where i am lost

Share this post


Link to post
Share on other sites

What is "this value"?

Share this post


Link to post
Share on other sites

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

Share this post


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?

Share this post


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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites

Beege ,

thank you so much :)

Share this post


Link to post
Share on other sites

No problem. :)

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