My macro wont run more than once?

半世苍凉 提交于 2019-12-11 05:32:16

问题


I have a simple macro, since i am very new to it. Literally started today. But i run this macro, and it runs once and stops. Why is that? Here it is:

q::
Send asdq
Esc::ExitApp
return

If someone could help me, I would really appreciate it.


回答1:


Each hotkey you assign, that isn't a single line, requires a Return.

Since you have a definition of a Hotkey inside another, your second hotkey esc::exitapp is being executed when you press q and exiting your script.

Try:

q::Send, asdq
Esc::ExitApp

or:

q::
    Send, asdq
Return

Esc::ExitApp

Edit:

q::
    Loop 
        Send, asdq
Return

Esc:: ExitApp


来源:https://stackoverflow.com/questions/39908584/my-macro-wont-run-more-than-once

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!