Jump to content

Flicker while updating Statusbar


Recommended Posts

Hey, i've got a problem with my statusbar.

Stautusbarcode:

$defaultstatus = "Ready"
$l_statusbar = GUICtrlCreateLabel($defaultstatus, 2, 232, 382, 16, $SS_SUNKEN)
oÝ÷ ÙJ]jס׺Ú"µÍBÚ[HBYØÙÜÑ^ÝÊ  ][ÝÚ^I][ÝÊH[BIÌÍÝÝHÕRPÝÙ]]J  ÌÍÛÜÝ]Ø   ][ÝÐÛÝ[TÝZÙHÝYH  [ÈÓ   ][ÝÊBQ[ÙBBBQÕRPÝÙ]]J  ÌÍÛÜÝ]Ø   ÌÍÙY][Ý]ÊBQ[YÙ[

Well, the program changes the label-data when hl.exe starts. But if the process doesn't (?) exists, it updates the label as long until hl.exe starts.

Effect: My statusbar is flickering.

How can I fix that?

Link to comment
Share on other sites

you can try using :

while 1
If ProcessExists("hl.exe") Then
    Sleep(25)
        $test = GUICtrlSetData($l_statusbar,"Counter-Strike started - HF & GL")
    Else
        Sleep(25)
        GUICtrlSetData($l_statusbar,$defaultstatus)
    EndIf
wend
Edited by mrbond007
Link to comment
Share on other sites

you can try using :

while 1
If ProcessExists("hl.exe") Then
    Sleep(25)
        $test = GUICtrlSetData($l_statusbar,"Counter-Strike started - HF & GL")
    Else
        Sleep(25)
        GUICtrlSetData($l_statusbar,$defaultstatus)
    EndIf
wend
Thanks! Omg, that was simple -.-

p.s. with sleep(50) it works better!

Edited by Sn0opy
Link to comment
Share on other sites

Or you can try this:

while 1
If ProcessExists("hl.exe") Then
        If GuiCtrlGetData($l_statusbar) <> "Counter-Strike started - HF & GL" Then
$test = GUICtrlSetData($l_statusbar,"Counter-Strike started - HF & GL")
EndIf
    Else
        If GuiCtrlGetData($l_statusbar) <> $defaultstatus Then GUICtrlSetData($l_statusbar,$defaultstatus)
    EndIf
wend
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...