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

时间:2016-09-07 14:12:18

标签: autoit

我真的很喜欢编码(比如很新)但我设法用AutoIt做我想做的事。这意味着:在Kiosk模式下在某个网页上自动启动IE。到目前为止一切都很好。

但是在我没有处于自助终端模式之前,输入的输入有效,但现在我找不到问题为什么它不再起作用了。

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

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

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

该网站已启动,我直接在登录框中,但没有输入任何内容。有什么想法吗?

1 个答案:

答案 0 :(得分:1)

就像@Steve在评论中所说,你可以在显示窗口时尝试使用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}")
相关问题