Jump to content

GUI Label


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

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