Dateikopieren

  • irgendwie versteh ich das nicht so ganz ich poste mal ein stück aus dem code

    hier die maingui:

    [autoit]


    GUICreate("moDMove 3.0 by lev",269,200)
    GUISetState(@sw_show)
    GUISetIcon(@TempDir & "\modmove.ico")
    $logo=GUICtrlCreatePic("F:\Call of Duty 2\main\modmove.jpg",0,0,269,64,-1,-1)
    $menu_options=GUICtrlCreateMenu("Options",-1,0)
    $menu_help=GUICtrlCreateMenu("Help",-1,0)
    $help_about=GUICtrlCreateMenuItem("About",$menu_help,10)
    $help_stats=GUICtrlCreateMenuItem("Stats",$menu_help,00)
    $moveembutton=GUICtrlCreateButton("Move 'Em",5,75,100,20,-1,-1)
    $moveembackbutton=GUICtrlCreateButton("Move 'Em back",5,110,100,20,-1,-1)
    $clearmainbutton=GUICtrlCreateButton("Clear mainfolder",140,75,100,20,-1,-1)
    $nomovelistbutton=GUICtrlCreateButton("NoMove-List",140,110,100,20,-1,-1)
    $nomoveshowlabel=GUICtrlCreateLabel("NoMove:",5,166,62,14,-1,-1)
    $madebylabel=GUICtrlCreateLabel("made by Leviathan",141,166,113,12,-1,-1)
    $nomovegroupcounting=GUICtrlCreateGroup("",-6,159,285,31,-1,-1)
    $warnungslabel=GUICtrlCreateLabel("Be sure that u did config under options",22,144,228,14,-1,-1)
    While 1
    $msg=GUIGetMsg()
    If $msg=$GUI_EVENT_CLOSE Then ExitLoop
    If $msg=$moveembackbutton Then _movemodsback()
    If $msg=$moveembutton Then _movemods()
    If $msg=$help_about Then _about()
    If $msg=$help_stats Then _stats()
    WEnd

    [/autoit]

    und hier die funktion _stats()

    [autoit]


    Func _stats()
    ;Hier werden die jeweilige Anzahl aus der ini-file geladen:
    $counterback = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", "0")
    $counter = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counter" ,"0")
    $counterextra = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", "0")
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")

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

    GUICreate("Stats",184,177)
    GUISetState(@sw_show)
    GUISetIcon(@TempDir & "\modmove.ico")
    $imoveemstats=GUICtrlCreateLabel("Move 'Em:",5,30,85,14,-1,-1)
    $statsheader=GUICtrlCreateLabel("Stats:",6,6,67,14,-1,-1)
    $moveemback=GUICtrlCreateLabel("Move 'Em back:",5,50,85,14,-1,-1)
    $clearstatslabel=GUICtrlCreateLabel("Clear mainfolder:",5,70,85,14,-1,-1)
    $moveemwithjumper=GUICtrlCreateLabel("Move 'Em with jumperoption on:",5,90,85,32,-1,-1)
    $movemamountlabel=GUICtrlCreateLabel($counter,100,30,40,14,-1,-1)
    $moveembackamountlabel=GUICtrlCreateLabel($counterback,100,50,40,14,-1,-1)
    $clearmainfolderamountlabel=GUICtrlCreateLabel($counterclear,100,70,40,14,-1,-1)
    $moveemwithjoamountlabel=GUICtrlCreateLabel($counterextra,100,105,40,14,-1,-1)
    $statsinfolabel=GUICtrlCreateLabel("Gives you the amount of each operation ;-)",16,141,144,25,-1,-1)
    $statsgroup=GUICtrlCreateGroup("",3,22,163,103,-1,-1)
    While 1
    $msgstats=GUIGetMsg()
    If $msgstats=$GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    EndFunc

    [/autoit]
  • mh das komische ist nur wenn ich jetzt während die maingui weiterläuft wieder auf stats klicke um das fenster wieder zu erzeugen kommt nichts mehr? 8|

    edit: ach ja und wenn ich dann das eine nun schließen geht ohne dass das andere sich mitschließt kann ich das andere nicht mehr schließen also ich kann mit ExitLoop und der anderen Methode nicht mehr herraus (taskmanager)

    Einmal editiert, zuletzt von leviathan (7. Januar 2007 um 18:40)

    • Offizieller Beitrag

    Ja, sorry, hatte noch was vergessen.
    So wie du deinen Code aufgebaut hast, musst du wohl nach dem GUIDelete noch ein GUiSwitch($gui_modmove) einbauen.

    Außerdem muss du
    $gui_modmove = GUICreate("moDMove 3.0 by lev",269,200)

    machen.

    Ich hoffe, das reicht dann schon,
    peethebee

  • ja daran hab ich auch gedacht jedoch hab ich bei meinen ersten versuchen, dann das statsfenster nur einmal bekommen naja ich werde es nochmal probieren

    edit: irgendwie funktioniert das auch nicht

    Einmal editiert, zuletzt von leviathan (7. Januar 2007 um 19:00)

  • code:

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #include-once <file.au3>
    #NoTrayIcon
    ;Variablen werden gelesen:
    $firstrun = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "no")
    $counterback = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", "0")
    $counter = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counter" ,"0")
    $counterextra = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", "0")
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")
    $devmapsaveposmod = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "no")
    $filepath=IniRead(@ScriptDir & "\modmove.ini", "Folder", "filepath", "notset")
    $languagefilename = "english"
    $language=IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "language", "eng")
    _language()
    Dim $INIPfad = @ScriptDir & "\modmove.ini"
    Dim $QuellPfad = $filepath
    Dim $ZielPfad = $filepath & "modmove\"
    $arNoMove = IniReadSection($INIPfad, "NoMove")

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

    ;first run Anfang
    If $firstrun="no" Then
    SplashTextOn("First Run of moDMove 4s", "Be sure that u have read moDMove.txt and change all values under options",200,60)
    sleep(4000)
    SplashOff()
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "yes")
    ENDIf
    ;first run Ende

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

    ; Gui wird erzeugt
    FileInstall("F:\Call of Duty 2\main\modmove.jpg", @TempDir & "\modmove.jpg", 1)
    FileInstall("F:\Call of Duty 2\main\modmove.ico", @TempDir & "\modmove.ico", 1)
    $gui_main = GUICreate("moDMove 3.0 by lev",269,200)
    GUISetState(@sw_show)
    GUISetIcon(@TempDir & "\modmove.ico")
    $logo=GUICtrlCreatePic("F:\Call of Duty 2\main\modmove.jpg",0,0,269,64,-1,-1)
    $menu_options=GUICtrlCreateMenu("Options",-1,0)
    $menu_help=GUICtrlCreateMenu("Help",-1,0)
    $help_about=GUICtrlCreateMenuItem("About",$menu_help,10)
    $help_stats=GUICtrlCreateMenuItem("Stats",$menu_help,00)
    $moveembutton=GUICtrlCreateButton("Move 'Em",5,75,100,20,-1,-1)
    $moveembackbutton=GUICtrlCreateButton("Move 'Em back",5,110,100,20,-1,-1)
    $clearmainbutton=GUICtrlCreateButton("Clear mainfolder",140,75,100,20,-1,-1)
    $nomovelistbutton=GUICtrlCreateButton("NoMove-List",140,110,100,20,-1,-1)
    $nomoveshowlabel=GUICtrlCreateLabel("NoMove:",5,166,62,14,-1,-1)
    $madebylabel=GUICtrlCreateLabel("made by Leviathan",141,166,113,12,-1,-1)
    $nomovegroupcounting=GUICtrlCreateGroup("",-6,159,285,31,-1,-1)
    $warnungslabel=GUICtrlCreateLabel("Be sure that u did config under options",22,144,228,14,-1,-1)
    ;gui stats:
    $gui_stats = GUICreate("Stats",184,177)
    GUISetState(@sw_hide,$gui_stats)
    GUISetIcon(@TempDir & "\modmove.ico")
    $imoveemstats=GUICtrlCreateLabel("Move 'Em:",5,30,85,14,-1,-1)
    $statsheader=GUICtrlCreateLabel("Stats:",6,6,67,14,-1,-1)
    $moveemback=GUICtrlCreateLabel("Move 'Em back:",5,50,85,14,-1,-1)
    $clearstatslabel=GUICtrlCreateLabel("Clear mainfolder:",5,70,85,14,-1,-1)
    $moveemwithjumper=GUICtrlCreateLabel("Move 'Em with jumperoption on:",5,90,85,32,-1,-1)
    $movemamountlabel=GUICtrlCreateLabel($counter,100,30,40,14,-1,-1)
    $moveembackamountlabel=GUICtrlCreateLabel($counterback,100,50,40,14,-1,-1)
    $clearmainfolderamountlabel=GUICtrlCreateLabel($counterclear,100,70,40,14,-1,-1)
    $moveemwithjoamountlabel=GUICtrlCreateLabel($counterextra,100,105,40,14,-1,-1)
    $statsinfolabel=GUICtrlCreateLabel("Gives you the amount of each operation ;-)",16,141,144,25,-1,-1)
    $statsgroup=GUICtrlCreateGroup("",3,22,163,103,-1,-1)
    ;gui stats ende
    While 1
    $msg=GUIGetMsg()
    If $msg=$GUI_EVENT_CLOSE Then ExitLoop
    If $msg=$moveembackbutton Then _movemodsback()
    If $msg=$moveembutton Then _movemods()
    If $msg=$help_about Then _about()
    If $msg=$help_stats Then _stats()
    WEnd

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

    ; Funktionen (eigene) ====================================================================================================================================

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

    ;Sprache Anfang
    Func _language()
    If $language="eng" Then
    $languagefilename = "english"
    _cod2fileslanguageset()
    Else
    If $language="ger" Then
    $languagefilename = "german"
    _cod2fileslanguageset()
    Else
    Exit
    EndIf
    EndIf
    EndFunc
    Func _cod2fileslanguageset()
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert1", "localized_" & $languagefilename & "_iw00.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert2", "localized_" & $languagefilename & "_iw01.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert3", "localized_" & $languagefilename & "_iw02.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert4", "localized_" & $languagefilename & "_iw03.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert5", "localized_" & $languagefilename & "_iw04.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert6", "localized_" & $languagefilename & "_iw05.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert7", "localized_" & $languagefilename & "_iw06.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert8", "localized_" & $languagefilename & "_iw07.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert9", "localized_" & $languagefilename & "_iw08.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert10", "localized_" & $languagefilename & "_iw09.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert11", "localized_" & $languagefilename & "_iw10.iwd")
    IniWrite(@ScriptDir &"\modmove.ini", "NoMove", "wert12", "localized_" & $languagefilename & "_iw11.iwd")
    ENDFunc
    ; Sprache Ende
    ; Moveback Anfang
    Func _movemodsback()
    FileMove($ZielPfad & "*.iwd", $QuellPfad, 1)
    $icounterback = $counterback +1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", $icounterback)
    ENDFunc
    ; Moveback Ende
    ; Move Anfang
    Func _movemods()
    $AllModFiles = _FileListToArray($QuellPfad, "*.iwd")
    For $i = 1 To $AllModFiles[0]
    For $k = 1 To $arNoMove[0][0]
    ; Dateien markieren, die nicht verschoben werden sollen
    If $AllModFiles[$i] = $arNoMove[$k][1] Then $AllModFiles[$i] &= "|"
    Next
    Next
    For $i = 1 To $AllModFiles[0]
    ; nicht markierte Dateien verschieben
    If StringRight($AllModFiles[$i], 1) <> "|" Then FileMove($QuellPfad & $AllModFiles[$i], $ZielPfad)
    Next
    ;counter
    Select
    case $devmapsaveposmod = "yes"
    FileMove($filepath & "modmove\zzz_Save_position_mod_V1.0.iwd", $filepath)
    FileMove($filepath & "modmove\zzz_999_nades.iwd", $filepath)
    $iextra = $counterextra +1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", $iextra)
    case Else
    ;counting the amount of movements
    $icounter = $counter + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counter", $icounter)
    EndSelect
    EndFunc
    ;Move Ende

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

    ;Clear Anfang
    ;Clear Ende

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

    ; About Anfang
    Func _about()
    GUICreate("About moDMove3.0",246,170)
    GUISetState(@sw_show)
    GUISetIcon(@TempDir & "\modmove.ico")
    $aboutext1=GUICtrlCreateLabel("moDMove 3.0 made by Leviathan NOTE: I'm not responsible for any damage caused by this programme",8,5,230,54,-1,-1)
    $abouttext2=GUICtrlCreateLabel("Thanks to:",8,64,55,14,-1,-1)
    $aboutthanks=GUICtrlCreateLabel("bug bear; autoit.de and codjumper.com",69,81,169,29,-1,-1)
    $levwww=GUICtrlCreateLabel("www.leviathan-design.de",20,116,130,14,-1,-1)
    $autoitwww=GUICtrlCreateLabel("www.autoit.de",20,130,101,14,-1,-1)
    $cjwww=GUICtrlCreateLabel("www.codjumper.com",20,144,108,14,-1,-1)
    $grpthanks=GUICtrlCreateGroup("",62,68,122,44,-1,-1)
    $grpnote=GUICtrlCreateGroup("READ",6,18,204,46,-1,-1)
    $muhbutton=GUICtrlCreateButton("muh",173,141,59,19,-1,-1)
    While 1
    $msgabout=GUIGetMsg()
    If $msgabout=$GUI_EVENT_CLOSE Then ExitLoop
    If $msgabout=$muhbutton Then
    MsgBox(64, "Report bugs", "Report bugs to [email='geil.sandra@web.de'][/email] close in:4 secs", 3)
    Exitloop
    EndIF
    WEnd
    EndFunc
    ; About Ende

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

    ; Stats Anfang
    Func _stats()
    ;Hier werden die jeweilige Anzahl aus der ini-file geladen:
    $counterback = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", "0")
    $counter = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counter" ,"0")
    $counterextra = Iniread(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", "0")
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")

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

    GUISetState(@sw_show,$gui_stats)

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

    While 1
    $msgstats=GUIGetMsg()
    If $msgstats=$GUI_EVENT_CLOSE Then
    GUISetState(@sw_hide,$gui_stats)
    GUISwitch($gui_main)
    WinActivate("moDMove 3.0 by lev")
    EndIf
    WEnd
    EndFunc
    ; Stats Ende

    [/autoit]


    +ini

    Spoiler anzeigen

    bernd670: Spoiler korigiert, verschachtelte Spoiler sind nicht möglich!

    Einmal editiert, zuletzt von leviathan (7. Januar 2007 um 19:04)

    • Offizieller Beitrag

    Hi,

    ungefähr so, habe es schnell mal probiert:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>
    #include<file.au3>
    ;#NoTrayIcon
    ;Variablen werden gelesen:
    $firstrun = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "no")
    $counterback = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", "0")
    $counter = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counter", "0")
    $counterextra = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", "0")
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")
    $devmapsaveposmod = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "no")
    $filepath = IniRead(@ScriptDir & "\modmove.ini", "Folder", "filepath", "notset")
    $languagefilename = "english"
    $language = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "language", "eng")
    _language()
    Dim $INIPfad = @ScriptDir & "\modmove.ini"
    Dim $QuellPfad = $filepath
    Dim $ZielPfad = $filepath & "modmove\"
    $arNoMove = IniReadSection($INIPfad, "NoMove")

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

    ;first run Anfang
    If $firstrun = "no" Then
    SplashTextOn("First Run of moDMove 4s", "Be sure that u have read moDMove.txt and change all values under options", 200, 60)
    Sleep(4000)
    SplashOff()
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "yes")
    EndIf
    ;first run Ende

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

    ; Gui wird erzeugt
    FileInstall("F:\Call of Duty 2\main\modmove.jpg", @TempDir & "\modmove.jpg", 1)
    FileInstall("F:\Call of Duty 2\main\modmove.ico", @TempDir & "\modmove.ico", 1)
    $gui_main = GUICreate("moDMove 3.0 by lev", 269, 200)
    GUISetState(@SW_SHOW)
    GUISetIcon(@TempDir & "\modmove.ico")
    $logo = GUICtrlCreatePic("F:\Call of Duty 2\main\modmove.jpg", 0, 0, 269, 64, -1, -1)
    $menu_options = GUICtrlCreateMenu("Options", -1, 0)
    $menu_help = GUICtrlCreateMenu("Help", -1, 0)
    $help_about = GUICtrlCreateMenuitem("About", $menu_help, 10)
    $help_stats = GUICtrlCreateMenuitem("Stats", $menu_help, 00)
    $moveembutton = GUICtrlCreateButton("Move 'Em", 5, 75, 100, 20, -1, -1)
    $moveembackbutton = GUICtrlCreateButton("Move 'Em back", 5, 110, 100, 20, -1, -1)
    $clearmainbutton = GUICtrlCreateButton("Clear mainfolder", 140, 75, 100, 20, -1, -1)
    $nomovelistbutton = GUICtrlCreateButton("NoMove-List", 140, 110, 100, 20, -1, -1)
    $nomoveshowlabel = GUICtrlCreateLabel("NoMove:", 5, 166, 62, 14, -1, -1)
    $madebylabel = GUICtrlCreateLabel("made by Leviathan", 141, 166, 113, 12, -1, -1)
    $nomovegroupcounting = GUICtrlCreateGroup("", -6, 159, 285, 31, -1, -1)
    $warnungslabel = GUICtrlCreateLabel("Be sure that u did config under options", 22, 144, 228, 14, -1, -1)
    ;gui stats:
    $gui_stats = GUICreate("Stats", 184, 177)
    GUISetState(@SW_HIDE, $gui_stats)
    GUISetIcon(@TempDir & "\modmove.ico")
    $imoveemstats = GUICtrlCreateLabel("Move 'Em:", 5, 30, 85, 14, -1, -1)
    $statsheader = GUICtrlCreateLabel("Stats:", 6, 6, 67, 14, -1, -1)
    $moveemback = GUICtrlCreateLabel("Move 'Em back:", 5, 50, 85, 14, -1, -1)
    $clearstatslabel = GUICtrlCreateLabel("Clear mainfolder:", 5, 70, 85, 14, -1, -1)
    $moveemwithjumper = GUICtrlCreateLabel("Move 'Em with jumperoption on:", 5, 90, 85, 32, -1, -1)
    $movemamountlabel = GUICtrlCreateLabel($counter, 100, 30, 40, 14, -1, -1)
    $moveembackamountlabel = GUICtrlCreateLabel($counterback, 100, 50, 40, 14, -1, -1)
    $clearmainfolderamountlabel = GUICtrlCreateLabel($counterclear, 100, 70, 40, 14, -1, -1)
    $moveemwithjoamountlabel = GUICtrlCreateLabel($counterextra, 100, 105, 40, 14, -1, -1)
    $statsinfolabel = GUICtrlCreateLabel("Gives you the amount of each operation ;-)", 16, 141, 144, 25, -1, -1)
    $statsgroup = GUICtrlCreateGroup("", 3, 22, 163, 103, -1, -1)
    ;gui stats ende
    $about = GUICreate("About moDMove3.0", 246, 170)
    GUISetState(@SW_HIDE)
    GUISetIcon(@TempDir & "\modmove.ico")
    $aboutext1 = GUICtrlCreateLabel("moDMove 3.0 made by Leviathan NOTE: I'm not responsible for any damage caused by this programme", 8, 5, 230, 54, -1, -1)
    $abouttext2 = GUICtrlCreateLabel("Thanks to:", 8, 64, 55, 14, -1, -1)
    $aboutthanks = GUICtrlCreateLabel("bug bear; autoit.de and codjumper.com", 69, 81, 169, 29, -1, -1)
    $levwww = GUICtrlCreateLabel("www.leviathan-design.de", 20, 116, 130, 14, -1, -1)
    $autoitwww = GUICtrlCreateLabel("www.autoit.de", 20, 130, 101, 14, -1, -1)
    $cjwww = GUICtrlCreateLabel("www.codjumper.com", 20, 144, 108, 14, -1, -1)
    $grpthanks = GUICtrlCreateGroup("", 62, 68, 122, 44, -1, -1)
    $grpnote = GUICtrlCreateGroup("READ", 6, 18, 204, 46, -1, -1)
    $muhbutton = GUICtrlCreateButton("muh", 173, 141, 59, 19, -1, -1)
    While 1
    $msg = GUIGetMsg(1)
    If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $gui_main Then ExitLoop
    If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $gui_stats Then GUISetState(@SW_HIDE, $gui_stats)
    If $msg[0] = $moveembackbutton And $msg[1] = $gui_main Then _movemodsback()
    If $msg[0] = $moveembutton And $msg[1] = $gui_main Then _movemods()
    If $msg[0] = $help_about And $msg[1] = $gui_main Then _about()
    If $msg[0] = $help_stats And $msg[1] = $gui_main Then _stats()

    If $msg[0] = $muhbutton And $msg[1] = $about Then MsgBox(0, "", "Muh geclicked")
    If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $about Then GUISetState(@SW_HIDE, $about)
    WEnd

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

    ; Funktionen (eigene) ====================================================================================================================================

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

    ;Sprache Anfang
    Func _language()
    If $language = "eng" Then
    $languagefilename = "english"
    _cod2fileslanguageset()
    Else
    If $language = "ger" Then
    $languagefilename = "german"
    _cod2fileslanguageset()
    Else
    Exit
    EndIf
    EndIf
    EndFunc ;==>_language
    Func _cod2fileslanguageset()
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert1", "localized_" & $languagefilename & "_iw00.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert2", "localized_" & $languagefilename & "_iw01.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert3", "localized_" & $languagefilename & "_iw02.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert4", "localized_" & $languagefilename & "_iw03.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert5", "localized_" & $languagefilename & "_iw04.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert6", "localized_" & $languagefilename & "_iw05.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert7", "localized_" & $languagefilename & "_iw06.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert8", "localized_" & $languagefilename & "_iw07.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert9", "localized_" & $languagefilename & "_iw08.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert10", "localized_" & $languagefilename & "_iw09.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert11", "localized_" & $languagefilename & "_iw10.iwd")
    IniWrite(@ScriptDir & "\modmove.ini", "NoMove", "wert12", "localized_" & $languagefilename & "_iw11.iwd")
    EndFunc ;==>_cod2fileslanguageset
    ; Sprache Ende
    ; Moveback Anfang
    Func _movemodsback()
    FileMove($ZielPfad & "*.iwd", $QuellPfad, 1)
    $icounterback = $counterback + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", $icounterback)
    EndFunc ;==>_movemodsback
    ; Moveback Ende
    ; Move Anfang
    Func _movemods()
    $AllModFiles = _FileListToArray($QuellPfad, "*.iwd")
    For $i = 1 To $AllModFiles[0]
    For $k = 1 To $arNoMove[0][0]
    ; Dateien markieren, die nicht verschoben werden sollen
    If $AllModFiles[$i] = $arNoMove[$k][1] Then $AllModFiles[$i] &= "|"
    Next
    Next
    For $i = 1 To $AllModFiles[0]
    ; nicht markierte Dateien verschieben
    If StringRight($AllModFiles[$i], 1) <> "|" Then FileMove($QuellPfad & $AllModFiles[$i], $ZielPfad)
    Next
    ;counter
    Select
    Case $devmapsaveposmod = "yes"
    FileMove($filepath & "modmove\zzz_Save_position_mod_V1.0.iwd", $filepath)
    FileMove($filepath & "modmove\zzz_999_nades.iwd", $filepath)
    $iextra = $counterextra + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", $iextra)
    Case Else
    ;counting the amount of movements
    $icounter = $counter + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counter", $icounter)
    EndSelect
    EndFunc ;==>_movemods
    ;Move Ende

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

    ;Clear Anfang
    ;Clear Ende

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

    ; About Anfang
    Func _about()
    GUISetState(@SW_SHOW)
    EndFunc ;==>_about
    ; About Ende

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

    ; Stats Anfang
    Func _stats()
    ;Hier werden die jeweilige Anzahl aus der ini-file geladen:
    $counterback = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", "0")
    $counter = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counter", "0")
    $counterextra = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterextra", "0")
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")
    GUISetState(@SW_SHOW, $gui_stats)
    EndFunc ;==>_stats
    ; Stats Ende

    [/autoit]

    So long,

    Mega

  • ah ok ich hab das irgendwie noch nicht so ganz verstanden
    If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $gui_main Then ExitLoop
    die null und die 1 sind das dann rückgabewerte?
    aber es funktioniert

  • Das ist die Stelle eines Arrays.

    Ein Array, ist eine Variable die mehrere Werte haben kann, welchen Wert du meinst, bekommste mit diesem Index heraus.

    Ne Excel-Zeile vorstellen, wo jeder Kasten ein Index (ein Wert) im Array ist.

    Dim $Array[3] ;Array hat 3 Stellen.
    Dim $Array[3] = ["Wert1", "Wert2", "Wert3"] ;Werte im Array direkt.

    $Array[0] wäre dann Wert1
    $Array[1] wäre dann Wert2
    usw.

    • Offizieller Beitrag

    Guckst du hier:

    Spoiler anzeigen
  • dazu hätte ich mal eine frage und zwar kann ich ja mit IniReadSection eine Sektion auslesen und er gibt mir das in einem array wieder wie kann ich da die anzahl der werte ermitteln also ich hab 28 feste werte in der ini und möchte dann immer über ein eingabefeld neue hinzufügen, aber dazu muss ich ja immer die anzahl wissen; gibst da auch eine funktion die ich mit der hilfe nicht gefunden habe?

    [Folder]
    wert1=fasf
    wert2=234
    ....
    wert28=3434
    wert29=dasf

    ah habs selbst gefunden:The number of elements returned will be in $result[0][0]. If an @error occurs, no array is created.

    Einmal editiert, zuletzt von leviathan (7. Januar 2007 um 20:39)

  • UBound($Array) gibt den Index zurück. Da musst aber -1 machen, wenn du es in eine Schleife einarbeitest, da ein Index bei 0 anfängt!

  • OK, habe es jetzt irgendwie Allgemein gedacht. Aber meine Aussage stimmt bei Eigendimensionen :)