UserVar 终止时间="2015-07-02 20:18:11" "终止时间"
UserVar 铃声="C:\Users\Administrator\Desktop\仙剑问情_547369 - 铃声.mp3" "铃声路径"
UserVar 停止="时间到了,起床床了!" "停止弹窗提示内容"
UserVar 响铃几秒="38" "响铃几秒?默认38"
Declare Function GetCurrentProcess Lib "kernel32" Alias "GetCurrentProcess" () As Long
Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Dim 当前进程
Global df
df=停止
do
s=Plugin.Sys.GetDateTime()
TracePrint s
Delay 1000
Call Plugin.Msg.Tips("现在时间" & s)
If s = 终止时间 Then
Call 响铃()
Exit Do
ElseIf s > 终止时间 Then
TracePrint "脚本时间大于终止时间,脚本结束"
Call Plugin.Msg.ShowScrTXT(0, 0, 300, 300, "脚本时间大于终止时间,脚本结束", "0000FF")
Call Plugin.Msg.Tips("脚本时间大于终止时间,脚本结束")
EndScript
End If
Loop
Sub 弹窗()
MessageBox df
End Sub
Sub 响铃()
线程ID = BeginThread(等待按键)
线程ID1 = BeginThread(弹窗)
Do
Call Plugin.Media.Play(铃声)
Delay 响铃几秒 * 1000
loop
End Sub
Sub 等待按键()
Do
s = WaitKey()
TracePrint s
If s = "" Then
Else
当前进程 = GetCurrentProcess()
TerminateProcess 当前进程,0
End If
loop
End Sub
嘿嘿,回帖哦