- 用户定义变量 thing=在这输入你要记录的事 编辑你需要提醒的事件
- 用户定义变量 awoke=2(s) 在这输入多少秒s,分钟m,小时h后提醒
- Set objShell = CreateObject("WScript.Shell")
- x = objShell.SpecialFolders.Item("desktop")
- //↑取得桌面路径
- set fso=CreateObject("Scripting.FileSystemObject")
- const forwriting=2
- const forreading=1
- set myfile=fso.createtextfile(x&"\备忘录.txt")
- //↑写一个TXT到桌面
- myfile.writeline("时间:"&now)
- myfile.writeline("事件:"&thing)
- //↑这两行就是你写进TXT的内容
- myfile.Close
- Lleft=instr(1,awoke,"(")
- Rright=instr(1,awoke,")")
- o=mid(awoke,Lleft+1,Rright-Lleft-1)
- //↑检测沿时单位
- p=mid(awoke,1,Lleft-1)
- //↑检测沿时长度
- 如果表达式 (o="h") 为真,则
- q=3600
- 否则如果(o="m")为真,则
- q=60
- 否则
- q=1
- 条件结束
- t=now
- 标记 检查时间
- 如果表达式 (DateDiff("s",t,now)>=p*q) 为真,则
- //↑比较时间
- 跳转到标记 时间到了
- 条件结束
- 延时50毫秒
- 跳转到标记 检查时间
- 标记 时间到了
- Set myfile=fso.OpenTextFile(x&"\备忘录.txt",ForReading)
- a=myfile.ReadLine
- b=myfile.ReadLine
- //↑读取刚写的内容
- myfile.Close
- 弹出窗口 a&vbCr&b
- //↑把刚读取的显示出来
- RunApp x&"\备忘录.txt"
- //↑运行刚建立的TXT文本