无法运行基本示例自动脚本

时间:2019-01-14 17:35:15

标签: autoit

我使用AutoIt编译了以下脚本,并创建了.exe文件。但是,当我运行它时,它不会启动(只需在右下角的屏幕中闪烁一秒钟,然后消失)。知道为什么吗?

脚本示例复制自:AutoIt General Help and Support Forum

#include <IE.au3>

Opt("MouseCoordMode", 2)
Opt("WinTitleMatchMode", 4)

$hWnd = WinGetHandle("AutoIt Script Home Page - Windows Internet Explorer")

;WinWait($hWnd)
;If Not WinActive($hWnd) Then WinActivate($hWnd)
;WinWaitActive($hWnd)

; WINDOW IS NOT ACTIVE!!

sleep(1000)
ControlClick($hWnd, "", "Internet Explorer_Server1", "left", 1, 722, 125) ;;;;Opens The forum

; Does not Work when NOT active!!

;even statusbar only works when active

$status=StatusbarGetText($hWnd)
ConsoleWrite($status&@LF)

0 个答案:

没有答案