我的宏不会多次运行吗? [英] My macro wont run more than once?

查看:78
本文介绍了我的宏不会多次运行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的宏,因为我对此很陌生.从字面上看是从今天开始.但是我运行了这个宏,它运行了一次,然后停止了.这是为什么?在这里:

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.

推荐答案

您分配的每个热键(不是一行)都需要一个Return.

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

由于您在另一个热键中都有一个定义,因此当您按 q 并退出脚本时,第二个热键esc::exitapp将被执行.

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.

尝试:

q::Send, asdq
Esc::ExitApp

或:

q::
    Send, asdq
Return

Esc::ExitApp

q::
    Loop 
        Send, asdq
Return

Esc:: ExitApp

这篇关于我的宏不会多次运行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆