[AHK]每个半小时运行一次
2012-12-20 11:37
573 查看
; File encoding: UTF-8
/*
AutoHotkey 版本: 1.1.09.01
操作系统: Windows XP
作者: sunwind <1576157@qq.com>
博客: http://blog.csdn.net/liuyukuan
脚本说明:此为脚本每隔半小时运行一次某动作。
脚本版本: v1.0
Timestamp:2012-12-20 11:40
*/
#Persistent
#SingleInstance,force
start:
TargetTime:= addMinutes(%now%,30)
SplashTextOn,300,, 执行下一次动作时间是:%TargetTime%
Sleep, 3000
SplashTextOff
TimeUntilTarget:=TargetTime
TimeUntilTarget -= %A_Now%, Seconds
If TimeUntilTarget <=0
{
MsgBox The target time is alReady past!
ExitApp
}
TimeUntilTarget *= 1000 ; Convert to milliSeconds.
SetTimer, Timer1, %TimeUntilTarget%
Return
Timer1:
SetTimer, Timer1, off ; i.e. perform this subroutine only once.
; In case you want to be warned before it happens, in case it changes the
; active window or otherwise disrupts what the user is working on:
SplashTextOn,,, %TargetTime%到了,It's about to happen.
Sleep, 3000
SplashTextOff
; And here perform whatever action you wanted scheduled:
; ...
Gosub start
Return
addMinutes(strTime,_minutes=0)
{
strTime+=_Minutes,Minutes
Return strTime
}
/*
AutoHotkey 版本: 1.1.09.01
操作系统: Windows XP
作者: sunwind <1576157@qq.com>
博客: http://blog.csdn.net/liuyukuan
脚本说明:此为脚本每隔半小时运行一次某动作。
脚本版本: v1.0
Timestamp:2012-12-20 11:40
*/
#Persistent
#SingleInstance,force
start:
TargetTime:= addMinutes(%now%,30)
SplashTextOn,300,, 执行下一次动作时间是:%TargetTime%
Sleep, 3000
SplashTextOff
TimeUntilTarget:=TargetTime
TimeUntilTarget -= %A_Now%, Seconds
If TimeUntilTarget <=0
{
MsgBox The target time is alReady past!
ExitApp
}
TimeUntilTarget *= 1000 ; Convert to milliSeconds.
SetTimer, Timer1, %TimeUntilTarget%
Return
Timer1:
SetTimer, Timer1, off ; i.e. perform this subroutine only once.
; In case you want to be warned before it happens, in case it changes the
; active window or otherwise disrupts what the user is working on:
SplashTextOn,,, %TargetTime%到了,It's about to happen.
Sleep, 3000
SplashTextOff
; And here perform whatever action you wanted scheduled:
; ...
Gosub start
Return
addMinutes(strTime,_minutes=0)
{
strTime+=_Minutes,Minutes
Return strTime
}
相关文章推荐
- 写个shell脚本依次运行每个程序半小时
- Outlook 中的错误消息:"没有足够的可用内存来运行该程序。请退出一个或多个程序,然后再试一次"
- 解决使用adb命令提示“通常每个套接字地址(协议/网络地址/端口)只允许使用一次”错误
- 四个线程a,b,c,d. 线程a,b对变量i加一. 线程c,d对变量i减去一.四个线程顺序执行, 每个线程每次只执行一次.i的初始值为0, 打印结果0 1 2 1 0 1 2 1 0 1 2...
- JAVA的一次编译,到处运行,你知道多少?
- Linux - 一次运行多个命令
- 控制代码只运行一次
- 有史以来性价比最高最让人感动的一次数据库&SQL优化(DB & SQL TUNING)——半小时性能提升千倍
- [转]Delphi中,让程序只运行一次的方法
- 通常每个套接字地址(协议/网络地址/端口)只允许使用一次
- SQL TUNING——从近半小时到几十毫秒的一次优化
- Cucumber capybara 每个Scenario登陆一次
- C++第三周任务3请在原类基础上,增加成员函数,要求前三个设计成内置函数,在main()数中增加适当的调用以展示扩充类定义后的功能(最好能一次运行)。
- 趣味数学--用1到9这九个数组成一个四位数乘以一位数等于四位数的等式,每个数只能用一次
- ADF11g-029:如何在每个页面加载之前运行一段java代码
- .net利用程序集的GUID解决程序只能运行一次的问题
- 每个格子只能走有限次 求有多少人可以走出方格 每个人一次最多移动d格
- 通常每个套接字地址(协议/网络地址/端口)只允许使用一次 apache24安装443端口占用
- 有一个排好序的数列,数列中只有一个数只出现1次,其余每个数均出现了两次,设计出一个算法,找出那个只出现了一次的数
- winform 里同一个程序只允许运行一次