Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 15:28

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

Advertisement



3 Gui in einem Script, alle einzelnd schließen?

Discussion on 3 Gui in einem Script, alle einzelnd schließen? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
puzzlr's Avatar
 
elite*gold: 29
Join Date: Nov 2010
Posts: 502
Received Thanks: 127
3 Gui in einem Script, alle einzelnd schließen?

Hallo.
Mein Problem ist oben eigl. schon beschrieben. Ich kriege es hin, dass ich die ersten Beiden einzelnd schließen kann, beim Dritten Harperts jedoch -.-..

Hier der relevante Part :

PHP Code:
#Region ### START Koda GUI section ### Form=
$MainGui GUICreate("Farmer by u_failed"186162193125)
Guiinhalt..
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Updates GUICreate("Check for Updates"652443378132)
    
GuiInhalt
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Koord GUICreate("Koordinaten"148231303219)
GuiInhalt
#EndRegion ### END Koda GUI section ###


While 1
    $aMsg 
GUIGetMsg (True)
        Switch 
$aMsg[0]
            Case 
$GUI_EVENT_CLOSE
                
If ($aMsg[1] == $MainGuiThen
                    ExitLoop
                
ElseIf ($aMsg[1] == $UpdatesThen
                    GUIDelete 
($Updates)
                EndIf
            Case 
$Button1
                GUISetState
(@SW_SHOW$Updates)
                
MsgBox(0"Info""Version: v0.2 | Please check out my thread for updates!"2)
            Case 
$Button2
                MsgBox
(0"Credits""Geschrieben von u_failed aus elitepvpers.com"10)
            Case 
$Button3
            _START
()
            Case 
$Button4
            _Own
()
            EndSwitch
WEnd 
Wie bau ich da jetzt noch ein dass man $Koord mit GUI_EVENT_CLOSE schließen kann?

schönen abend! =D
puzzlr is offline  
Old 12/25/2010, 10:33   #2
 
elite*gold: 0
Join Date: Sep 2010
Posts: 210
Received Thanks: 45
Wink

Besser ist einzelne Switch-Abfragen für jedes GUI zu haben.
Also :
PHP Code:
#Region ### START Koda GUI section ### Form=
$MainGui GUICreate("Farmer by u_failed"186162193125)
Guiinhalt..
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Updates GUICreate("Check for Updates"652443378132)
    
GuiInhalt
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Koord GUICreate("Koordinaten"148231303219)
GuiInhalt
#EndRegion ### END Koda GUI section ###

While 1
    $MainMsg 
GUIGetMsg ($MainGui)
    Switch 
$MainMsg
        
Case $GUI_EVENT_CLOSE 
            
Exit
            ;
deine ganzen weiteren Button Controls etc...
    EndSwitch
    If 
WinExists("Check for Updates"Then
        $UpdateMsg 
GUIGetMsg($Updates)
        Switch 
$UpdateMsg
            
Case $GUI_EVENT_CLOSE 
                GUIDelete
($Updates)
                ;
alles was du eben noch so machen willst
        
EndSwitch
    EndIf
    If 
WinExists("Koordinaten"Then
       $KoordMsg 
GuiGetMsg($Koord)
        Switch 
$KoordMsg
            
Case $GUI_EVENT_CLOSE
                GUIDelete
($Koord)
                ;
alles was du eben noch so machen willst
        
EndSwitch
    EndIf
WEnd 
Lighthex is offline  
Old 12/25/2010, 11:38   #3
 
puzzlr's Avatar
 
elite*gold: 29
Join Date: Nov 2010
Posts: 502
Received Thanks: 127
werd ich gleich mal probieren, danke

edit: funktioniert nicht. jetzt lässt sich keines mehr schließen ;>
puzzlr is offline  
Old 12/25/2010, 11:57   #4
 
elite*gold: 0
Join Date: Mar 2009
Posts: 7,260
Received Thanks: 33,149
Was hat man den davon nur einen kleinen Teil seines Scripts zu posten?
So wie es aussieht würde es sowieso niemand benutzen.

Besser ist auf jeden Fall das:
PHP Code:
#include <GUIConstantsEx.au3>

#Region ### START Koda GUI section ### Form=
$MainGui GUICreate("Farmer by u_failed"186162193125)
;
Guiinhalt...
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Updates GUICreate("Check for Updates"652443378132)
;
GuiInhalt...
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Koord GUICreate("Koordinaten"148231303219)
;
GuiInhalt...
#EndRegion ### END Koda GUI section ###

GUISetState(@SW_SHOW$MainGui)

While 
Sleep(10)
    
$nMsg GUIGetMsg(True)
    If 
$nMsg[1] == $MainGui Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                
Exit
            ;...
        EndSwitch
    ElseIf 
$nMsg[1] == $Updates Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                GUISetState
(@SW_HIDE$Updates)
            ;...
        EndSwitch
    ElseIf 
$nMsg[1] == $Koord Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                GUISetState
(@SW_HIDE$Koord)
            ;...
        EndSwitch
    EndIf
WEnd 
KDeluxe is offline  
Thanks
1 User
Old 12/25/2010, 12:06   #5
 
puzzlr's Avatar
 
elite*gold: 29
Join Date: Nov 2010
Posts: 502
Received Thanks: 127
Quote:
Originally Posted by KillerDeluxe View Post
Was hat man den davon nur einen kleinen Teil seines Scripts zu posten?
So wie es aussieht würde es sowieso niemand benutzen.

Besser ist auf jeden Fall das:
PHP Code:
#include <GUIConstantsEx.au3>

#Region ### START Koda GUI section ### Form=
$MainGui GUICreate("Farmer by u_failed"186162193125)
;
Guiinhalt...
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Updates GUICreate("Check for Updates"652443378132)
;
GuiInhalt...
#EndRegion ### END Koda GUI section ###

#Region ### START Koda GUI section ### Form=
$Koord GUICreate("Koordinaten"148231303219)
;
GuiInhalt...
#EndRegion ### END Koda GUI section ###

GUISetState(@SW_SHOW$MainGui)

While 
Sleep(10)
    
$nMsg GUIGetMsg(True)
    If 
$nMsg[1] == $MainGui Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                
Exit
            ;...
        EndSwitch
    ElseIf 
$nMsg[1] == $Updates Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                GUISetState
(@SW_HIDE$Updates)
            ;...
        EndSwitch
    ElseIf 
$nMsg[1] == $Koord Then
        
Switch $nMsg[0]
            Case 
$GUI_EVENT_CLOSE
                GUISetState
(@SW_HIDE$Koord)
            ;...
        EndSwitch
    EndIf
WEnd 
Danke, funktioniert ..

Was hättest du davon, wenn ich den ganzen Script gepostet hätte? - Richtig. Nichts.
puzzlr is offline  
Reply


Similar Threads Similar Threads
2 GUIs in einem Script, problem...
12/07/2010 - AutoIt - 6 Replies
Ich bins mal wieder^^, hoffe nerve nicht zu sehr^^, aber ihr seit immernoch die beste hilfe. Also möchte das sich nur die erste GUI öffnet und mit klick auf $Start sich die GUI schließt und sich die 2. GUI öffnet. Hab schon etliche seiten durchgeforstet, hab zwar auch viel bsp. gefunden, nur konnte es net auf mein script umsetzen, bekomme immer ein fehler mit der declaration von $Fenster. #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include...
Frage zu einem Etal script
11/11/2010 - Diablo 2 - 10 Replies
Hallo ich verwende wie im Topic geschrieben den ETAL bot bin soweit sehr zu frieden :) Könnte mir einer vieleicht sagen wie ich die "erst join wenn Text geschrieben" abstelle? verwende das NTBaalHelper.ntj Script. um jede Hilfe bin ich sehr dankbar :) function NTMain(){ Include("libs/common/NTCommon.ntl");
[PROBLEM] Script pausieren/schließen
10/03/2010 - AutoIt - 9 Replies
Hey User, ich habe ein kleines Script geschrieben: #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GuiconstantsEx.au3> #include <Misc.au3> #Region ### START Koda GUI section ### Form=C:\Users\Alex\GUI\Form1.kxf $Form1 = GUICreate("Made by 18alex03", 228, 81, 208, 125)
Hilfe bei einem Script
06/25/2010 - AutoIt - 1 Replies
Hallo könnte mir einer netter weise dieses Script: MsgBox(0,"Hallo","Hallo das ist mein neuer 18.1 Crosshair Trainer by me",5) MsgBox(0,"Viel Spass","=)=)=)=)=)=)=)=)=)=)=)=)=)=)=)=) =)=)",2) #RequireAdmin #include <ButtonConstants.au3> #Include <SendMessage.au3> #include <ie.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3>
Alle nicht gebrauchte Programmen schließen?
06/11/2010 - Technical Support - 9 Replies
Hey, wie man der Überschrift schon entnehmen kann brauche ich ein Programm was mir meine Festplatte trotz laufender Programme formatiert, ich möchte den Pc komplett Formatieren das wirklich alles weg ist auch Windows ! Habe keine Recovery Cd aber der ist eh halt und ich will ein anderen Betriebssystem installieren! MfG



All times are GMT +1. The time now is 15: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.