mh noch eine Frage kann man ein Array in ein listbox schicken also, die kompletten werte aus der .ini file [NoMove] and ein listelement?
hier nochmal die letzte version mit der nomovelistgui
Spoiler anzeigen
#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\"
;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
; 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
;gui about anfang
$gui_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("bugfix; 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)
;gui about ende
;gui nomovelist anfang
$gui_nomovelist = GUICreate("NoMoveList",299,263)
GUISetState(@sw_hide)
$add_nomovelist=GUICtrlCreateButton("Add",12,199,80,20,-1,-1)
$remove_nomovelist=GUICtrlCreateButton("Remove",111,200,80,20,-1,-1)
$input_nomovelist=GUICtrlCreateInput("",10,237,282,18,-1,-1)
$list_nomovelist=GUICtrlCreateCombo("",6,6,282,191,-1,-1)
;gui nomovelist ende
While 1
$msg = GUIGetMsg(1)
If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $gui_main Then ExitLoop ;main gui off EXIT
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] = $GUI_EVENT_CLOSE And $msg[1] = $gui_stats Then GUISetState(@SW_HIDE, $gui_stats) ;stats off
If $msg[0] = $help_stats And $msg[1] = $gui_main Then _stats() ;stats on
If $msg[0] = $nomovelistbutton AND $msg[1] = $gui_main Then GUISetState(@SW_Show, $gui_nomovelist) ;nomovelist on
If $msg[0] = $GUI_EVENT_CLOSE AND $msg[1] = $gui_nomovelist Then GUISetState(@SW_hide, $gui_nomovelist) ;nomovelist off
If $msg[0] = $muhbutton And $msg[1] = $gui_about Then MsgBox(0, "", "report any bugs to [email='geil.sandra@web.de'][/email]")
If $msg[0] = $help_about And $msg[1] = $gui_main Then GUISetState(@SW_Show, $gui_about) ;about on
If $msg[0] = $GUI_EVENT_CLOSE And $msg[1] = $gui_about Then GUISetState(@SW_HIDE, $gui_about) ;about off
WEnd
; Funktionen (eigene) ====================================================================================================================================
;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()
$arNoMove = IniReadSection($INIPfad, "NoMove")
$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
;Clear Anfang
Func _clear()
$arNoMove = IniReadSection($INIPfad, "NoMove")
$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 FileDelete($QuellPfad & $AllModFiles[$i])
Next
$counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")
$i = $counterclear + 1
IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", $i)
EndFunc
;Clear Ende
; 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
; nomovelist Anfag
Func _nomovelist()
$werteanzahl = IniReadSection($INIPfad, "NoMove")
$lastwertnumber = $werteanzahl[0][0]
MsgBox(64,"Anzahl", $lastwertnumber)
EndFunc
;nomovelist Ende