AutoIT hack hilfe

06/12/2010 22:26 kalipo#1
hi,
ich habe ein 4story mini bot gemacht für mich aber brauche bei einer sache eure hilfe.
Quote:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\Marcel\Desktop\Form1.kxf
$Form1 = GUICreate("4Story Mini Level Bot ", 171, 208, 241, 219)
$Button1 = GUICtrlCreateButton("Start", 16, 8, 137, 49, 0)
$Button2 = GUICtrlCreateButton("Stop", 16, 120, 137, 49, 0)
$Label1 = GUICtrlCreateLabel("Made by Kalipo", 48, 176, 77, 17)
$Label2 = GUICtrlCreateLabel("Attacke 1 auf 3", 40, 64, 77, 17)
$Label3 = GUICtrlCreateLabel("Attacke 2 auf 2", 40, 80, 77, 17)
$Label4 = GUICtrlCreateLabel("HP Trank auf F2", 40, 96, 83, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

EndSwitch
WEnd

Wie Baue ich das untere in Button1 ein?


MouseClick ("left", 857, 617, 2)
Sleep (2000)
While 2
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{F2}")
Sleep (1000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
WEnd Was muss ich in Button2 eingeben damit er alle Befehle Stopt?
:confused:
06/12/2010 22:29 HardCore.1337#2
Alles ab MouseClick bis zu dem sleep in eine Funktion

PHP Code:
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Button1
            Start
()
        Case 
$Button2
            
Exit

    EndSwitch
WEnd

Func Start
()
    
MouseClick ("left"8576172)
    ...
    
sleep(5000)
EndFunc 
06/12/2010 22:46 kalipo#3
jetzt habe ich es so aber wenn ich auf Start klicke beendet es sich
Quote:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\Marcel\Desktop\Form1.kxf
$Form1 = GUICreate("4Story Mini Level Bot ", 171, 208, 241, 219)
$Button1 = GUICtrlCreateButton("Start", 16, 8, 137, 49, 0)
$Button2 = GUICtrlCreateButton("Stop", 16, 120, 137, 49, 0)
$Label1 = GUICtrlCreateLabel("Made by Kalipo", 48, 176, 77, 17)
$Label2 = GUICtrlCreateLabel("Attacke 1 auf 3", 40, 64, 77, 17)
$Label3 = GUICtrlCreateLabel("Attacke 2 auf 2", 40, 80, 77, 17)
$Label4 = GUICtrlCreateLabel("HP Trank auf F2", 40, 96, 83, 17)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
Start(MouseClick ("left", 857, 617, 2)
Sleep (2000)
While 2
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{F2}")
Sleep (1000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
WEnd
Case $Button2
Exit

EndSwitch
WEnd




MouseClick ("left", 857, 617, 2)
Sleep (2000)
While 2
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{F2}")
Sleep (1000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
WEnd
was nun?
06/12/2010 22:48 HardCore.1337#4
Warum hast du es nicht so gemacht wie ich es gesagt habe?
06/12/2010 22:48 kalipo#5
hab ich doch
06/12/2010 22:52 huberhans#6
Quote:
Originally Posted by HardCore.1337 View Post
Warum hast du es nicht so gemacht wie ich es gesagt habe?
Weil's nix bringen würde, weil sobald mit Button1 gestartet würde, es sich mit Button2 nicht mehr beenden lassen würde.
06/12/2010 22:53 kalipo#7
Und was soll ich jetzt machen?
06/12/2010 23:00 huberhans#8
Quote:
Originally Posted by kalipo View Post
Und was soll ich jetzt machen?
This:

PHP Code:
#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\Marcel\Desktop\Form1.kxf
$Form1 GUICreate("4Story Mini Level Bot "171208241219)
$Button1 GUICtrlCreateButton("Start"168137490)
$Button2 GUICtrlCreateButton("Stop"16120137490)
$Label1 GUICtrlCreateLabel("Made by Kalipo"481767717)
$Label2 GUICtrlCreateLabel("Attacke 1 auf 3"40647717)
$Label3 GUICtrlCreateLabel("Attacke 2 auf 2"40807717)
$Label4 GUICtrlCreateLabel("HP Trank auf F2"40968317)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

Global $Bedingung False

While 1
$nMsg 
GUIGetMsg()
Switch 
$nMsg
Case $GUI_EVENT_CLOSE
Exit
Case 
$Button1
$Bedingung 
True
MouseClick 
("left"8576172)
Case 
$Button2
$Bedingung 
False
EndSwitch

If 
$Bedingung True Then Start()

WEnd




Func Start
()
Sleep (2000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
Send ("{F2}")
Sleep (1000)
Send ("{TAB}")
Send ("{3}")
Sleep (1000)
Send ("{2}")
Sleep (20000)
Send ("{z}")
Sleep (5000)
EndFunc 
Allerdings dauert's knapp ne Minute, bis du mit Button2 dein Script wieder anhalten kannst, da die Funktion Start() erstmal durchgearbeitet wird und das dank der vielen Sleep ziemlich lang dauert.
06/12/2010 23:10 kalipo#9
Danke es geht aber nach einer zeit kommt irgend ein fehler den ich nicht lesen konnte weil es sich alles sozfort beendet hat.
Woran kann das liegen?
06/12/2010 23:27 huberhans#10
Quote:
Originally Posted by kalipo View Post
Danke es geht aber nach einer zeit kommt irgend ein fehler den ich nicht lesen konnte weil es sich alles sozfort beendet hat.
Woran kann das liegen?
Versuch mal, das Script aus dem Editor heraus mit F5 zu starten, dann kannst du unten lesen, was der Fehler ist
06/12/2010 23:32 kalipo#11
Ok es ist weg.
Wie kann ich es abspeichern das es nur als Run script startet?
06/12/2010 23:39 huberhans#12
Quote:
Originally Posted by kalipo View Post
Ok es ist weg.
Wie kann ich es abspeichern das es nur als Run script startet?
Als was? Oder meinst du 'ne .exe-Datei draus machen?
06/12/2010 23:40 kalipo#13
Ja als .exe-Datei
06/12/2010 23:43 huberhans#14
Quote:
Originally Posted by kalipo View Post
Ja als .exe-Datei
STRG + F7 im Editor drücken
06/12/2010 23:47 kalipo#15
Dann kommt
Aut2Exe Error
Error:Unalbe to execute upx.exe to compress stub file:
upx: C:\Users\Marcel\Desktop\4story mini BOT.exe IOException: rename error:File exists
was nun