AutoIt 在 Kiosk 模式下在 IE 中发送命令

AutoIt send command in IE in Kiosk mode

我对编码真的很陌生(就像非常新),但我设法用 AutoIt 完成了我想做的事情。这意味着:在 Kiosk 模式下在某个网页上自动启动 IE。到目前为止一切顺利。

但在我未处于 kiosk 模式之前,发送的输入有效,但现在我找不到为什么它不再有效的问题。

ShellExecuteWait("c:\Program Files\Internet Explorer\iexplore.exe", "-k http://website.com", "")

WinWaitActive("website.com  Login - Internet Explorer","")

Send("login{TAB}password{ENTER}")

网站启动了,我直接进入登录框,但什么也没有输入。有什么想法吗?

正如@Steve 在评论中所说,您可以在显示 window 时尝试使用 ControlFocus,然后发送凭据。

ShellExecuteWait("c:\Program Files\Internet Explorer\iexplore.exe", "-k http://website.com", "")

; store the returned window handle to use it in the ControlFocus call
Local $hWnd = WinWaitActive("website.com  Login - Internet Explorer","")

ControlFocus($hWnd, "", "Edit1")

Send("login{TAB}password{ENTER}")