0
点赞
收藏
分享

微信扫一扫

[AHK]一键运行/关闭脚本的循环

陆公子521 2023-04-24 阅读 61



;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




举报

相关推荐

0 条评论