Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 05:58

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

Advertisement



AutoIt Aufgabe für Button

Discussion on AutoIt Aufgabe für Button within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Nonilol's Avatar
 
elite*gold: 10
Join Date: Dec 2009
Posts: 1,770
Received Thanks: 315
Question AutoIt Aufgabe für Button

Ich habe gestern zum erstenmal mit Autoit gearbeitet
(naja eher rumgespielt^^)

Und mir tat sich gleich ein Problem auf:

Wie bekomme ich dass hin, wenn ich auf einen Button klicke / oder einen Menüpunkt, dass AutoIt dann eine Aufgabe ausführt?

Code:
GuiCtrlCreateButton("Update", 20, 460, 100, 30)
Wie bekomme ich es hin, dass mir AutoIt beim draufklicken dann folgendes ausführt?:

Code:
HotKeySet ( "{Numpad6}" , "Start" )
HotKeySet ( "{Numpad7}" , "Ende" )

WinFlash ( "Deine Mutter" [,"FLASH" [,flashes [,77]]])


While (1)
Sleep(0)
WEnd

Func Start ()
While(1)
Send ("{y}")
WEnd
EndFunc

Func Ende()
Exit
EndFunc

Also entweder einen neuen Script öffnet, indem letzteres enthalten ist, oder wie binde ich das in den gleichen script ein?


Hoffentlich könnt ihr mir helfen, versucht es bitte möglichst verständlich zu erklären, bin in diesem Thema noch ein Newbie^^
Nonilol is offline  
Old 07/29/2010, 01:03   #2
 
xmanix's Avatar
 
elite*gold: 10
Join Date: May 2008
Posts: 340
Received Thanks: 306
du musst in mit einer schleife
immer die ereignisse abfragen die windows sendet und wenn z.b. der button gedrückt wird und darauf reagieren

also
Code:
While 1
        Switch GUIGetMsg()   'Nachricht abfragen
            Case $button1       'falls button1 gedrückt darauf reagieren und deinen code ausführen[COLOR=Red]
HotKeySet ( "{Numpad6}" , "Start" )
HotKeySet ( "{Numpad7}" , "Ende" )

WinFlash ( "Deine Mutter" [,"FLASH" [,flashes [,77]]])[/COLOR] [COLOR=Red]

While (1)[/COLOR]  [COLOR=Red]
Sleep(0)
WEnd[/COLOR]
        EndSwitch
    WEnd
und wenn du den button erstellt solltest du auch das handle abschpeichern sonst existiert der button zwar aber du kannst nicht darauf zugreifen

Code:
[COLOR=Red]$button1 =[/COLOR] GuiCtrlCreateButton("Update", 20, 460, 100, 30)
xmanix is offline  
Thanks
1 User
Old 07/29/2010, 09:45   #3
 
Nonilol's Avatar
 
elite*gold: 10
Join Date: Dec 2009
Posts: 1,770
Received Thanks: 315
Okay, vielen Dank!!!!!!
Nonilol is offline  
Old 07/29/2010, 11:00   #4
 
bladerofdarknes's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 1,524
Received Thanks: 285
Naja ich hab da etwas unsaubere entdeckt:

Code:
While 1
        $nMsg = GUIGetMsg()   //Nachricht abfragen
        Switch $nMsg             
		Case $GUI_EVENT_CLOSE// wird benötigt um das gui per X (rechts oben) zu schließen 
			Exit
            Case $button1       //falls button1 gedrückt darauf reagieren und deinen code ausführen
ShellExecute("www.elitepvpers.com") //Niemals hotkeys in eine schleife
//ebensowenig Func befehle rein, die macht man zu beginn oder zwischen gui und dieser schleife

WinFlash ( "Deine Mutter" [,"FLASH" [,flashes [,77]]]) 


        EndSwitch
    WEnd
bladerofdarknes is offline  
Reply

Tags
autoit, bot, button, pic, script


Similar Threads Similar Threads
autoit der button entpackt keine au3 datei
05/21/2013 - AutoIt - 20 Replies
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("mein levelbot mit moblock", 800, 600, 500, 200) $Button1 = GUICtrlCreateButton("pickupbot", -20, 112, 187, 81, 0) $Button2 = GUICtrlCreateButton("Mein einlog und relog bot :top:", -28, 0, 619, 113, 0) $Button3 = GUICtrlCreateButton("autoschlagbot", 164, 112, 187, 81, 0)
AutoIt Script in Button einbauen?
06/09/2010 - AutoIt - 5 Replies
Hey, nach langer Zeit wollt ich wieder mit AutoIt hantieren hab aber leider keine Ahnung mehr wie ich z.B. nen RunScript in nen Button einbaue. bitte um Hilfe! >_< Froce
GUI Button function w/ autoit
01/02/2009 - Conquer Online 2 - 12 Replies
kk im a newbie at makin bots but heres the code i have now... okay im a TOTAL newb at making stuff with autoit, so far i can only make simple things with clicking and what not...but i ran into a problem today. my bot creates a gui that instructs you on how to use the bot, what i need help with is how to create a hotkey that "Starts" the bot(the opposite of the exiting hotkey) HotKeySet("^!x", "QuitProg") Func QuitProg() Exit EndFunc thats the exit hotkey that i got, but i was wondering...
AutoIt Button
04/17/2008 - General Coding - 1 Replies
Hi, ich habe mir mal nen pickup bot erstellt mit nem button der funct aber ich möchte noch ein button hinzufügen für AutoSend und Fish Bot Und so habe ich mein erster Butto erstellt aber ich gebe genau das gleiche ein aber es kommt kein 2 button warumP? Und ich möchte halt noch nen buton erstellen das der pick up ausgeht wie geht das?? ------------------------------------------------ #include <GUIConstants.au3> GUICreate("AmelieMaus Hack")



All times are GMT +1. The time now is 05:59.


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.