Jump to content

GUICtrlCreateLabel change label? or remove?


Didonet
 Share

Recommended Posts

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

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

Edited by Didonet
Link to comment
Share on other sites

  • Developers

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 .

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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