Quote:
Originally Posted by Deverixz
Setz mal unter dem Case eine MessageBox in folgendem Format:
MsgBox(0, "", $PicInput & ".jpg")
Drück drauf und nenn mir mal das Ergebnis ;P
Vielleicht wäre der ganze Code auch hilfreich ;p
//Wenn der Button $GO heisst, warum nennst du dann beim Case den Button $Button1 ?
Vielleicht liegts daran?
|
Ouh man, das mir gerade voll peinlich. Das war so, das ich einen teil von dem Code herausnahm und ihn umschrieb aber vergaß das mein Button $GO hieß. Ich probier es eben mal.
Edit: Raus kommt: "12.jpg"
Code:
#RequireAdmin
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\Sarah-Acer-7736ZG\Desktop\Shaiya Level Bot\Form1.kxf
$Form1_1 = GUICreate("Shaiya Level Bot", 653, 263, 194, 118)
$Label2 = GUICtrlCreateLabel("Settings:", 288, 0, 134, 46)
GUICtrlSetFont(-1, 26, 400, 0, "Myriad Hebrew")
$Label3 = GUICtrlCreateLabel("Time before attack (milliseconds):", 288, 56, 161, 17)
$Input1 = GUICtrlCreateInput("2000", 296, 72, 121, 21)
$Label4 = GUICtrlCreateLabel("Time after every attack (milliseconds):", 288, 104, 181, 17)
$Input2 = GUICtrlCreateInput("2000", 296, 120, 121, 21)
$Label5 = GUICtrlCreateLabel("Time after every pick up ", 288, 160, 121, 17)
$Input3 = GUICtrlCreateInput("2000", 296, 184, 121, 21)
$Label6 = GUICtrlCreateLabel("Time before start to pick up", 288, 216, 133, 17)
$Input4 = GUICtrlCreateInput("2000", 296, 232, 121, 21)
$PicInput = GUICtrlCreateInput("", 16, 56, 121, 21)
$Label1 = GUICtrlCreateLabel("Picturename:", 32, 32, 66, 17)
$GO = GUICtrlCreateButton("GO", 40, 88, 75, 25)
$Pic1 = GUICtrlCreatePic($PicInput, 16, 136, 196, 116)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ####
HotKeySet("{F1}","starten")
HotKeySet("{F2}","pausieren")
HotKeySet("{F3}","beenden")
;While 1 ; ausgeklammert, da ansonsten der Button nicht funktioniert
; Sleep(100) ; ich weiß auch das es mit ce und cs geht
;WEnd
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $GO
MsgBox(0, "", $PicInput & ".jpg")
EndSwitch
WEnd
Ich habe die Hotkeys eingeführt, da man erst im Spiel den Bot starten muss, und Controlsend nicht funktioniert bei dem Spiel da es sich immer freezet wenn man nicht gerade selber am spielen ist. Die While Schleife bevor das mit dem Case kommt, habe ich eingeführt weil vorher das Programm ohne Buttons bestand.