Ich habe Probleme, ein Objekt (in Form eines assoziativen Arrays) in eine Methode zu übergeben, um auf einen Pixelspeicherort zu klicken. Die Informationen sollten in der Lage sein, das Format mit Zitaten value = arrayName[Key]
Assoziative Arrays in AHK, die Informationen nicht korrekt an Methoden übergeben
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
CoordMode Mouse Screen
;This Area is for defining any object nessesary to interact with the game
;
;
BACKPACK_28 := {UPPER_BOUND: 964, LOWER_BOUND: 995, LEFT_BOUND: 1569, RIGHT_BOUND: 1600, MENU_KEY: "esc"}
;
;
;Ends Game Object section
^l::
select(BACKPACK_28, true)
return
select(balls, switchMenus){
if(switchMenus==true){
SendInput {object[MENU_KEY]}
}
Random, y , balls[LOWER_BOUND], balls[UPPER_BOUND]
Random, x , balls[LEFT_BOUND], balls[RIGHT_BOUND]
Click, x, y
}
+ eine große Antwort. – 2501