Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 11:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



AutoIt Problem

Discussion on AutoIt Problem within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Dec 2009
Posts: 705
Received Thanks: 312
Exclamation AutoIt Problem

hey community

ich hab ein problem^^
unzwar will ich das senden von F12 an 4story beenden mit einem Stop bzw Aus button also ich will die dauerschlaufe pausieren gar beenden
und wenn ich wieder an drücke wieder starten^^

bloß ich weiß nicht wie deshalb frag ich mal^^


Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>



$Form1 = GUICreate("GE_Bot", 467, 292, 192, 124)
GUICtrlCreateTab(0, 0, 465, 289)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)

$GE_Bot = GUICtrlCreateTabItem("test")
$Button1 = GUICtrlCreateButton("An", 80, 112, 121, 41, 0)
$Button2 = GUICtrlCreateButton("Aus", 240, 112, 121, 41, 0)
$Label1 = GUICtrlCreateLabel("Sendet F12 an das 4Story Fenster so das Aoe mit Skillhack dauerhaft ausgeführt wird.", 32, 176, 409, 17)

$CE = GUICtrlCreateTabItem("CE-Values")
$Values = GUICtrlCreateList("", 8, 24, 449, 253)

$Standard = GUICtrlCreateTabItem("§tandard Hacks")

$Spezial = GUICtrlCreateTabItem("§pezial Hacks")

$Porthack = GUICtrlCreateTabItem("Porthack")

$Skillhack = GUICtrlCreateTabItem("Skillhack")

$Chat = GUICtrlCreateTabItem("Chat Hack")

GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
	
Case $button1
	While 1
      ControlSend("4Story_US", "", "", "{F12}")
  Wend
  
  Case $button2


			EndSwitch
WEnd

mfg volle
v0lle is offline  
Thanks
1 User
Old 05/24/2010, 10:03   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
Quote:
Originally Posted by volle14 View Post
hey community

ich hab ein problem^^
unzwar will ich das senden von F12 an 4story beenden mit einem Stop bzw Aus button also ich will die dauerschlaufe pausieren gar beenden
und wenn ich wieder an drücke wieder starten^^

bloß ich weiß nicht wie deshalb frag ich mal^^




mfg volle
Mach's einfach so:


Gruß
huberhans is offline  
Thanks
2 Users
Old 05/24/2010, 10:38   #3
 
elite*gold: 0
Join Date: Dec 2009
Posts: 705
Received Thanks: 312
nice ^^

thx

hab nur den timer bisschen verändert^^
weil das ja bot für 4story für den skillhack ist

kriegst ein Thanks


mfg volle
v0lle is offline  
Thanks
1 User
Old 05/24/2010, 17:04   #4
 
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
Quote:
Originally Posted by volle14 View Post
nice ^^

thx

hab nur den timer bisschen verändert^^
weil das ja bot für 4story für den skillhack ist

kriegst ein Thanks


mfg volle
Der Timer war ja nur als Beispiel gedacht, damit du das Sleep rausbekommst.
Wenn du nämlich mehrere Funktionen laufen lässt, musst du wissen, daß Sleep immer das ganze Script pausiert, Timer jedoch nicht!

Gruß
huberhans is offline  
Thanks
2 Users
Old 05/25/2010, 10:46   #5
 
Lawnmove's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 388
Received Thanks: 111
@ huberhans

gibts noch ne Alternative um aus ner Sleep While raus zu kommen ?
Finde Timer eher unelegant ^^
Lawnmove is offline  
Old 05/25/2010, 11:30   #6
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Müsste das nicht mit Adlibregister/Adlibunregister gehen?

€dit: Mit dem Adlibgedöns kann man ja nur vorgeben wie oft ne Funktion ausgeführt wird.
Ich hab gedacht das ginge weil man mit Adlibunregister die Funktion dann stoppen könnte.
Aber du willst ja solange senden, bis der Stopbutton gedrückt wird^^

Vllt gehts ja so, ist nur ne Überlegung^^

PHP Code:
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

Global $Check 1

Opt
("GUIOnEventMode"1)

$Form1 GUICreate("GE_Bot"467292192124)
GUICtrlCreateTab(00465289)
GUICtrlSetResizing(-1$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)

$GE_Bot GUICtrlCreateTabItem("test")
$Button1 GUICtrlCreateButton("An"80112121410)
GUICtrlSetOnEvent(-1"_send")
$Button2 GUICtrlCreateButton("Aus"240112121410)
GUICtrlSetOnEvent(-1"_stop")
$Label1 GUICtrlCreateLabel("Sendet F12 an das 4Story Fenster so das Aoe mit Skillhack dauerhaft ausgeführt wird."3217640917)

$CE GUICtrlCreateTabItem("CE-Values")
$Values GUICtrlCreateList(""824449253)

$Standard GUICtrlCreateTabItem("§tandard Hacks")

$Spezial GUICtrlCreateTabItem("§pezial Hacks")

$Porthack GUICtrlCreateTabItem("Porthack")

$Skillhack GUICtrlCreateTabItem("Skillhack")

$Chat GUICtrlCreateTabItem("Chat Hack")

GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)


While 
1
    sleep
(10)
WEnd

Func _send
()
    
$Check 1
    
    
Do
        
ControlSend("4Story_US""""""{F12}")
        
sleep(5)
    While 
$Check 1
EndFunc
    
Func _stop
()
    
$Check 2
EndFunc 
Σternαl. is offline  
Thanks
1 User
Old 05/25/2010, 14:53   #7
 
Lawnmove's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 388
Received Thanks: 111
jo habe mit AdlibRegister auch schon rumgemacht, aber kann inner while nix steuern
aber OnEvent tuts ja auch obwohls mir für an/aus auch zuviel an code ist
Lawnmove is offline  
Old 05/25/2010, 18:08   #8
 
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
Quote:
Originally Posted by Lawnmove View Post
@ huberhans

gibts noch ne Alternative um aus ner Sleep While raus zu kommen ?
Finde Timer eher unelegant ^^
Ich persönlich arbeite halt gern mit Timer, hab damit für meine Bedürfnisse halt bislang immer die besten Ergebnisse erzielt

Gruß
huberhans is offline  
Old 05/25/2010, 20:14   #9
 
Lawnmove's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 388
Received Thanks: 111
Normal schon stimmt wohl, ich arbeite an ne`m extravaganten Spambot der mehrere
Lines zugleich send soll und da haben sich Timer als untauglich erwiesen weil sie zu langsam sind. Wenn ich Timer = nicht 1000 sondern 1 also ms mache, könnt ich einschlafen beim zukucken ^^
Deswegen such ich was anderes.
Sleep While ist schon gut aber ich komme nicht per Button mehr raus wenn sie läuft.
Lawnmove is offline  
Old 05/25/2010, 20:57   #10
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Du hast ja ne Lösung oben in meinem Post.
Σternαl. is offline  
Old 05/25/2010, 22:42   #11
 
elite*gold: 0
Join Date: Nov 2009
Posts: 927
Received Thanks: 1,317
Quote:
Originally Posted by Lawnmove View Post
Normal schon stimmt wohl, ich arbeite an ne`m extravaganten Spambot der mehrere
Lines zugleich send soll und da haben sich Timer als untauglich erwiesen weil sie zu langsam sind. Wenn ich Timer = nicht 1000 sondern 1 also ms mache, könnt ich einschlafen beim zukucken ^^
Deswegen such ich was anderes.
Sleep While ist schon gut aber ich komme nicht per Button mehr raus wenn sie läuft.
Lass mal sehen, eventuell mußt du deine Eingabe-Abfrage (GUIGetMsg) in ne Funktion setzen und in jeder vorhandenen Schleife aufrufen... könnte funktionieren
huberhans is offline  
Old 05/25/2010, 23:10   #12
 
elite*gold: 0
Join Date: Dec 2009
Posts: 22
Received Thanks: 10
man könnte eine bool variable benutzen
falls der aus button gedrückt wird, setzte bool=false
und in der schleife kann man dann eine if-bedingung einfügen
(if bool=false then exitloop)
Tatzuya is offline  
Old 05/26/2010, 00:44   #13
 
Lawnmove's Avatar
 
elite*gold: 0
Join Date: Feb 2010
Posts: 388
Received Thanks: 111
@ FooFightah
Hm funzt nicht wirklich ohne Wend und Until

@ huberhans
Das hier issn kleines "Derivat" vom grossen Bruder ^^
Nur 1 Timer und zwar als Initialzünder ^^

Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Blinker", 380, 145, 394, 139)
$Button1 = GUICtrlCreateButton("On", 32, 32, 49, 33, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Off", 88, 32, 49, 33, $WS_GROUP)
$Button3 = GUICtrlCreateButton("", 144, 16, 210, 100, $WS_GROUP)
GUISetState(@SW_SHOW)

While 1
$msg = GUIGetMsg()

Select
	Case $msg = $Button1
		 MsgBox(0, "BlinkSpammer", "Sequenz beginnt in 5 Sekunden !")
                           GUICtrlSetBkColor($button3, 0x00CF00)
		 $Bli = TimerInit()
             	  _Blink()
	Case $msg = $Button2
                          GUICtrlSetBkColor($button3, 0xFFFFFF)
		_BS()
             Case $msg = $GUI_EVENT_CLOSE
                          _BS()
		Exit
    EndSelect
WEnd

Func _Blink()
	While 1
		Local $sMsg = GUIGetMsg()
		If TimerDiff($Bli) >= 5000 Then
		GUICtrlSetBkColor($button3, 0xFF0000)
		Sleep(2000)
                          GUICtrlSetBkColor($button3, 0x00CF00)
	             Sleep(2000)
		GUICtrlSetBkColor($button3, 0xF100CE)
                          Sleep(2000)
                 	ElseIf $msg = $Button2 Then
                         GUICtrlSetBkColor($button3, 0xFFFFFF)
		_BS()
		EndIf
	WEnd
EndFunc   ;==>_Blink

Func _BS()
	While 1
		Local $sMsg = GUIGetMsg()
		If $sMsg = $GUI_EVENT_CLOSE Then
		   MsgBox(0, "BlinkSpammer", "Blink Spammer wird beendet !")
		   Exit
		ElseIf $sMsg = $Button2 Then
		  GUICtrlSetBkColor($Button3, 0xFF0000)
		  ExitLoop
        EndIf
	WEnd
EndFunc   ;==>_BS

Im Original sind natürlich $`s und $GUICtrlCreateInputs drinne usw.
Aber es geht ja hier um while/sleep.
(Diverses hab ich entfernt wegen der Forum Regeln)
Lawnmove is offline  
Old 05/26/2010, 15:41   #14
 
Σternαl.'s Avatar
 
elite*gold: 20
Join Date: Dec 2009
Posts: 1,850
Received Thanks: 484
Quote:
Originally Posted by Lawnmove View Post
@ FooFightah
Hm funzt nicht wirklich ohne Wend und Until
Oh, hatte do-while von C++ im Kopf.....>_>
Σternαl. is offline  
Thanks
1 User
Old 06/04/2010, 15:34   #15
 
BestOfElite's Avatar
 
elite*gold: 33
Join Date: May 2010
Posts: 3,240
Received Thanks: 1,960
kann mir jmd kurz bei spammer helfen ich kann den nur an amchen aber nicht durch buttonklick aus

PHP Code:
$Write 
While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        case 
$button1
            $write 
0
         
If $Write 0 Then
               $Write 
1
              
ElseIf $Write 1 Then
               $Write 
0
           
EndIf 
       case 
$button2
           $write 
2
        
EndSwitch
        If  
$Write 1  Then
            send 
(GUICtrlRead($input1))
            
send ("{ENTER}")
            
sleep (1000)
        EndIf
            
        
WEnd 
plz help
es geht nur wenn ich kein sleep einbaue das will ich aber net plz help
BestOfElite is offline  
Reply




All times are GMT +1. The time now is 11:54.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.