Jump to content
Sign in to follow this  
Sn0opy

Flicker while updating Statusbar

Recommended Posts

Sn0opy

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?

Share this post


Link to post
Share on other sites
mrbond007

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

Share this post


Link to post
Share on other sites
Sn0opy

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

Share this post


Link to post
Share on other sites
poisonkiller

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

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  

×