我正在尝试找到一种方法来制作一个简单的机器人,该机器人可以在最小化窗口中单击 4 个位置,而不必专注于它。这是我到目前为止得到的:
#include <Misc.au3>
Local $hDLL = DllOpen("user32.dll")
While 1
ControlClick ( "Eclipse Flyff", "", "" ,"left" , 1 , 724 , 1067 )
ControlClick ( "Eclipse Flyff", "", "" ,"left" , 1 , 757 , 1067 )
ControlClick ( "Eclipse Flyff", "", "" ,"left" , 1 , 791 , 1067 )
ControlClick ( "Eclipse Flyff", "", "" ,"left" , 1 , 1516 , 1010 )
If _IsPressed("10", $hDLL) Then
ConsoleWrite("_IsPressed - Shift Key was pressed." & @CRLF)
; Wait until key is released.
While _IsPressed("10", $hDLL)
Sleep(250)
WEnd
ConsoleWrite("_IsPressed - Shift Key was released." & @CRLF)
ElseIf _IsPressed("1B", $hDLL) Then
MsgBox(0, "_IsPressed", "The Esc Key was pressed, therefore we will close the application.")
ExitLoop
EndIf
Sleep(250)
WEnd
DllClose($hDLL)
我的问题是它没有做任何事情,我认为它可能会被游戏阻止,但我不确定这在 AutoIt 中是否仍然可行,或者我要求太多,因为这是我第一次使用它。
人们告诉我使用 C#,但我不知道它如何与 post message 一起使用,所以我真的有一个小困境,因为我不想放弃我开始的东西。