Jump to content

Need how to do help for blinking label


icadea
 Share

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

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

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