Register for your free account! | Forgot your password?

You last visited: Today at 18:28

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

Advertisement



Hilfe!

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

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2016
Posts: 29
Received Thanks: 2
Hilfe!

Mein Problem ist das sobald ich start drücke es läuft aber wenn ich den stop button klicke es sich nicht schließt geschweige denn aufhört!
Könnte mir jemand sagen was ich falsch mache habe schon mit exitloop rum probiert aber nichts hinbekommen .


Code:

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Blablablabla", 309, 216, 192, 124)
$Start = GUICtrlCreateButton("Start", 24, 16, 145, 73)
$Stop = GUICtrlCreateButton("Stop", 24, 96, 145, 73)
GUISetState(@SW_SHOW)
Main()
#EndRegion ### END Koda GUI section ###

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

Case $Start
Start()

Case $Stop
Ende()

EndSwitch
WEnd
EndFunc

Func Start()
While 1
Sleep(6000)
Send("j")
Sleep(1000)
send("p")
WEnd
EndFunc



Func Ende()
Exit
EndFunc
Pinki1306 is offline  
Old 12/01/2018, 21:32   #2

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
Das was du als Main-Methode bezeichnest ist die Schleife für die GUI. Da wird quasi in einer Endlosschleife geprüft, ob es irgendwelche Events in der GUI gab (sowas wie ein Button-klick oder sonst was). Wenn du jetzt Start drückst, befindest du dich in der Endlosschleife von der Start-Funktion und achtest quasi gar nicht mehr auf GUI Events. Eine Lösung wäre einfach HotKeySet zu benutzen, um Funktionen aufzurufen, oder den onEvent mode für GUIs zu verwenden:
Moneypulation is offline  
Thanks
1 User
Old 12/02/2018, 00:08   #3
 
elite*gold: 0
Join Date: Jan 2016
Posts: 29
Received Thanks: 2
Danke werde mich gleich mich gleich mal weiter rein lesen
Pinki1306 is offline  
Reply


Similar Threads Similar Threads
HILFE HILFE HILFE HILFE HILFE
04/28/2011 - Metin2 Private Server - 2 Replies
Hallo, Uns zwar ich habe Server Files von ComputerCrank v2. Und ich will main_quest_lv1.gotoinfomation ändern irgend wie fand ich sie nicht :( Kennt wer sich gut aus beim Computercrank v2 Server Files bitte hilft mir!. Danke.
HILFE ICH BRAUCHE HILFE HILFE HILFE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!
01/13/2011 - Wolfteam - 32 Replies
HI ICH STELLE GLEICH MAL EIN SCREENHOT REIN UND DANN SAGT IHR BITTE SCHÖN WAS LOS IST :(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:( GEHACKT´WORDEN?? 130K IN EINER MINUTE ZU 54GOLD RANK VON SERGERANT MAJOR AUF RECRUIT EDIT: JETZT WURDE ICH AUCH NOCH GEBANNT WAS DAS WO KANN ICH MICH MELDEN??? :( ITE HEKFT MIR
Hilfe PLs hilfe PLS hilfe PLS hilfe
06/26/2010 - Metin2 Private Server - 4 Replies
Hey epvp, ich weis falsche section aber bevor ihr reported schreibt beantwortet mein frage un die wäre: Wie mach ich ein dshini wunschlink banner damit ich in mein sig mache? sowie die anderen die haben auch so ein banner in signatur ich finde in dshini.net nicht wie man so eins macht
HILFE HILFE HILFE HILFE
04/06/2010 - Metin2 Private Server - 11 Replies
#close



All times are GMT +1. The time now is 18:29.


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.