Gui in Gui

  • Hier Wollte ich dem button Weiter die Funktion Geben das er das nächste Gui Beinhaltet leider macht Das Skript nich was ich will
    Es wird mir immer eine Fehlermeldung in der Funktion angezeigt die ich dort erstellt habe die Funktionen haben keine Fehler

    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <GuiButton.au3>
    #include <TestSkript.au3>
    #include <Forms\Start.isf>
    ;*****************************************
    ;Tsuminer.au3 by Felix
    ;Erstellt mit ISN AutoIt Studio v. 0.8 BETA
    ;*****************************************
    #include <Function.au3>
    $Start = GUICreate("Startbildschirm",452,196,-1,-1,-1,-1)
    $BGimage = GUICtrlCreatePic("C:\Users\Felix\Documents\ISN AutoIt Studio\Projects\Tsuminer\Images\Unbenannt-1.jpg",0,0,452,196,67108864)
    guictrlsetstate(-1,$GUI_DISABLE)
    GUICtrlCreateLabel("Willkommen by TsuKey"&@crlf&""&@crlf&"Key = Hotkey Tsu = Tsurata"&@crlf&""&@crlf&"Webseite : http://www.sf19012.de/Tsukey"&@crlf&""&@crlf&"Version : (None)"&@crlf&""&@crlf&"Skype : sf19012",10,11,307,197,-1,-1)
    GUICtrlSetFont(-1,13,700,2,"Klavika Bold Caps")
    GUICtrlSetColor(-1,"0xFF8000")
    GUICtrlSetBkColor(-1,"-2")
    $Weiter = GUICtrlCreateButton("Weiter",330,20,100,30,-1,-1)
    GUICtrlSetState(-1,16)
    $Webseite = GUICtrlCreateButton("Besuchen",330,80,100,30,-1,-1)
    GUISetState(@SW_SHOW,$Start)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Webseite
    Webseite()
    Case $Weiter ; Hier Beginnt der Case Wo das Programm drinnen ist Was gestartet werden soll

    $Startx = GUICreate("Tsukey",684,249,-1,-1,-1,-1)
    $BGimage = GUICtrlCreatePic("C:\Users\Felix\Desktop\Autoit\Projects\Tsuminer\Images\minecraft_wallpaper_1_by_andrey_s-d32xbih.jpg",0,0,684,249,67108864)
    guictrlsetstate(-3,$GUI_DISABLE)
    $Starten = GUICtrlCreateButton("Starte Program",110,80,191,30,-1,-1)
    $Webseite = GUICtrlCreateButton("Webseite",520,140,100,30,-1,-1)
    $Close = GUICtrlCreateButton("Close",360,140,97,30,-1,-1)
    $Hilfe = GUICtrlCreateButton("",200,140,100,30,-1,-1)
    GUISetState(@SW_SHOW,$Startx)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Starten
    #region Info ; Informations Befehle
    ;Hotkeyset ("h{Pause}","Help")
    Hotkeyset ("^a","Afk")
    HotKeySet ("^i","Info") ;XX
    #endregion
    #region Money ;Befehle Money
    Hotkeyset ("^m","Money")
    Hotkeyset ("!m","MoneyPay")
    Hotkeyset ("^!m","Moneytop")
    #endregion
    #region Bestrafung
    HotKeySet ("^z","Ban")
    HotKeySet ("^u","Unban")
    Hotkeyset ("^i","Mute")
    Hotkeyset ("^o","Kick")
    #endregion
    #region Warp ; Teleportations Befehle
    Hotkeyset ("","Warp")
    HotKeySet ("","SetWarp")
    HotKeySet ("","DelWarp")
    HotKeySet ("","Spawn")
    HotKeySet ("","Tp")
    HotKeySet ("+h","Home")
    HotKeySet ("+^h","SetHome")

    #endregion
    #region Run ; Auto Run ()
    HotKeySet ("","Down")
    HotKeySet ("","Up")
    #endregion
    #region Cheat
    HotKeySet ("+{up}","TimeD")
    HotKeySet ("^{up}","TimeN")
    HotKeySet ("!{up}","items")
    HotKeySet ("#{up}","God")
    HotKeySet ("^!{up}","Killall")
    #endregion
    #region Towny ; Erst mal nicht einsatz Bereit auf Bauen
    HotKeySet ("","Town")
    HotKeySet ("","Townlist")
    HotKeySet ("","TownOn")
    HotKeySet ("","Townadd")
    #endregion


    Case $Webseite
    ShellExecute ("")
    Case $Close
    Exit
    Case $Hilfe


    EndSwitch


    WEnd

    [/autoit][autoit][/autoit][autoit]

    EndSwitch
    WEnd

    [/autoit]
  • Hab es jetzt zwar nicht getestet. Aber schau mal, ob es so funktioniert.

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Include <GuiButton.au3>
    #include <TestSkript.au3>
    #include <Forms\Start.isf>
    ;*****************************************
    ;Tsuminer.au3 by Felix
    ;Erstellt mit ISN AutoIt Studio v. 0.8 BETA
    ;*****************************************
    #include <Function.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $aMsg

    [/autoit] [autoit][/autoit] [autoit]

    $Start = GUICreate("Startbildschirm",452,196,-1,-1,-1,-1)
    $BGimage = GUICtrlCreatePic("C:\Users\Felix\Documents\ISN AutoIt Studio\Projects\Tsuminer\Images\Unbenannt-1.jpg",0,0,452,196,67108864)
    guictrlsetstate(-1,$GUI_DISABLE)
    GUICtrlCreateLabel("Willkommen by TsuKey"&@crlf&""&@crlf&"Key = Hotkey Tsu = Tsurata"&@crlf&""&@crlf&"Webseite : http://www.sf19012.de/Tsukey"&@crlf&""&@crlf&"Version : (None)"&@crlf&""&@crlf&"Skype : sf19012",10,11,307,197,-1,-1)
    GUICtrlSetFont(-1,13,700,2,"Klavika Bold Caps")
    GUICtrlSetColor(-1,"0xFF8000")
    GUICtrlSetBkColor(-1,"-2")
    $Weiter = GUICtrlCreateButton("Weiter",330,20,100,30,-1,-1)
    GUICtrlSetState(-1,16)
    $Webseite1 = GUICtrlCreateButton("Besuchen",330,80,100,30,-1,-1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $Startx = GUICreate("Tsukey",684,249,-1,-1,-1,-1)
    $BGimage = GUICtrlCreatePic("C:\Users\Felix\Desktop\Autoit\Projects\Tsuminer\Images\minecraft_wallpaper_1_by_andrey_s-d32xbih.jpg",0,0,684,249,67108864)
    guictrlsetstate(-3,$GUI_DISABLE)
    $Starten = GUICtrlCreateButton("Starte Program",110,80,191,30,-1,-1)
    $Webseite2 = GUICtrlCreateButton("Webseite",520,140,100,30,-1,-1)
    $Close = GUICtrlCreateButton("Close",360,140,97,30,-1,-1)
    $Hilfe = GUICtrlCreateButton("",200,140,100,30,-1,-1)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUISetState(@SW_SHOW, $Start)

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    While 1
    $aMsg = GUIGetMsg(1)
    Switch $aMsg[1]
    Case $Start
    Switch $aMsg[0]
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Webseite1
    Webseite()
    Case $Weiter ; Hier Beginnt der Case Wo das Programm drinnen ist Was gestartet werden soll
    GUISetState(@SW_SHOW, $Startx)
    Case $Startx
    Switch $aMsg[0]
    Case $GUI_EVENT_CLOSE, $Close
    GUISetState(@SW_HIDE, $Startx)
    Case $Starten
    #region Info ; Informations Befehle
    ;Hotkeyset ("h{Pause}","Help")
    Hotkeyset ("^a","Afk")
    HotKeySet ("^i","Info") ;XX
    #endregion
    #region Money ;Befehle Money
    Hotkeyset ("^m","Money")
    Hotkeyset ("!m","MoneyPay")
    Hotkeyset ("^!m","Moneytop")
    #endregion
    #region Bestrafung
    HotKeySet ("^z","Ban")
    HotKeySet ("^u","Unban")
    Hotkeyset ("^i","Mute")
    Hotkeyset ("^o","Kick")
    #endregion
    #region Warp ; Teleportations Befehle
    Hotkeyset ("","Warp")
    HotKeySet ("","SetWarp")
    HotKeySet ("","DelWarp")
    HotKeySet ("","Spawn")
    HotKeySet ("","Tp")
    HotKeySet ("+h","Home")
    HotKeySet ("+^h","SetHome")
    #endregion
    #region Run ; Auto Run ()
    HotKeySet ("","Down")
    HotKeySet ("","Up")
    #endregion
    #region Cheat
    HotKeySet ("+{up}","TimeD")
    HotKeySet ("^{up}","TimeN")
    HotKeySet ("!{up}","items")
    HotKeySet ("#{up}","God")
    HotKeySet ("^!{up}","Killall")
    #endregion
    #region Towny ; Erst mal nicht einsatz Bereit auf Bauen
    HotKeySet ("","Town")
    HotKeySet ("","Townlist")
    HotKeySet ("","TownOn")
    HotKeySet ("","Townadd")
    #endregion
    Case $Webseite2
    ShellExecute ("")
    EndSwitch
    EndSwitch
    WEnd

    [/autoit]


    Und verwende bitte beim nächsten Mal Satzzeichen.
    Und beim scripten Leerzeichen und Tabstop ;)

    Was soll eigentlich die -3 bei GuiCtrlSetState? Und verwende Variablen nur dort, wo du sie auch brauchst, wie z.B. bei $BGimage. Und zwei Buttons darfst du auch nicht die selbe Variable geben, siehe $Website.