Register for your free account! | Forgot your password?

You last visited: Today at 09:30

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

Advertisement



Porblem

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

Reply
 
Old   #1

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
Angry Porblem

Hi E*pvp ich habe vor 3 tage mal angefangen mit AutoIT und habe mich mal an meinem eigenen Spammbot versucht .... klappt so weit auch alles aber nun möchte ich 1 Weitern Button hinzufügen
Also das er starten und Stoppen kann
Währe nett von euch wenn mir jemand das so ändern würde das der stop butten auch den bot dan wirklich stopt.
Starten button hat eine funktion aber das mit stop bekomm ich nicht richtig hin


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

#Region ### START Koda GUI section ### Form=c:\users\león\desktop\Übergeordnet\bilder\s.kxf
$Form1_1 = GUICreate("SpammBotV2", 609, 426, 176, 124)
GUICtrlCreateLabel("SpammBotV2 by ®oTTe® from Elitepvpers", 200, 8, 205, 17)
$Button1 = GUICtrlCreateButton("Start", 48, 96, 225, 57)
$Button2 = GUICtrlCreateButton("Stop", 360, 96, 225, 57)
$Pic1 = GUICtrlCreatePic("C:\Users\león\Desktop\ÜberGeordnet\Bilder\pic_6583801_1232969536.bmp", 40, 184, 537, 225)
$Edit = GUICtrlCreateEdit("", 88, 32, 441, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Edit
			Sleep(3000)
			Send("{Enter}")
			Sleep(2000)
			While 1
				Send (GUICtrlRead($Edit))
				Send("{Enter}")
				Sleep (3000)
			WEnd
	EndSwitch
WEnd
Danke schonmal
[-Lee-] is offline  
Old 01/05/2010, 11:43   #2
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
PHP Code:
Global $Pause
HotKeySet 
"{NUMPAD9}""TogglePause" ) ;geht auch eine andere Taste

Func TogglePause 
()
    
$Pause Not $Pause
    
While $Pause
        Sleep 
500 )
    
WEnd
EndFunc 
eXcalibur93 is offline  
Old 01/05/2010, 11:58   #3

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
Ich will ja kein hotkey ich möchte das der button Pause den bot paussirt so wie der button start ihn startet
[-Lee-] is offline  
Old 01/05/2010, 12:11   #4
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
ja dann so:
PHP Code:
$Global $Pause
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=c:\users\león\desktop\Übergeordnet\bilder\s.kxf
$Form1_1 GUICreate("SpammBotV2"609426176124)
GUICtrlCreateLabel("SpammBotV2 by ®oTTe® from Elitepvpers"200820517)
$Button1 GUICtrlCreateButton("Start/Stop"489622557) ;;; Also ich würde dann nur ein Button machenmit 2 wirds kompliziert
$Pic1 
GUICtrlCreatePic("C:\Users\león\Desktop\ÜberGeordnet\Bilder\pic_6583801_1232969536.bmp"40184537225)
$Edit GUICtrlCreateEdit(""883244149)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $Button1 ;hier wird durch den Button die Funktion aufgerufen und das Skript pausiert
            TogglePause
()
        Case 
$GUI_EVENT_CLOSE
            
Exit
        Case 
$Edit
            Sleep
(3000)
            
Send("{Enter}")
            
Sleep(2000)
            While 
1
                Send 
(GUICtrlRead($Edit))
                
Send("{Enter}")
                
Sleep (3000)
            
WEnd
    
EndSwitch
WEnd

Func TogglePause 
()
    
$Pause Not $Pause
    
While $Pause
        Sleep 
500 )
    
WEnd
EndFunc 
eXcalibur93 is offline  
Old 01/05/2010, 12:19   #5

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
Nope geht nicht

Folgende Meldung:

$Glovel $Pause
$Global^ERROR

Error: expected 1 "=" operator in assignment statement
[-Lee-] is offline  
Old 01/05/2010, 12:23   #6
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
ja sry vertippt, des Global is keine Variable, also des $ davor weg
eXcalibur93 is offline  
Old 01/05/2010, 12:35   #7

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
habe ich gemacht ... jetzt hat das zwar nur noch 1 button aber trozdem funzt von dem auch nur die start funktion
[-Lee-] is offline  
Old 01/05/2010, 12:50   #8

 
Kazaaa's Avatar
 
elite*gold: 26
Join Date: Nov 2007
Posts: 32,809
Received Thanks: 12,143
Quote:
Originally Posted by eXcalibur93 View Post
PHP Code:
Func TogglePause ()
    
$Pause Not $Pause
    
While $Pause
        Sleep 
500 )
    
WEnd
EndFunc 
Und dann eben
PHP Code:
Case $Button2
func TogglePause 
() 
Kazaaa is offline  
Old 01/05/2010, 12:53   #9
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
Ah ok^^
eXcalibur93 is offline  
Old 01/05/2010, 12:55   #10

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
hehe sorry ich habe mich damit ech noch nicht lange beschäftigt wo kommt das nun rein?

Könntest den ganze code so posten wie er richtig währe?
[-Lee-] is offline  
Old 01/05/2010, 13:03   #11
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
PHP Code:
Global $Pause
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=c:\users\león\desktop\Übergeordnet\bilder\s.kxf
$Form1_1 GUICreate("SpammBotV2"609426176124)
GUICtrlCreateLabel("SpammBotV2 by ®oTTe® from Elitepvpers"200820517)
$Button1 GUICtrlCreateButton("Start"489622557)
$Button2 GUICtrlCreateButton("Stop"3609622557)
$Pic1 GUICtrlCreatePic("C:\Users\león\Desktop\ÜberGeordnet\Bilder\pic_6583801_1232969536.bmp"40184537225)
$Edit GUICtrlCreateEdit(""883244149)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $Button1 ;hier wird durch den Button die Funktion aufgerufen und das Skript pausiert
            TogglePause
()
        Case 
$Botton2
            TogglePause
()
        Case 
$GUI_EVENT_CLOSE
            
Exit
        Case 
$Edit
            Sleep
(3000)
            
Send("{Enter}")
            
Sleep(2000)
            While 
1
                Send 
(GUICtrlRead($Edit))
                
Send("{Enter}")
                
Sleep (3000)
            
WEnd
    
EndSwitch
WEnd

Func TogglePause 
()
    
$Pause Not $Pause
    
While $Pause
        Sleep 
500 )
    
WEnd
EndFunc 

€geht au net hab ich bemerkt, da wenn man in der While 1 schleife ist, nichts passiert, wenn der button gedrückt wird...
eXcalibur93 is offline  
Thanks
1 User
Old 01/05/2010, 13:08   #12

 
Kazaaa's Avatar
 
elite*gold: 26
Join Date: Nov 2007
Posts: 32,809
Received Thanks: 12,143
Ich schaus mir grad mal an, editier gleich die Lösung

Edit

PHP Code:
Global $Paused
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=c:\users\león\desktop\Übergeordnet\bilder\s.kxf
$Form1_1 GUICreate("SpammBotV2"609426176124)
GUICtrlCreateLabel("SpammBotV2 by ®oTTe® from Elitepvpers"200820517)
$Button1 GUICtrlCreateButton("Start"489622557)
$Button2 GUICtrlCreateButton("Stop"3609622557)
$Pic1 GUICtrlCreatePic("C:\Users\león\Desktop\ÜberGeordnet\Bilder\pic_6583801_1232969536.bmp"40184537225)
$Edit GUICtrlCreateEdit(""883244149)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg 
GUIGetMsg()
    Switch 
$nMsg
        
Case $GUI_EVENT_CLOSE
            
Exit
        Case 
$Edit
            Sleep
(3000)
            
Send("{Enter}")
            
Sleep(2000)
        Case 
$Button1 ;Startfunktion musst noch rein machen
            Sleep
(100)
        Case 
$Button2 ;pausiert dein Skript
            TogglePause
()
        EndSwitch
WEnd


Func TogglePause
()
    
$Paused NOT $Paused
    
While $Paused
        sleep
(100)
    
WEnd
EndFunc 
Edit2: Bei Case $Edit musst noch die restliche Funktion hin schreiben, die hab ich ausversehn gelöscht
Kazaaa is offline  
Thanks
1 User
Old 01/05/2010, 13:13   #13

 
elite*gold: 192
Join Date: Aug 2009
Posts: 5,797
Received Thanks: 3,141
-.- Ahhh würg ich bekomm gleich so ein anfall ich renn kurz gegen eine Wand >.<
Menschens kinder wie zum teufel ging die scheis start funktion oh mein gott

ey sorry wenn ich euch grade nerve aber wie gesagt habe damit keinerlei erfahrung bzw nur wenig
[-Lee-] is offline  
Old 01/05/2010, 13:18   #14

 
Kazaaa's Avatar
 
elite*gold: 26
Join Date: Nov 2007
Posts: 32,809
Received Thanks: 12,143
Achja, ansonsten einfach mal "Tidy" benutzen um Fehler zu finden (einfach STRG+T drücken wenn dein AutoIt-Script (also der Code) offen ist)

Edit: Keine Ahnung was dein Script starten soll, steht ja auch nicht im Anfangspost.
Kazaaa is offline  
Old 01/05/2010, 13:57   #15
 
elite*gold: 0
Join Date: Sep 2009
Posts: 51
Received Thanks: 8
Ich denke es ist eher gemeint, das Skript zu starten, nicht mit dem Skript etwas zu starten
eXcalibur93 is offline  
Reply


Similar Threads Similar Threads
porblem bei HP
08/07/2010 - Metin2 Private Server - 4 Replies
ja hallo hab mir von MaSTeRBosS die HP runtergeladen aber weiß nicht weiter 1. Erstellt eine neue Datenbank, nennt sie m2tool, nicht anders!!!<-wo soll ich eine erstellen?schnall das net 2. Patsch die m2tool.sql in die erstellte Datenbank.<---wie geht das dann? 3. öffnet die mysql.php aus dem ordner Upload/conf und passt dort eure Daten von der Datenbank an.<---is soweit klar^^ 4. Ladet alles was im Upload Ordner ist auf auren Webspace<-verstanden 5. Führt die install.php aus...
GM Porblem <.<
12/05/2009 - Metin2 Private Server - 2 Replies
Hey E-Pvpers, Ich hab nen Hamachi P - Server aber ich krieg das mit dem GM Werden nicht hin. Hab alles wie im tut gemacht.. Hier Screens von gmlist und gmhost! // Neben bei kann mir einer sagen wie ich das mit den portmaps hinbekomm? <.<
Porblem..
11/21/2009 - World of Warcraft - 2 Replies
Hallo com ich möchte wow von 3.1.3 aufpatchen auf 3.2.0 aber da steht die datei pass.dll oder so konnte nicht geöffnet werden....repairt hab ichs auch schon 5 mal.... help=$
A Porblem...:((
01/30/2008 - Conquer Online 2 - 4 Replies
i have a problem whit my sound in game (jumping sound) after a few seconds before I log on my jumping sound is gone. Do somebody know haw to fix that ?



All times are GMT +1. The time now is 09:30.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.