【发布时间】:2021-08-03 22:47:49
【问题描述】:
我正在尝试打开一个网页并将其保存为一个完整的文件。对于自动热键来说,这应该是一项相对容易的任务。出于某种原因,我的脚本没有将关键事件发送到窗口。这是脚本:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn All, StdOut ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
Run, www.google.com
WinWaitActive firefox.exe
sleep, 4000
ControlSend, ahk_class MozillaWindowClass, ^s
解决这个问题的更好方法是什么?
【问题讨论】:
-
既然您正在等待窗口变为活动状态,那么您使用 ControlSend 而不是常规发送是否有原因?
-
不行还是不行
标签: autohotkey