; 自动段 ; 定义热键 Hotkey, F1, TJXRW ; 添加新任务 Hotkey, F4, Allrenwu ; 查看所有任务 ; 定时设置Gui dingshiGui: Gui, dingshi:font, s13, Microsoft YaHei UI Gui, dingshi:Add,Text, , 设置时间: Gui, dingshi:font, s20, Microsoft YaHei UI Gui, dingshi:Add, Edit, vMb_Yue h40 Center, 00 Gui, dingshi:add, Text, x+5, 月 Gui, dingshi:Add, Edit, vMb_Ri x+5 h40 Center, 00 Gui, dingshi:add, Text, x+5, 日 Gui, dingshi:Add, Edit, vMb_Shi x+5 h40 Center, 00 Gui, dingshi:add, Text, x+5, 时 Gui, dingshi:Add, Edit, vMb_Fen x+5 h40 Center, 00 Gui, dingshi:add, Text, x+5, 分 Gui, dingshi:font, s13, Microsoft YaHei UI Gui, dingshi:Add,Text, xm, 输入提醒: Gui, dingshi:font, s20, Microsoft YaHei UI Gui, dingshi:Add,Edit,vMb_Tixing h40 w340 Gui, dingshi:font, s16 Gui, dingshi:Add, Button, x210 y+20 Default h30 g添加, 添加 Gui, dingshi:Add, Button, x+20 h30 g取消, 取消 ; 初始化 DuQu_renwu: IniRead, Mb_JiLu, %A_WorkingDir%\定时提醒.ini, DingShiRenWu If(RegExMatch(Mb_JiLu, ".")) { Loop, Parse, Mb_JiLu, `r`n { RegExMatch(A_LoopField, "^.+(?=\=)", Mb_Key) If(Mb_Key<=A_Now) IniDelete, %A_WorkingDir%\定时提醒.ini, DingShiRenWu, %Mb_Key% } SetTimer, jishi, 1000 Return } Else return 取消: Gui, dingshi:Destroy return 添加: Gui, dingshi:Submit KeyZhi := A_YYYY . Format("{:02}", Mb_Yue) . Format("{:02}", Mb_Ri) . Format("{:02}", Mb_Shi) . Format("{:02}", Mb_Fen) . "00" IniWrite, %Mb_Tixing%, %A_WorkingDir%\定时提醒.ini, DingShiRenWu, %KeyZhi% Gosub DuQu_renwu return TJXRW: ; 显示定时面板,添加新任务 Gui, dingshi:Destroy Gosub dingshiGui GuiControl, dingshi:Text, Mb_Yue, %A_Mm% GuiControl, dingshi:Text, Mb_Ri, %A_DD% GuiControl, dingshi:Text, Mb_Shi, %A_Hour% GuiControl, dingshi:Text, Mb_Fen, %A_Min% GuiControl, dingshi:Text, Mb_Tixing Gui, dingshi:Show return ; 计时 jishi: Loop, Parse, Mb_JiLu, `r`n { RegExMatch(A_LoopField, "^.+(?=\=)", Mb_Key) RegExMatch(A_LoopField, "\=\K.+$", Mb_Tixing) If(Mb_Key=A_Now) SetTimer, renwutixing, -1 } return Allrenwu: Gui, daiban:New ;, +AlwaysOnTop Gui, Font, s16 IniRead, DuQu_Key, %A_WorkingDir%\定时提醒.ini, DingShiRenWu If(RegExMatch(DuQu_Key, ".")) { Key := StrSplit(DuQu_Key, "`n") Dll_key := [] Loop % Key.MaxIndex() { daiban := StrSplit(Key[A_Index], "=") MingMing := "v" . daiban[1] FormatTime, XS_SJ, % daiban[1], MM-dd HH:mm ShiJian := daiban[2] Dll_key.Insert(daiban[1]) Gui, daiban:Add, Checkbox, %MingMing%, %XS_SJ% %ShiJian% } Gui, daiban:Add, Button, h30 Center vDelButton gDelXZ, 删除 Gui, daiban:Show } Else { Gui, daiban:Add, Text, ,>>> 无 任 务 <<< Gui, daiban:Show } Return DelXZ: Loop % Dll_key.MaxIndex() { ControlGet, Dll_key_XH, Checked, , % "Button"A_Index If(Dll_key_XH = 1) IniDelete, %A_WorkingDir%\定时提醒.ini, DingShiRenWu, % Dll_key[A_Index] } Gui, daiban:Destroy Gosub Allrenwu return renwutixing(){ Global MsgBox % Mb_Tixing return } ^F12:: Reload return
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。
评论(0)