[办公][脚本管理]一键运行和关闭脚本的循环

一键运行和关闭脚本的循环

最少的劳动产生最大的效益,一直是我等懒人毕生追求的信念,一键运行和关闭是一个特殊的例子,也是一个思路,非常感谢liuyukuan的分享,我转载过来,仅供大家参考!谢谢!

;Toggle: Press once to activate, press again to turn it off






#maxThreadsPerHotkey, 2
setKeyDelay, 50, 50
setMouseDelay, 50
banana:=0


$f1::
	; banana:=!banana .... This assigns banana to the value of NOT (!) banana. so lets
	; say banana starts out FALSE (0). you then turn banana to NOT FALSE. which is
	; TRUE (1). so now banana is set to TRUE. and then lets say you toggle it again.
	; you set banana to NOT TRUE, which is FALSE. banana is now set to FALSE. 
	; .... 1 is true, 0 is false. ! is NOT.
	banana:=!banana
	
	while (banana=1)
	{
		send, hello{space}
		sleep, 100
	}
return

 

亲爱的朋友们,如果你认为本站不错请打赏,我们非常感谢你的支持!

[su_button url=”http://www.autoahk.com/buyamoney” style=”3d” color=”#ffe41c” size=”20″ radius=”round”]赏[/su_button]



给TA捐赠
共{{data.count}}人
人已捐赠
其他案例

[办公][Excel]Excel简单一键求和 Autohotkey

2017-3-14 14:57:36

其他

[对象]利用Shell.Application对象批量改名

2017-4-10 16:16:32

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索