Sign in to follow this  
Followers 0
Didonet

GUICtrlCreateLabel change label? or remove?

6 posts in this topic

Can u give some idea to change the value of this thing?

i use this code for program status:

$statuslabel = GUICtrlCreateLabel ("Status: Offline",0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN))

but when i write:

$statuslabel = GUICtrlCreateLabel ("Status: Offline",0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN))

$statuslabel = GUICtrlCreateLabel ("Status: Online",0,165,300,16,BitOr($SS_SIMPLE,$SS_SUNKEN))

The last label goes of the top on the other one...

Can i create a dynamic label? :)

Share this post


Link to post
Share on other sites



Tnx ^^

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Can i refresh it like that?

Func status_check()

Global $statuslabel

While 1

Sleep(120000) ; 2 minutes

If Ping("site.com", 250) Then

GuiCtrlSetData($statuslabel,"Статус: свързан")

Else

GuiCtrlSetData($statuslabel,"Статус: изключен")

EndIf

WEnd

EndFunc

when i enter in the gui check_status() the gui opens, but it cannot do anything. It refreshes the status. I want to refresh the status and i want the gui to works at same time...

note: if i set the check_status() before the gui its the same thing...

Edited by Didonet

Share this post


Link to post
Share on other sites

Can i refresh it like that?

Func status_check()

Global $statuslabel

While 1

Sleep(120000) ; 2 minutes

If Ping("site.com", 250) Then

GuiCtrlSetData($statuslabel,"Статус: свързан")

Else

GuiCtrlSetData($statuslabel,"Статус: изключен")

EndIf

WEnd

EndFunc

when i enter in the gui check_status() the gui opens, but it cannot do anything. It refreshes the status. I want to refresh the status and i want the gui to works at same time...

note: if i set the check_status() before the gui its the same thing...

That is because you have a while-wend in there that is never left....

You need to return to the loop where you read the GUI messages .


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You need to return to the loop where you read the GUI messages .

What do u mean with that? I show the gui messages when i create the gui... :)

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