Habe mehrere (7) skripte und will sie zu einem machen

  • hi zusammen

    ich hab grad an nem launcher gearbeitet und bin jetzt soweit fertig doch ich hab noch ein einziges problem und zwar sind es 7 skripte und nicht nur 1. ich hab keine ahnung wie ich die zusammen fassen soll weil wenn ich die einzelnen skripte als funktion einbinde kriege ich iwelche errors
    hoffe ihr könnt mir helfen

    Hauptskript:

    Spoiler anzeigen
    [autoit]

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=***
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $1a = IniRead("LAuncher.ini", "Home", "1", "1. Kategorie")
    $2a = IniRead("LAuncher.ini", "Home", "2", "2. Kategorie")
    $3a = IniRead("LAuncher.ini", "Home", "3", "3. Kategorie")
    $4a = IniRead("LAuncher.ini", "Home", "4", "4. Kategorie")
    $1 = IniRead("LAuncher.ini", "Layout", "1", "72")
    $2 = IniRead("LAuncher.ini", "Layout", "2", "Home")
    $3 = IniRead("LAuncher.ini", "Layout", "3", "Neon Lights")
    Func _exit()
    Exit
    EndFunc
    Func _1()
    _start3()
    EndFunc
    Func _2()
    _start2()
    EndFunc
    Func _3()
    _start1()
    EndFunc
    Func _4()
    _start4()
    EndFunc
    Func _5()
    $1a = InputBox("Home","Gib den Namen der 1. Kategorie ein")
    IniWrite(@ScriptDir & "\Launcher.ini", "Home", "1", $1a)
    EndFunc
    Func _6()
    $3a = InputBox("Home","Gib den Namen der 3. Kategorie ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", "Home", "3", $3a)
    EndFunc
    Func _7()
    $2a = InputBox("Home","Gib den Namen der 2. Kategorie ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", "Home", "2", $2a)
    EndFunc
    Func _8()
    $4a = InputBox("Home","Gib den Namen der 4. Kategorie ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", "Home", "4", $4a)
    EndFunc
    Func _9()
    _help()
    EndFunc
    Func _rs()
    run("launcher.exe")
    Exit
    EndFunc
    Func _Layout()
    run("layout.exe")
    EndFunc
    Func _start3()
    Run("1.exe")
    EndFunc
    Func _start4()
    Run("2.exe")
    EndFunc
    Func _start1()
    Run("3.exe")
    EndFunc
    Func _start2()
    Run("4.exe")
    EndFunc
    Func _help()
    Run("hlp.exe")
    EndFunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($2, 631, 449, 192, 150)
    $Label1 = GUICtrlCreateLabel($2, 80, 8, 486, 122)
    GUICtrlSetFont(-1, $1, 400, 0, $3)
    GUICtrlSetColor(-1, 0x0000FF)
    $Button1 = GUICtrlCreateButton($1a, 8, 152, 457, 49, $WS_GROUP)
    $Button2 = GUICtrlCreateButton($4a, 8, 324, 457, 49, $WS_GROUP)
    $Button3 = GUICtrlCreateButton($3a, 8, 267, 457, 49, $WS_GROUP)
    $Button4 = GUICtrlCreateButton($2a, 8, 209, 457, 49, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Konfigurieren", 488, 152, 121, 49, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Konfigurieren", 488, 274, 121, 49, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Konfigurieren", 488, 210, 121, 49, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Konfigurieren", 488, 332, 121, 49, $WS_GROUP)
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57, $WS_GROUP)
    $Button11 = GUICtrlCreateButton("Restart", 165, 384, 137, 57, $WS_GROUP)
    $Button12 = GUICtrlCreateButton("Layout Konfig.", 322, 384, 137, 57, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("?", 1, 3, 33, 25, $WS_GROUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUICtrlSetOnEvent($Button1,"_1")
    GUICtrlSetOnEvent($Button2,"_2")
    GUICtrlSetOnEvent($Button3,"_3")
    GUICtrlSetOnEvent($Button4,"_4")
    GUICtrlSetOnEvent($Button5,"_5")
    GUICtrlSetOnEvent($Button6,"_6")
    GUICtrlSetOnEvent($Button7,"_7")
    GUICtrlSetOnEvent($Button8,"_8")
    GUICtrlSetOnEvent($Button10,"_9")
    GUICtrlSetOnEvent($Button9,"_exit")
    GUICtrlSetOnEvent($Button11,"_rs")
    GUICtrlSetOnEvent($Button12,"_Layout")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Button1
    _1 ()
    Case $Button2
    _2 ()
    Case $Button3
    _3 ()
    Case $Button4
    _4 ()
    Case $Button5
    _5 ()
    Case $Button6
    _6()
    Case $Button7
    _7 ()
    Case $Button8
    _8 ()
    Case $Button9
    _exit ()
    Case $Button10
    _9()
    Case $Button11
    _rs()
    Case $Button12
    _Layout()
    Exit

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

    EndSwitch
    WEnd

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

    die einzelnen Kategorien
    1

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $1a = IniRead("LAuncher.ini", "Home", "1", "Name")
    $1 = IniRead("LAuncher.ini", $1a, "1", "1. Programm")
    $2 = IniRead("LAuncher.ini", $1a, "2", "2. Programm")
    $3 = IniRead("LAuncher.ini", $1a, "3", "3. Programm")
    $4 = IniRead("LAuncher.ini", $1a, "4", "4. Programm")
    $S1 = IniRead("LAuncher.ini", "Layout", "1", "72")
    $S3 = IniRead("LAuncher.ini", "Layout", "3", "Neon Lights")
    $11 = IniRead("LAuncher.ini", $1a, "5", "5")
    $22 = IniRead("LAuncher.ini", $1a, "6", "6")
    $33 = IniRead("LAuncher.ini", $1a, "7", "7")
    $44 = IniRead("LAuncher.ini", $1a, "8", "8")
    Func _exit()
    Exit
    EndFunc
    Func _1()
    Run($11)
    EndFunc
    Func _2()
    Run($22)
    EndFunc
    Func _3()
    Run($33)
    EndFunc
    Func _4()
    Run($44)
    EndFunc
    Func _5()
    $1 = InputBox("Home","Gib den Namen des 1. Programms ein")
    IniWrite(@ScriptDir & "\Launcher.ini", $1a, "1", $1)
    $11 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $1a, "5", $11)
    EndFunc
    Func _6()
    $3 = InputBox("Home","Gib den Namen des 3. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $1a, "3", $3)
    $33= FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $1a, "7", $33)
    EndFunc
    Func _7()
    $2 = InputBox("Home","Gib den Namen des 2. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $1a, "2", $2)
    $22 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $1a, "6", $22)
    EndFunc
    Func _8()
    $4 = InputBox("Home","Gib den Namen des 4. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $1a, "4", $4)
    $44 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $1a, "8", $44)
    EndFunc
    Func _9()
    _help()
    EndFunc
    Func _help()
    run("hlp.exe")
    Endfunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($1a, 631, 449, 192, 150)
    $Label1 = GUICtrlCreateLabel($1a, 80, 8, 486, 122)
    GUICtrlSetFont(-1, $S1, 400, 0, $S3)
    GUICtrlSetColor(-1, 0x0000FF)
    $Button1 = GUICtrlCreateButton($1, 8, 152, 457, 49, $WS_GROUP)
    $Button2 = GUICtrlCreateButton($4, 8, 324, 457, 49, $WS_GROUP)
    $Button3 = GUICtrlCreateButton($3, 8, 267, 457, 49, $WS_GROUP)
    $Button4 = GUICtrlCreateButton($2, 8, 209, 457, 49, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Konfigurieren", 488, 152, 121, 49, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Konfigurieren", 488, 274, 121, 49, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Konfigurieren", 488, 210, 121, 49, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Konfigurieren", 488, 332, 121, 49, $WS_GROUP)
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("?", 1, 3, 33, 25, $WS_GROUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")
    GUICtrlSetOnEvent($Button1,"_1")
    GUICtrlSetOnEvent($Button2,"_2")
    GUICtrlSetOnEvent($Button3,"_3")
    GUICtrlSetOnEvent($Button4,"_4")
    GUICtrlSetOnEvent($Button5,"_5")
    GUICtrlSetOnEvent($Button6,"_6")
    GUICtrlSetOnEvent($Button7,"_7")
    GUICtrlSetOnEvent($Button8,"_8")
    GUICtrlSetOnEvent($Button9,"_9")
    GUICtrlSetOnEvent($Button10,"_exit")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Button1
    _1 ()
    Case $Button2
    _2 ()
    Case $Button3
    _3 ()
    Case $Button4
    _4 ()
    Case $Button5
    _5 ()
    Case $Button6
    _6()
    Case $Button7
    _7 ()
    Case $Button8
    _8 ()
    Case $Button9
    _exit ()
    Case $Button10
    _9()
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    2

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $2a = IniRead("LAuncher.ini", "Home", "1", "Name")
    $1 = IniRead("LAuncher.ini", $2a, "1", "1. Programm")
    $2 = IniRead("LAuncher.ini", $2a, "2", "2. Programm")
    $3 = IniRead("LAuncher.ini", $2a, "3", "3. Programm")
    $4 = IniRead("LAuncher.ini", $2a, "4", "4. Programm")
    $S1 = IniRead("LAuncher.ini", "Layout", "1", "72")
    $S3 = IniRead("LAuncher.ini", "Layout", "3", "Neon Lights")
    $11 = IniRead("LAuncher.ini", $2a, "5", "5")
    $22 = IniRead("LAuncher.ini", $2a, "6", "6")
    $33 = IniRead("LAuncher.ini", $2a, "7", "7")
    $44 = IniRead("LAuncher.ini", $2a, "8", "8")
    Func _exit()
    Exit
    EndFunc
    Func _1()
    Run($11)
    EndFunc
    Func _2()
    Run($22)
    EndFunc
    Func _3()
    Run($33)
    EndFunc
    Func _4()
    Run($44)
    EndFunc
    Func _5()
    $1 = InputBox("Home","Gib den Namen des 1. Programms ein")
    IniWrite(@ScriptDir & "\Launcher.ini", $2a, "1", $1)
    $11 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $2a, "5", $11)
    EndFunc
    Func _6()
    $3 = InputBox("Home","Gib den Namen des 3. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $2a, "3", $3)
    $33= FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $2a, "7", $33)
    EndFunc
    Func _7()
    $2 = InputBox("Home","Gib den Namen des 2. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $2a, "2", $2)
    $22 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $2a, "6", $22)
    EndFunc
    Func _8()
    $4 = InputBox("Home","Gib den Namen des 4. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $2a, "4", $4)
    $44 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $2a, "8", $44)
    EndFunc
    Func _9()
    _help()
    EndFunc
    Func _help()
    run("hlp.exe")
    Endfunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($2a, 631, 449, 192, 150)
    $Label1 = GUICtrlCreateLabel($2a, 80, 8, 486, 122)
    GUICtrlSetFont(-1, $S1, 400, 0, $S3)
    GUICtrlSetColor(-1, 0x0000FF)
    $Button1 = GUICtrlCreateButton($1, 8, 152, 457, 49, $WS_GROUP)
    $Button2 = GUICtrlCreateButton($4, 8, 324, 457, 49, $WS_GROUP)
    $Button3 = GUICtrlCreateButton($3, 8, 267, 457, 49, $WS_GROUP)
    $Button4 = GUICtrlCreateButton($2, 8, 209, 457, 49, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Konfigurieren", 488, 152, 121, 49, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Konfigurieren", 488, 274, 121, 49, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Konfigurieren", 488, 210, 121, 49, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Konfigurieren", 488, 332, 121, 49, $WS_GROUP)
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("?", 1, 3, 33, 25, $WS_GROUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")
    GUICtrlSetOnEvent($Button1,"_1")
    GUICtrlSetOnEvent($Button2,"_2")
    GUICtrlSetOnEvent($Button3,"_3")
    GUICtrlSetOnEvent($Button4,"_4")
    GUICtrlSetOnEvent($Button5,"_5")
    GUICtrlSetOnEvent($Button6,"_6")
    GUICtrlSetOnEvent($Button7,"_7")
    GUICtrlSetOnEvent($Button8,"_8")
    GUICtrlSetOnEvent($Button9,"_9")
    GUICtrlSetOnEvent($Button10,"_exit")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Button1
    _1 ()
    Case $Button2
    _2 ()
    Case $Button3
    _3 ()
    Case $Button4
    _4 ()
    Case $Button5
    _5 ()
    Case $Button6
    _6()
    Case $Button7
    _7 ()
    Case $Button8
    _8 ()
    Case $Button9
    _exit ()
    Case $Button10
    _9()
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    3

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $3a = IniRead("LAuncher.ini", "Home", "1", "Name")
    $1 = IniRead("LAuncher.ini", $3a, "1", "1. Programm")
    $2 = IniRead("LAuncher.ini", $3a, "2", "2. Programm")
    $3 = IniRead("LAuncher.ini", $3a, "3", "3. Programm")
    $4 = IniRead("LAuncher.ini", $3a, "4", "4. Programm")
    $S1 = IniRead("LAuncher.ini", "Layout", "1", "72")
    $S3 = IniRead("LAuncher.ini", "Layout", "3", "Neon Lights")
    $11 = IniRead("LAuncher.ini", $3a, "5", "5")
    $22 = IniRead("LAuncher.ini", $3a, "6", "6")
    $33 = IniRead("LAuncher.ini", $3a, "7", "7")
    $44 = IniRead("LAuncher.ini", $3a, "8", "8")
    Func _exit()
    Exit
    EndFunc
    Func _1()
    Run($11)
    EndFunc
    Func _2()
    Run($22)
    EndFunc
    Func _3()
    Run($33)
    EndFunc
    Func _4()
    Run($44)
    EndFunc
    Func _5()
    $1 = InputBox("Home","Gib den Namen des 1. Programms ein")
    IniWrite(@ScriptDir & "\Launcher.ini", $3a, "1", $1)
    $11 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $3a, "5", $11)
    EndFunc
    Func _6()
    $3 = InputBox("Home","Gib den Namen des 3. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $3a, "3", $3)
    $33= FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $3a, "7", $33)
    EndFunc
    Func _7()
    $2 = InputBox("Home","Gib den Namen des 2. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $3a, "2", $2)
    $22 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $3a, "6", $22)
    EndFunc
    Func _8()
    $4 = InputBox("Home","Gib den Namen des 4. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $3a, "4", $4)
    $44 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $3a, "8", $44)
    EndFunc
    Func _9()
    _help()
    EndFunc
    Func _help()
    run("hlp.exe")
    Endfunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($3a, 631, 449, 192, 150)
    $Label1 = GUICtrlCreateLabel($3a, 80, 8, 486, 122)
    GUICtrlSetFont(-1, $S1, 400, 0, $S3)
    GUICtrlSetColor(-1, 0x0000FF)
    $Button1 = GUICtrlCreateButton($1, 8, 152, 457, 49, $WS_GROUP)
    $Button2 = GUICtrlCreateButton($4, 8, 324, 457, 49, $WS_GROUP)
    $Button3 = GUICtrlCreateButton($3, 8, 267, 457, 49, $WS_GROUP)
    $Button4 = GUICtrlCreateButton($2, 8, 209, 457, 49, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Konfigurieren", 488, 152, 121, 49, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Konfigurieren", 488, 274, 121, 49, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Konfigurieren", 488, 210, 121, 49, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Konfigurieren", 488, 332, 121, 49, $WS_GROUP)
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("?", 1, 3, 33, 25, $WS_GROUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")
    GUICtrlSetOnEvent($Button1,"_1")
    GUICtrlSetOnEvent($Button2,"_2")
    GUICtrlSetOnEvent($Button3,"_3")
    GUICtrlSetOnEvent($Button4,"_4")
    GUICtrlSetOnEvent($Button5,"_5")
    GUICtrlSetOnEvent($Button6,"_6")
    GUICtrlSetOnEvent($Button7,"_7")
    GUICtrlSetOnEvent($Button8,"_8")
    GUICtrlSetOnEvent($Button9,"_9")
    GUICtrlSetOnEvent($Button10,"_exit")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Button1
    _1 ()
    Case $Button2
    _2 ()
    Case $Button3
    _3 ()
    Case $Button4
    _4 ()
    Case $Button5
    _5 ()
    Case $Button6
    _6()
    Case $Button7
    _7 ()
    Case $Button8
    _8 ()
    Case $Button9
    _exit ()
    Case $Button10
    _9()
    Exit

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

    EndSwitch
    WEnd

    [/autoit]

    und 4

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    $4a = IniRead("LAuncher.ini", "Home", "1", "Name")
    $1 = IniRead("LAuncher.ini", $4a, "1", "1. Programm")
    $2 = IniRead("LAuncher.ini", $4a, "2", "2. Programm")
    $3 = IniRead("LAuncher.ini", $4a, "3", "3. Programm")
    $4 = IniRead("LAuncher.ini", $4a, "4", "4. Programm")
    $S1 = IniRead("LAuncher.ini", "Layout", "1", "72")
    $S3 = IniRead("LAuncher.ini", "Layout", "3", "Neon Lights")
    $11 = IniRead("LAuncher.ini", $4a, "5", "5")
    $22 = IniRead("LAuncher.ini", $4a, "6", "6")
    $33 = IniRead("LAuncher.ini", $4a, "7", "7")
    $44 = IniRead("LAuncher.ini", $4a, "8", "8")
    Func _exit()
    Exit
    EndFunc
    Func _1()
    Run($11)
    EndFunc
    Func _2()
    Run($22)
    EndFunc
    Func _3()
    Run($33)
    EndFunc
    Func _4()
    Run($44)
    EndFunc
    Func _5()
    $1 = InputBox("Home","Gib den Namen des 1. Programms ein")
    IniWrite(@ScriptDir & "\Launcher.ini", $4a, "1", $1)
    $11 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $4a, "5", $11)
    EndFunc
    Func _6()
    $3 = InputBox("Home","Gib den Namen des 3. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $4a, "3", $3)
    $33= FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $4a, "7", $33)
    EndFunc
    Func _7()
    $2 = InputBox("Home","Gib den Namen des 2. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $4a, "2", $2)
    $22 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $4a, "6", $22)
    EndFunc
    Func _8()
    $4 = InputBox("Home","Gib den Namen des 4. Programms ein")
    IniWrite(@ScriptDir & "\LAuncher.ini", $4a, "4", $4)
    $44 = FileOpenDialog("Bitte Pfad Auswählen", "C:\Programme\", "Programme(*.exe)|Alle Formate(*.*)")
    IniWrite(@scriptdir & "LAuncher.ini", $4a, "8", $44)
    EndFunc
    Func _9()
    _help()
    EndFunc
    Func _help()
    run("hlp.exe")
    Endfunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate($4a, 631, 449, 192, 150)
    $Label1 = GUICtrlCreateLabel($4a, 80, 8, 486, 122)
    GUICtrlSetFont(-1, $S1, 400, 0, $S3)
    GUICtrlSetColor(-1, 0x0000FF)
    $Button1 = GUICtrlCreateButton($1, 8, 152, 457, 49, $WS_GROUP)
    $Button2 = GUICtrlCreateButton($4, 8, 324, 457, 49, $WS_GROUP)
    $Button3 = GUICtrlCreateButton($3, 8, 267, 457, 49, $WS_GROUP)
    $Button4 = GUICtrlCreateButton($2, 8, 209, 457, 49, $WS_GROUP)
    $Button5 = GUICtrlCreateButton("Konfigurieren", 488, 152, 121, 49, $WS_GROUP)
    $Button6 = GUICtrlCreateButton("Konfigurieren", 488, 274, 121, 49, $WS_GROUP)
    $Button7 = GUICtrlCreateButton("Konfigurieren", 488, 210, 121, 49, $WS_GROUP)
    $Button8 = GUICtrlCreateButton("Konfigurieren", 488, 332, 121, 49, $WS_GROUP)
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57, $WS_GROUP)
    $Button10 = GUICtrlCreateButton("?", 1, 3, 33, 25, $WS_GROUP)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_exit")
    GUICtrlSetOnEvent($Button1,"_1")
    GUICtrlSetOnEvent($Button2,"_2")
    GUICtrlSetOnEvent($Button3,"_3")
    GUICtrlSetOnEvent($Button4,"_4")
    GUICtrlSetOnEvent($Button5,"_5")
    GUICtrlSetOnEvent($Button6,"_6")
    GUICtrlSetOnEvent($Button7,"_7")
    GUICtrlSetOnEvent($Button8,"_8")
    GUICtrlSetOnEvent($Button9,"_9")
    GUICtrlSetOnEvent($Button10,"_exit")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _Exit()
    Case $Button1
    _1 ()
    Case $Button2
    _2 ()
    Case $Button3
    _3 ()
    Case $Button4
    _4 ()
    Case $Button5
    _5 ()
    Case $Button6
    _6()
    Case $Button7
    _7 ()
    Case $Button8
    _8 ()
    Case $Button9
    _exit ()
    Case $Button10
    _9()
    Exit

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

    EndSwitch
    WEnd

    [/autoit]


    das hilfe skript

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    #Region ### START Koda GUI section ### Form=c:\users\bormeister\programmierne\game launcher\form1.kxf
    $Form1_1 = GUICreate("Hilfe", 631, 441, 192, 150)
    $Label1 = GUICtrlCreateLabel("Hilfe", 48, 16, 67, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Label2 = GUICtrlCreateLabel("Als erstes gehst du auf Konfigurieren", 48, 72, 176, 17)
    $Button1 = GUICtrlCreateButton("Konfigurieren", 224, 40, 121, 49)
    $Label3 = GUICtrlCreateLabel("Wenn du alle Kategorien fertig hast drückst du auf Restart, dann siehst du die Namen.", 48, 120, 410, 17)
    $Label4 = GUICtrlCreateLabel("(nicht wundern wenn die Namen nicht direkt angeziegt werden).", 48, 96, 305, 17)
    $Button2 = GUICtrlCreateButton("Restart", 192, 144, 137, 57)
    $Label5 = GUICtrlCreateLabel("Jetzt kannst du die einzelnen Kategorien anklicken und dann dort deine Programme eintragen.", 48, 208, 448, 17)

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

    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

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

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

    EndSwitch
    WEnd

    [/autoit]

    und zu guter letzt die layout konfiguration

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    Func _S2()
    $1 = InputBox("Home","Gib den Namen der 1. Seite ein")
    IniWrite(@ScriptDir & "\Launcher.ini", "Layout", "1", $1)
    EndFunc
    Func _S1()
    $2 = InputBox("Home","Gib die Schriftgröße ein")
    IniWrite(@ScriptDir & "\Launcher.ini", "Layout", "2", $2)
    EndFunc
    Func _S3()
    $3 = InputBox("Home","Gib die Schriftart ein")
    IniWrite(@ScriptDir & "\Launcher.ini", "Layout", "3", $3)
    EndFunc
    Func _exit()
    Exit
    EndFunc
    Func _rs()
    run("launcher.exe")
    Exit
    EndFunc
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Layout-Konfiguration", 631, 449, 193, 151)
    $Label1 = GUICtrlCreateLabel("Layout Konfiuguration", 24, 16, 317, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Button2 = GUICtrlCreateButton("Name der Ersten Seite", 28, 73, 249, 65, 0)
    GUICtrlSetFont(-1, 40, 400, 0, "MS Sans Serif")
    $Button1 = GUICtrlCreateButton("Schriftgröße", 28, 164, 249, 65, 0)
    GUICtrlSetFont(-1, 40, 400, 0, "MS Sans Serif")
    $Button3 = GUICtrlCreateButton("Schriftart", 28, 255, 249, 65, 0)
    GUICtrlSetFont(-1, 40, 400, 0, "MS Sans Serif")
    $Label2 = GUICtrlCreateLabel("Standard: Home", 296, 80, 238, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Label3 = GUICtrlCreateLabel("Standar: 72", 296, 176, 171, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Label4 = GUICtrlCreateLabel("Standard: Neon Lights", 296, 272, 325, 41)
    GUICtrlSetFont(-1, 24, 400, 0, "MS Sans Serif")
    $Button9 = GUICtrlCreateButton("Exit", 8, 384, 137, 57)
    GUISetOnEvent($GUI_EVENT_CLOSE,"_Exit")
    GUICtrlSetOnEvent($Button2,"_S1")
    GUICtrlSetOnEvent($Button1,"_S2")
    GUICtrlSetOnEvent($Button3,"_S3")
    GUICtrlSetOnEvent($Button9,"_exit")
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    Case $Button1
    _S2 ()
    Case $Button2
    _S1 ()
    Case $Button3
    _S3 ()
    Case $Button9
    _rs ()

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

    EndSwitch
    WEnd

    [/autoit]

    ich danke jetzt schon mal für alle antworten
    tomtomone96

  • Include kann er vergessen...
    Er hat Variablen da mehrfach drin... Das wird unweigerlich zu Fehlern führen...

    Wenns n Launcher sein soll, mach doch einfach 7 Datein draus und lass ausm MainScript die andern .exe starten?!

    LG

    Wobei ich grade sehe, dass die Teile auch kommunizieren müssen... Gibts zwar auch für Lösungen aber ich denke, du musst noch mal ALLES überarbeiten :p...
    Kopier Stück für Stück ins Hauptscript, guck, dass Variabeln eindeutig sind für verschiedene GUIs halt am Besten mit child-Parameter arbeiten und immer fein @SW_Hide/@SW_Show, je nachdem, ob der GUI-Teil grade gebraucht wird...

    Wirste aber nicht drum rum kommen, da noch einiges an Arbeit rein zu stecken...


    LG