Sign in to follow this  
Followers 0
sebsabul

GUI Label

4 posts in this topic

Hey guys, I´ve got a problem. I need some help (Sorry for bad English)

That´s my source:

#include <GUIConstants.au3>

GUICreate("Info")

GUISetState (@SW_SHOW)

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

$info = 0

WinWait("Nachrichtendienst", "", 6)

If WinWait("Nachrichtendienst", "", 6) then

$info = $info + 1

$text = WinGetText("Nachrichtendienst")

winclose("Nachrichtendienst")

GUICtrlCreateLabel ("", 10, 30, 50 ) -----------------------> Here is my Problem!!!

endif

If $info = 5 then

MsgBox(0, "Warning: Value of $info is:", $info)

endif

Wend

My Problem: I will show the value of $text in the GUICtrlCreateLabel. How?

Thank you for answers!

sebsabul

Share this post


Link to post
Share on other sites



GUICtrlCreateLabel ($text, 10, 30, 50 ) -----------------------> Here is my Problem!!!

?


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

it'll be something similar to this:

#include <GUIConstants.au3>
WinWait("Nachrichtendienst", "", 6)
$InfoGui = GUICreate("Info")
$textlabel = GUICtrlCreateLabel ("", 10, 30, 50 )
GUISetState (@SW_SHOW) 
local $info = 0


While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

WinWait("Nachrichtendienst", "", 6)
If WinWait("Nachrichtendienst", "", 6) then
$info = $info + 1
$text = WinGetText("Nachrichtendienst")
ControlSetText($InfoGui, "", $textlabel, $text)
winclose("Nachrichtendienst")
;GUICtrlCreateLabel ("", 10, 30, 50 ) -----------------------> Here is my Problem!!!
endif
If $info = 5 then
MsgBox(0, "Warning: Value of $info is:", $info)
endif
Wend

edit: moved $info = 0 out of the loop so it doesn't keep resetting to 0

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Thanks that was the selotion for my problem. My next problem. The size of the label should 1/3 of the Gui. When i set the wide and the high, the label is away (GUICtrlCreateLabel ("", 10, 30, 50, 40, 40).

Please help me !

Sebsabul

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