ich schnipple schon länger an einem script rum.
das hat auch bisher immer alles wunderbar geklappt aber jetzt hab ich ne GUI hinzugefügt
und seitdem funktionieren die Hotkeys, die immer funktioniert haben, ohne das ich was an denen geändert hab nicht mehr.
Spoiler anzeigen
[#include <GUIConstants.au3>
[/autoit] [autoit][/autoit] [autoit]#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 353, 177, 192, 121)
$LSplash = GUICtrlCreateLabel("Splash", 24, 32, 44, 17)
$LMana = GUICtrlCreateLabel("Mana", 128, 128, 39, 17)
$LHealth = GUICtrlCreateLabel("Health", 40, 128, 43, 17)
$ISplash = GUICtrlCreateInput("4", 80, 32, 33, 21)
$IMana = GUICtrlCreateInput("5", 184, 128, 33, 21)
$IHealth = GUICtrlCreateInput("3", 88, 128, 33, 21)
$BSetup = GUICtrlCreateButton("Setup Set", 248, 120, 75, 25, 0)
$GSplash = GUICtrlCreateGroup("", 16, 8, 113, 81)
$RSplash = GUICtrlCreateRadio("Splash", 24, 8, 57, 17)
$RFocus = GUICtrlCreateRadio("Focus", 152, 8, 49, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$GFocus = GUICtrlCreateGroup("", 144, 8, 121, 81)
$LFocus = GUICtrlCreateLabel("Focus", 152, 32, 41, 17)
$LMysterious = GUICtrlCreateLabel("Mysterious", 152, 56, 62, 17)
$IFocus = GUICtrlCreateInput("2", 216, 32, 33, 21)
$IMysterious = GUICtrlCreateInput("3", 216, 56, 33, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$GAllgemein = GUICtrlCreateGroup("Allgemein", 16, 104, 225, 57)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
[/autoit] [autoit][/autoit] [autoit]While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
Case $Msg = $BSetup
If $RSplash And BitAND(GUICtrlRead($RSplash), $GUI_CHECKED) = $GUI_CHECKED then
$Funktion = "splash"
$s = GUICtrlRead($ISplash)
$m = GUICtrlRead($IMana)
$h = GUICtrlRead($IHealth)
GUISetState(@SW_HIDE)
ElseIf $RFocus And BitAND(GUICtrlRead($RFocus), $GUI_CHECKED) = $GUI_CHECKED then
$Funktion = "focus"
$f = GUICtrlRead($IFocus)
$my = GUICtrlRead($IMysterious)
$m = GUICtrlRead($IMana)
$h = GUICtrlRead($IHealth)
GUISetState(@SW_HIDE)
Else
MsgBox (0, "Info:", "Nur Autopot wurde gewählt")
$m = GUICtrlRead($IMana)
$h = GUICtrlRead($IHealth)
GUISetState(@SW_HIDE)
EndIf
EndSelect
WEnd
Global $Paused
HotKeySet("+d", "Funktion")
HotKeySet("+s", "Terminate")
While 1
Sleep(100)
WEnd
Func Funktion ()
If $Funktion = "splash" then
Call ("splash")
ElseIf $Funktion = "focus" Then
Call ("focus")
Else
Call ("autopot")
EndIf
EndFunc
Func splash()
$Paused = 1
Call("splash1")
Call("autopot")
EndFunc
Func focus()
$Paused = 1
Call ("focus1")
Call ("autopot")
EndFunc
Func splash1()
Do
Send($s)
Sleep (100)
Until $Paused = 0
EndFunc
Func autopot()
Do
sleep (200)
$tod = PixelGetColor (71, 55)
$mana = PixelGetColor ( 169, 62)
$health = PixelGetColor (150 , 55)
$healthcrit = PixelGetColor (80 , 55)
If $tod <>Dec("AA1122") Then
$Paused = 1
ElseIf $healthcrit <>Dec("AA1122") Then
Send ($h)
ElseIf $mana <> Dec("8899DD") Then
Send ($m)
ElseIF $health <> Dec("AA1122") Then
Send ($h)
EndIF
Until $Paused = 0
EndFunc
Func focus1()
Do
Send($my)
Send($f)
Sleep (2000)
$coord = PixelSearch(100,150,1150,900,0XFE01FE,10,40)
IF Not @error Then
MouseClick ("left", $coord[0],$coord[1])
Send($f)
EndIf
Sleep (2000)
$coord = PixelSearch(100,150,1150,900,0XFE01FE,10,40)
IF Not @error Then
MouseClick ("left", $coord[0],$coord[1])
sleep (100)
MouseClick ("right", $coord[0],$coord[1])
EndIf
Until $Paused = 0
EndFunc
Func Terminate()
$Paused = 0
EndFunc
hat einer eine Idee?
sonstige anregungen sind natürlich auch wilkommen.
Danke schonmal im voraus
Timo264