如果AutoHotKey的ControlSend函数无法发送输入,请尝试以下解决方法:
代码示例:
ControlFocus, Edit1, MyWindow ; 设置焦点到名为Edit1的控件上
ControlSend, Edit1, Hello, MyWindow ; 发送Hello到Edit1控件
代码示例:
SetControlDelay, 50 ; 设置延迟时间为50毫秒
ControlSend, Edit1, Hello, MyWindow ; 发送Hello到Edit1控件
代码示例:
SetTitleMatchMode, 2 ; 设置窗口标题的匹配模式为部分匹配
ControlSend, Edit1, Hello, MyWindow ; 发送Hello到Edit1控件
请根据您的实际情况选择并尝试上述解决方法。如果问题仍然存在,请确保目标窗口或控件的标识符、标题和类名等信息正确,并检查AutoHotKey的版本和配置。