Jump to content
Sign in to follow this  
icadea

Need how to do help for blinking label

Recommended Posts

Hi all,

Am trying to make the label blink alternatively with any given number of colours till it closes.

The code is given below

#include <GUIConstants.au3>

$lab = GUICreate("", 750, 40, 200, 0, $WS_POPUP, $WS_EX_TOOLWINDOW)
GUISetBkColor(0xFF0000)

GUISetState(@SW_SHOW)
WinSetOnTop($lab, "", 1)
    
WinSetTrans($lab, "", 255)

While 1
    Sleep(100)
WEnd

Have searched the forum and came close to post at the link below

http://www.autoitscript.com/forum/index.ph...st&p=430585

http://www.autoitscript.com/forum/index.ph...=blinking+label

but i could not seem to adjust the script to do the work here as needed.

Please guide/help. Thanks

Edited by icadea

Share this post


Link to post
Share on other sites

Well, did you even look at Paulie's or Valuater's scripts? Valuaters was the closest to what you want, I guess.

Now, you should also take a look at GuiEnhance, by RazerM and use _GUIEnhanceCtrlFad(). It fades a control's background color in a reeeaally smooth way. Try it out.

Share this post


Link to post
Share on other sites

am trying but is seems i'm keep getting only the text blinking and not the background... anyway, thanks for your help.

Just need to figure out where i'm going wrong..

Share this post


Link to post
Share on other sites

Hi icadea,

What Label ? I don't see a label in your snippet of code..

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

$lab = GUICreate("", 750, 40, 200, 0, $WS_POPUP, BitOr($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
GUISetOnEvent($GUI_EVENT_CLOSE, "Close", $lab)
GUISetState(@SW_SHOW)

AdlibEnable("RandomColor", 100)

While 1
    Sleep(100)
WEnd

Func RandomColor()
    GUISetBkColor(Random(0x000000, 0xffffff), $lab)
EndFunc

Func Close()
    Exit
EndFunc

Cheers

Share this post


Link to post
Share on other sites

hi smashly,

Thank you for providing the help on the code above.

I meant label as in the line below

$lab = GUICreate("", 750, 40, 200, 0, $WS_POPUP, $WS_EX_TOOLWINDOW)
GUISetBkColor(0xFF0000)

sorry if i have named it wrong. thanks again.

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  

×
×
  • Create New...