下面小程式可以提供您工作時間計算與整點休息的提醒
include <date.au3>
HotKeySet("^!q", "Terminate")
HotKeySet("^!p", "Reset")
$begin = TimerInit()
Dim $nEnd = 0
Do
$dif = TimerDiff($begin)
$nSeconds = Round($dif / 1000, 0) ;換成秒數
$nMinutes = Floor($nSeconds / 60)
$nSecond = Mod($nSeconds , 60)
$nHours = Floor($nMinutes / 60)
$nMinute = Mod($nMinutes , 60)
ToolTip("現在時間 : "&_NowTime()&@LF&"工作時間 : "&$nHours&"小時"&$nMinute&"分"&$nSecond&"秒",0,0,"Ctrl+Alt+q 結束,Ctrl+Alt+p 重新計時 (c)Fred Wang",1,4)
If $nHours > 1 And $nMinute = 0 And $nSecond = 0 Then MsgBox(0,"Information","工作時間滿"&$nHours&"小時,休息一下吧!")
Sleep(1000)
Until $nEnd = 1
Func Terminate()
$nEnd = 1
ToolTip("")
Exit 0
EndFunc
Func Reset()
$begin = TimerInit()
EndFunc
沒有留言:
張貼留言
歡迎提供意見, 謝謝 (註 : 留言經過版主審核通過才會發布)