SoulBlade Posted September 1, 2007 Share Posted September 1, 2007 Hi! I'm trying to create a GUI that launches a hidden DOS command, while blinking some text. The hidden command only runs once. After finnishing the hidden command, the text must stop blinking. Here's the code i have so far: CODE#include <GUIConstants.au3> GUICreate("TEST", 490, 320) $run= "dir %windir% /s /w" Global $ColorToggle = 1 Global $Label1 = GUICtrlCreateLabel("RUNNING COMMAND!", 5, 5, 198, 170) GUISetState(@SW_SHOW) AdlibEnable("Blink",500) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Runwait(@ComSpec & " /c " & $run, "", @SW_HIDE) Func Blink() $Color1 = 0x000000;red $Color2 = 0xFF0000;White $ColorToggle = Not $ColorToggle If $ColorToggle = 1 Then GUICtrlSetColor($Label1,$Color1) Else GUICtrlSetColor($Label1,$Color2) EndIf EndFunc Thanks for help! Link to comment Share on other sites More sharing options...
Developers Jos Posted September 1, 2007 Developers Share Posted September 1, 2007 #include <GUIConstants.au3> GUICreate("TEST", 490, 320) $run = "dir C:\WINDOWS /s /w" Global $ColorToggle = 1 Global $Label1 = GUICtrlCreateLabel("RUNNING COMMAND!", 5, 5, 198, 170) GUISetState(@SW_SHOW) AdlibEnable("Blink", 500) RunWait(@ComSpec & " /c " & $run, "", @SW_HIDE) AdlibDisable() GUICtrlSetColor($Label1, 0x000000) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func Blink() $Color1 = 0x000000;red $Color2 = 0xFF0000;White $ColorToggle = Not $ColorToggle If $ColorToggle = 1 Then GUICtrlSetColor($Label1, $Color1) Else GUICtrlSetColor($Label1, $Color2) EndIf EndFunc ;==>Blink 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 More sharing options...
SoulBlade Posted September 1, 2007 Author Share Posted September 1, 2007 Many thanks for the fast reply! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now