Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 01:24

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

Advertisement



[HILFE] Beenden geht nicht...

Discussion on [HILFE] Beenden geht nicht... within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
surorek5's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 161
Received Thanks: 16
[HILFE] Beenden geht nicht...

Nochmal eine Frage und guten Tag,

Heute habe ich die Frage, wie ich bei meinem Code:

machen kann, dass sich bei einem Klick in der GUI auf das rote Kreuz, die GUI wieder versteckt. Also Prinzipiell: GUISetState(@SW_HIDE, $gui1)

Bräuchte da Hilfe, da es entweder, gar keine Funktion auslöst, oder durch den Loop immer die GUI sofort versteckt, satt sie anzuzeigen.

LG und bitte um schnelle Hilfe

PS: Bitte mit Erklärung, will ja etwas lernen
surorek5 is offline  
Old 05/15/2014, 16:11   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Code:
Opt("TrayMenuMode", 8 & 1)
Das wäre 81, nicht 9.

Du fügst noch folgendes oben hinzu
Code:
Opt("GUIOnEventMode", 1)
Und weiter unten
Code:
GUISetOnEvent($gui1, "_HideMainWindow")

Func _HideMainWindow()
    GUISetState(@SW_HIDE, $gui1)
Endfunc
alpines is offline  
Thanks
1 User
Old 05/15/2014, 16:49   #3
 
surorek5's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 161
Received Thanks: 16
Falls du es so meinst, geht es leider nicht...

PHP Code:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <StaticConstants.au3>
#include <GDIPlus.au3>
#include <ComboConstants.au3>
 #include <GuiMenu.au3>

Opt("TrayMenuMode"81)
Opt("GUIOnEventMode"1)

Local $oeffnen TrayCreateItem("Öffnen")
Local $beenden TrayCreateItem("Beenden")

TraySetState()


$gui1 GUICreate ("Schnellstarter"200200)
$hItem2 _GUICtrlMenu_CreateMenu()
_GUICtrlMenu_InsertMenuItem($hItem20"Programme hinzufügen"0x2000)
_GUICtrlMenu_InsertMenuItem($hItem21"Einstellungen"0x2001)














While 
1
    Local $msg 
TrayGetMsg()
    
Select
    
Case $msg 0
            ContinueLoop
        
Case $msg $oeffnen
            GUISetState
(@SW_SHOW$gui1)
         Case 
$msg $beenden
            ExitLoop
         EndSelect
WEnd


GUISetOnEvent
($gui1"_HideMainWindow")
Func _HideMainWindow()
    
GUISetState(@SW_HIDE$gui1)
Endfunc


Exit 
surorek5 is offline  
Old 05/15/2014, 17:43   #4
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
LOL, das ist nicht dein Ernst oder?
Code:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <String.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>
#include <GDIPlus.au3>
#include <WinAPI.au3>
#include <StaticConstants.au3>
#include <GDIPlus.au3>
#include <ComboConstants.au3>
 #include <GuiMenu.au3>

Opt("TrayMenuMode", 81)
Opt("GUIOnEventMode", 1)

Local $oeffnen = TrayCreateItem("Öffnen")
Local $beenden = TrayCreateItem("Beenden")

TraySetState()


$gui1 = GUICreate ("Schnellstarter", 200, 200)
GUISetOnEvent(-3, "_HideMainWindow")
$hItem2 = _GUICtrlMenu_CreateMenu()
_GUICtrlMenu_InsertMenuItem($hItem2, 0, "Programme hinzufügen", 0x2000)
_GUICtrlMenu_InsertMenuItem($hItem2, 1, "Einstellungen", 0x2001)

While 1
    Local $msg = TrayGetMsg()
    Select
    Case $msg = 0
            ContinueLoop
        Case $msg = $oeffnen
            GUISetState(@SW_SHOW, $gui1)
         Case $msg = $beenden
            ExitLoop
         EndSelect
WEnd


Func _HideMainWindow()
    GUISetState(@SW_HIDE, $gui1)
Endfunc
Das 81 ist immer noch falsch.
alpines is offline  
Thanks
1 User
Old 05/15/2014, 19:21   #5
 
surorek5's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 161
Received Thanks: 16
Ist mir egal xD
Hauptsache es funktioniert, und es bringt seine Leistung !

#Edit:

Ich bin ein kompletter Neuling im Proggen, deshalb ist der Code auch so schlecht.
trotzdem Danke, es funtkioniert jetzt.
und wegen der 8 & 1, kommt daher, dass ich im TrayMenu die normelen ausblenden wollte, und eigene dahaben will-
surorek5 is offline  
Old 05/15/2014, 22:32   #6
 
butter123's Avatar
 
elite*gold: 95
Join Date: May 2011
Posts: 982
Received Thanks: 189
du musst die nummern addieren, nicht hintereinander schreiben...
falls es mit 81 richtig läuft, wäre das zufall
butter123 is offline  
Old 05/15/2014, 23:37   #7
 
surorek5's Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 161
Received Thanks: 16
aber 8 & 1 geht doch auc statt 8 + 1 oder?
surorek5 is offline  
Old 05/16/2014, 00:22   #8
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
Quote:
Originally Posted by surorek5 View Post
aber 8 & 1 geht doch auc statt 8 + 1 oder?
Code:
8&1 == 81 != 9 == 8+1
lolkop is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[Hilfe]Schnelle hilfe! Dyndns Hp geht nicht trotz korrekter eingabe
03/20/2011 - Metin2 Private Server - 6 Replies
Tag zusammen Also ich habe folgendes problem 1. Bin ich um 3 Uhr abendds ( 2:50) noch immer Wach und prepariere meinen Server und 2. Meine Homepage geht nicht! Also Stand sieht wie folgt aus bei der Portfreigabe in meiner Fritzbox 7270 Fon Wlan
[HILFE]Sony Vegas geht durch Internetsicherheitsstufe nicht auf !!! HILFE
11/08/2010 - Video Art - 0 Replies
Also hab einen problem !! Ihc habe mir gerade Sony Vegas 10.0 Gedownloadet es will nicht aufgehen Ich öffne es Dann kommt sone regiseite Muss auf Weiter drücken (Admin rechte) Drücke auf weiter dann kommt der Text, dass ich nicht aufmachen kann wegen internetsicherheit also wenn mir jemand helfen kann !! bitte Kriegt auch 100000 THXsss Pls help mee



All times are GMT +1. The time now is 01:24.


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.