Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Constants.au3>
- #include <GUIConstantsEx.au3>
- #Region ### START Koda GUI section ### Form=
- $Form1 = GUICreate("AForm1", 122, 42, 438, 156)
- $Label1 = GUICtrlCreateLabel("15:00", 8, 8, 43, 17)
- $label_tray = GUICtrlCreateLabel("Hide TrayTip", 8, 28, 70, 17)
- GUICtrlSetFont($label_tray,8.5,400,4)
- GUICtrlSetCursor($label_tray,0)
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- Local $k = 0, $ShowTrayTip = True
- $time=TimerInit()
- While 1
- $nMsg = GUIGetMsg()
- Switch $nMsg
- Case -3
- Exit
- Case $label_tray
- If $ShowTrayTip = True Then
- GUICtrlSetData($label_tray,"Show TrayTip")
- $ShowTrayTip = False
- Else
- GUICtrlSetData($label_tray,"Hide TrayTip")
- $ShowTrayTip = True
- EndIf
- EndSwitch
- If TrayGetMsg() = $TRAY_EVENT_PRIMARYDOWN Then MsgBox(0,0,0)
- $snew = TimerDiff ($time)
- If $k <> Int($snew/1000) Then
- $new = (15*60*1000)-$snew
- $seconds = Round ($new/1000)
- $newMin = Floor ($seconds/60)
- $newSec = Mod ($seconds, 60)
- If $newSec < 10 Then $newSec = "0"&$newSec
- GUICtrlSetData ($Label1, $newMin&":"&$newSec)
- $k = Int($snew/1000)
- TraySetToolTip ($newMin&":"&$newSec)
- If $ShowTrayTip Then TrayTip("CountDown",$newMin&":"&$newSec,1)
- EndIf
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement