-1

只是尝试使用 ControlSend 但程序仍然不情愿。现在我找到了主句柄,但我仍然不知道如何正确编写它。有助于获得赞赏。

;   Process: System.Diagnostics.Process (javaw)
;   Process ID: 4752
;   Handle Count: 430
;   Responding: Yes
;   Title: ?ok???O?
;                                               <= Looks stange but this is the title.
;   ?
;   Main Handle: 1115426


$mainHanlde = ""

While 1
   ControlClick("", "", $mainHanlde,"{Down}")
   Sleep(900)
   ControlClick("", "", $mainHanlde,"{Down}")
   Sleep(900)
   ControlClick("", "", $mainHanlde,"{Down}")
   Sleep(900)
   ControlClick("", "", $mainHanlde,"a")
   Sleep(Random(750, 2000, 1))
   ControlClick("", "", $mainHanlde,"a")
   Sleep(Random(750, 2000, 1))
   ControlClick("", "", $mainHanlde,"a")
   Sleep(Random(750, 2000, 1))
   ControlClick("", "", $mainHanlde,"a")
   Sleep(3000)
WEnd
4

2 回答 2

1

首先你需要把手。$handle = WinGetHandle("[ACTIVE]")单击应用程序时,您可以在 Sleep(999) 后获取它。请注意,句柄可以随着每个程序运行而改变。

然后你尝试用 确认它WinFlash($handle)。或者将 WinGetTitle(...) 的结果写入您的控制台。

最后你将它与 Control-Functions 一起使用ControlSend($handle, Default, "", "{Down}")......

这三个简单的步骤可以帮助我完成我的应用程序。

于 2013-02-25T13:53:04.877 回答
0

You can try to use the title and text and leave the id blank. That should work.

于 2013-02-21T21:43:38.283 回答