Move to Tray Icon

  • Hallo,
    Manche Programme kann man nach dem Programmstart zum Tray minimieren. Es existiert dann neben dem Minimieren, Maximieren und Schließen Symbol (oben rechts) zusätzlich noch ein Symbol mit einem Punkt. ist das auch bei Autoit möglich?

  • jup ist möglich hab ich hier bei diesem skript verwendet, ABER hier wird der minimieren Button verwendet, ich weiß nicht ob es möglich ist noch einen einzubauen

    Spoiler anzeigen
    [autoit]


    #include <GUIConstants.au3>
    #include <Constants.au3>
    #include <file.au3>
    #include <Array.au3>
    #include <GuiHyperLink.au3>
    #include <Events.au3>
    FileInstall("C:\Dokumente und Einstellungen\Administrator\Desktop\modmove\modmove.jpg", @TempDir & "\modmove.jpg", 1)
    FileInstall("C:\Dokumente und Einstellungen\Administrator\Desktop\modmove\modmove.ico", @TempDir & "\modmove.ico", 1)
    ;#NoTrayIcon
    Opt("GUIEventOptions", 1)
    TraySetIcon(@Tempdir & "\modmove.ico")
    Opt("TrayIconHide", 1)
    Opt("TrayOnEventMode",1)
    Opt("TrayMenuMode",1)

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

    $runcod2 = TrayCreateItem("Run CoD2MP")
    TrayItemSetOnEvent(-1,"runcod2mp")
    $seperator1 = TrayCreateItem("")
    $move = TrayCreateItem("Move Em")
    TrayItemSetOnEvent(-3,"MoveEmEvent")
    $moveback = TrayCreateItem("Move Em back")
    TrayItemSetOnEvent(-4,"MoveEmbackEvent")
    $clear = TrayCreateItem("Clear main")
    TrayItemSetOnEvent(-5,"clearem")
    $deltmp = TrayCreateItem("Delete .tmp-files")
    TrayItemSetOnEvent(-6,"deletetmp")
    $seperator1 = TrayCreateItem("")
    $show = TrayCreateItem("Show")
    TrayItemSetOnEvent(-8,"ShowEvent")
    $seperator1 = TrayCreateItem("")
    $exit = TrayCreateItem("Exit")
    TrayItemSetOnEvent(-9,"ExitEvent")
    Func ExitEvent()
    Exit
    EndFunc
    Func ShowEvent()
    GUISetState(@sw_show, $gui_main)
    Opt("TrayIconHide", 1)
    EndFunc
    Func MoveEmEvent()
    _movemods()
    EndFunc
    Func MoveEmbackEvent()
    _movemodsback()
    EndFunc
    Func clearem()
    _clear()
    EndFunc
    Func deletetmp()
    _deletetmpfiles()
    EndFunc
    Func runcod2mp()
    $cod2folder = StringTrimRight($filepath, 5)
    ;msgbox(1,"dfsdaf",$cod2folder)
    If $language = "eng" Then
    run($cod2folder & "CoD2MP_s.exe", $cod2folder)
    Else
    run($cod2folder & "Call of Duty 2 Mehrspieler.exe", $cod2folder)
    EndIf
    EndFunc
    ;Firstrun
    $firstrun = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "no")
    If $firstrun = "no" then
    $hwnd = GUICreate("",269,64,-1,-1,$WS_POPUP,$WS_EX_TOOLWINDOW)
    GUICtrlCreatePic(@Tempdir & "\modmove.jpg",0,0,269,64)
    DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $hwnd, "int", 3000, "long", 0x00080000 );fade-in
    sleep(1000)
    GUISetState(@sw_hide, $hwnd)
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "firstrun", "yes")
    EndIf

    ;Hyperlinks:
    Local $customaddbutton[16]
    Local $item[30]
    Local $hl_ctrl[3], $btn_font, $btn_link, $toggle_font = False, $toggle_link = False
    Local $Links[3] = ["http://www.autoit.de", "http://www.codjumper.com", "http://www.leviathan-design.de"]
    Local $Link_On[3] = ["German AutoIt Community", "Codjumper.com", "leviathan-design.de"]

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

    ;Variablen werden gelesen:
    $jumpermodestatus = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "Off")
    $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\"
    $werteanzahl = IniReadSection(@ScriptDir & "\modmove.ini", "NoMoveCustom")
    $lastwertnumber = $werteanzahl[0][0]
    ;nomovecustom vars:
    ;_setdata_input_nomovecustom()
    ;_iniread_input_nomovecustom()
    $var1 = IniRead($INIPfad, "NoMoveCustom", "wert1", "notset")
    $var2 = IniRead($INIPfad, "NoMoveCustom", "wert2", "notset")
    $var3 = IniRead($INIPfad, "NoMoveCustom", "wert3", "notset")
    $var4 = IniRead($INIPfad, "NoMoveCustom", "wert4", "notset")
    $var5 = IniRead($INIPfad, "NoMoveCustom", "wert5", "notset")
    $var6 = IniRead($INIPfad, "NoMoveCustom", "wert6", "notset")
    $var7 = IniRead($INIPfad, "NoMoveCustom", "wert7", "notset")
    $var8 = IniRead($INIPfad, "NoMoveCustom", "wert8", "notset")
    $var9 = IniRead($INIPfad, "NoMoveCustom", "wert9", "notset")
    $var10 = IniRead($INIPfad, "NoMoveCustom", "wert10", "notset")
    $var11 = IniRead($INIPfad, "NoMoveCustom", "wert11", "notset")
    $var12 = IniRead($INIPfad, "NoMoveCustom", "wert12", "notset")
    $var13 = IniRead($INIPfad, "NoMoveCustom", "wert13", "notset")
    $var14 = IniRead($INIPfad, "NoMoveCustom", "wert14", "notset")
    $var15 = IniRead($INIPfad, "NoMoveCustom", "wert15", "notset")
    ;Anzahl der NoMoveCustomDatein
    $arNoMoveCustom = IniReadSection($INIPfad, "NoMoveCustom")
    For $k = 1 To $arNoMoveCustom[0][0]
    If $arNoMoveCustom[$k][1] = "notset" Then
    $lastwertnumber = $lastwertnumber - 1
    EndIf
    Next
    ;==>
    ;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
    $gui_main = GUICreate("moDMove 3.0 by lev", 269, 200)
    GUISetState(@SW_SHOW)
    GUISetIcon(@TempDir & "\modmove.ico")
    $logo = GUICtrlCreatePic(@TempDir & "\modmove.jpg", 0, 0, 269, 64, -1, -1)
    ;$bgpic = GUICtrlCreatePic("F:\Call of Duty 2\main\modmovebg.jpg", 0,0, 269, 126, -1, -1)
    $menu_options = GUICtrlCreateMenu("Options", -1, 0)
    $menu_options_options = GUICtrlCreateMenuitem("Config", $menu_options, 12)
    $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)
    $deletetmpfilesbutton = GUICtrlCreateButton("Del *.tmp", 5, 140, 100, 20, -1, -1)
    $nomoveshowlabel = GUICtrlCreateLabel("NoMove: " & $lastwertnumber & " files", 5, 166, 90, 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", 122, 135, 140, 24, -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)
    $hl_ctrl[0] = _GuiCtrlHyperLinkCreate ($gui_about, _
    "leviathan-design.de", _
    $Links[2], $Link_On[2], _
    20, 116, 122, 44, -1, -1)

    $hl_ctrl[1] = _GuiCtrlHyperLinkCreate ($gui_about, _
    "German AutoIt Community", _
    $Links[0], $Link_On[0], _
    20, 130, 101, 14, -1, -1)

    $hl_ctrl[2] = _GuiCtrlHyperLinkCreate ($gui_about, _
    "Codjumper.com", _
    $Links[1], $Link_On[1], _
    20, 144, 108, 14, -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("NoMove-List",229,371)
    GUISetState(@sw_hide)
    GUISetIcon(@TempDir & "\modmove.ico")
    $customlabel1=GUICtrlCreateLabel("Add here your own files; type in the filename"&@CRLF&"and klick on +-Button", 5, 5)
    $custominput1=GUICtrlCreateInput($var1,10,40,150,16,-1,-1)
    $customaddbutton[1]=GUICtrlCreateButton("+",170,40,42,16,-1,-1)
    $custominput2=GUICtrlCreateInput($var2,10,60,150,16,-1,-1)
    $customaddbutton[2]=GUICtrlCreateButton("+",170,60,42,16,-1,-1)
    $custominput3=GUICtrlCreateInput($var3,10,80,150,16,-1,-1)
    $customaddbutton[3]=GUICtrlCreateButton("+",170,80,42,16,-1,-1)
    $custominput4=GUICtrlCreateInput($var4,10,100,150,16,-1,-1)
    $customaddbutton[4]=GUICtrlCreateButton("+",170,100,42,16,-1,-1)
    $custominput5=GUICtrlCreateInput($var5,10,120,150,16,-1,-1)
    $customaddbutton[5]=GUICtrlCreateButton("+",170,120,42,16,-1,-1)
    $custominput6=GUICtrlCreateInput($var6,10,140,150,16,-1,-1)
    $customaddbutton[6]=GUICtrlCreateButton("+",170,140,42,16,-1,-1)
    $custominput7=GUICtrlCreateInput($var7,10,160,150,16,-1,-1)
    $customaddbutton[7]=GUICtrlCreateButton("+",170,160,42,16,-1,-1)
    $custominput8=GUICtrlCreateInput($var8,10,180,150,16,-1,-1)
    $customaddbutton[8]=GUICtrlCreateButton("+",170,180,42,16,-1,-1)
    $custominput9=GUICtrlCreateInput($var9,10,200,150,16,-1,-1)
    $customaddbutton[9]=GUICtrlCreateButton("+",170,200,42,16,-1,-1)
    $custominput10=GUICtrlCreateInput($var10,10,220,150,16,-1,-1)
    $customaddbutton[10]=GUICtrlCreateButton("+",170,220,42,16,-1,-1)
    $custominput11=GUICtrlCreateInput($var11,10,240,150,16,-1,-1)
    $customaddbutton[11]=GUICtrlCreateButton("+",170,240,42,16,-1,-1)
    $custominput12=GUICtrlCreateInput($var12,10,260,150,16,-1,-1)
    $customaddbutton[12]=GUICtrlCreateButton("+",170,260,42,16,-1,-1)
    $custominput13=GUICtrlCreateInput($var13,10,280,150,16,-1,-1)
    $customaddbutton[13]=GUICtrlCreateButton("+",170,280,42,16,-1,-1)
    $custominput14=GUICtrlCreateInput($var14,10,300,150,16,-1,-1)
    $customaddbutton[14]=GUICtrlCreateButton("+",170,300,42,16,-1,-1)
    $custominput15=GUICtrlCreateInput($var15,10,320,150,16,-1,-1)
    $customaddbutton[15]=GUICtrlCreateButton("+",170,320,42,16,-1,-1)
    $customlabe2=GUICtrlCreateLabel("To delete a file use notset as filename"&@CRLF&" and then klick the +-Button", 5, 340)
    ;nomovecustom vars:
    _setdata_input_nomovecustom()
    ;gui nomovelist ende
    ; options anfang
    $gui_options = GUICreate("Options", 300,300)
    GUISetState(@sw_hide)
    GUISetIcon(@TempDir & "\modmove.ico")
    $grp_language=GUICtrlCreateGroup("language",10,7,260,60,-1,-1)
    $language_ger_button=GUICtrlCreateButton("GER",23,25,80,20,-1,-1)
    $language_eng_button=GUICtrlCreateButton("ENG",140,25,80,20,-1,-1)
    $languageshowlabel=GUICtrlCreateLabel("language is set to: " & $languagefilename,23,49,158,16,-1,-1)
    $grp_mainfolder=GUICtrlCreateGroup("path to mainfolder",10,74,260,79,-1,-1)
    $input_pathmainfolder=GUICtrlCreateInput($filepath,18,91,249,18,-1,-1)
    $pathtomainfolder_set_button=GUICtrlCreateButton("Set!!",23,120,80,20,-1,-1)
    $pathtomainfolderwarninglabel=GUICtrlCreateLabel("Do NOT forget the \ at the end of the path!!!!!!!!!",124,115,132,28,-1,-1)
    $grp_jumpermode=GUICtrlCreateGroup("Jumpermode",10,160,260,69,-1,-1)
    $jumpermode_label=GUICtrlCreateLabel("jumpermode is " & $jumpermodestatus,21,182,238,19,-1,-1)
    $jumpermode_on_button=GUICtrlCreateButton("On",23,203,80,20,-1,-1)
    $jumpermode_off_button=GUICtrlCreateButton("Off",140,202,80,20,-1,-1)
    $plsreadins_label=GUICtrlCreateLabel("Please READ the instructions!",10,241,151,16,-1,-1)
    $options_reset_button=GUICtrlCreateButton("Reset",23,271,80,20,-1,-1)
    $resetlabel=GUICtrlCreateLabel("Will reset all options to default.",117,265,136,29,-1,-1)
    ;options 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] = $clearmainbutton AND $msg[1] = $gui_main Then _clear()
    If $msg[0] = $deletetmpfilesbutton AND $msg[1] = $gui_main Then _deletetmpfiles()
    If $msg[0] = $GUI_EVENT_MINIMIZE AND $msg[1] = $gui_main Then
    GUISetState(@sw_hide, $gui_main)
    GUISetState(@sw_hide, $gui_about)
    GUISetState(@sw_hide, $gui_stats)
    GUISetState(@sw_hide, $gui_nomovelist)
    GUISetState(@sw_hide, $gui_options)
    Opt("TrayIconHide", 0)
    EndIf

    ;options
    If $msg[0] = $menu_options_options AND $msg[1] = $gui_main Then GUISetState(@sw_show, $gui_options) ;options on
    If $msg[0] = $GUI_EVENT_CLOSE AND $msg[1] = $gui_options Then GUISetState(@sw_hide, $gui_options) ; options off
    If $msg[0] = $jumpermode_on_button AND $msg[1] = $gui_options Then _jumpermodeon()
    If $msg[0] = $jumpermode_off_button AND $msg[1] = $gui_options Then _jumpermodeoff()
    If $msg[0] = $language_ger_button AND $msg[1] = $gui_options Then _languageSetger()
    If $msg[0] = $language_eng_button AND $msg[1] = $gui_options Then _languageSeteng()
    If $msg[0] = $pathtomainfolder_set_button AND $msg[1] = $gui_options Then _pathtomainfolder()
    If $msg[0] = $options_reset_button AND $msg[1] = $gui_options Then _resetoptions()

    ;stats
    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

    ;nomovelist alpha stage
    For $lNum = 1 to 15
    If $msg[0] = $customaddbutton[$lNum] AND $msg[1] = $gui_nomovelist Then _nomovelist()
    Next
    If $msg[0] = $nomovelistbutton AND $msg[1] = $gui_main Then GUISetState(@sw_show, $gui_nomovelist) ;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

    ;about (links dont work)
    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()
    _language()
    FileMove($ZielPfad & "*.iwd", $QuellPfad, 1)
    $icounterback = $counterback + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "countermoveback", $icounterback)
    GUICtrlSetData($moveembackamountlabel, $icounterback)
    EndFunc ;==>_movemodsback
    ; Moveback Ende
    ; Move Anfang
    Func _movemods()
    _language()
    $devmapsaveposmod = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "no")
    $arNoMoveCustom = IniReadSection($INIPfad, "NoMoveCustom")
    $arNoMove = IniReadSection($INIPfad, "NoMove")
    $AllModFiles = _FileListToArray($QuellPfad, "*.iwd")
    For $i = 1 To $AllModFiles[0]
    For $k = 1 To $arNoMoveCustom[0][0]
    ;Custom Dateien markieren, die nicht verschoben werden sollen
    If $AllModFiles[$i] = $arNoMoveCustom[$k][1] Then $AllModFiles[$i] &= "|"
    Next
    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 = "On"
    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)
    GUICtrlSetData($moveemwithjoamountlabel, $iextra)
    Case Else
    ;counting the amount of movements
    $icounter = $counter + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counter", $icounter)
    GUICtrlSetData($movemamountlabel, $icounter)

    EndSelect
    EndFunc ;==>_movemods
    ;Move Ende

    ;Clear Anfang
    Func _clear()
    _language()
    $devmapsaveposmod = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "no")
    $arNoMoveCustom = IniReadSection($INIPfad, "NoMoveCustom")
    $arNoMove = IniReadSection($INIPfad, "NoMove")
    $AllModFiles = _FileListToArray($QuellPfad, "*.iwd")
    If $devmapsaveposmod = "On" Then
    DirCreate($filepath & "procteted_files")
    FileMove($filepath & "modmove\zzz_Save_position_mod_V1.0.iwd", $filepath & "procteted_files")
    FileMove($filepath & "modmove\zzz_999_nades.iwd", $filepath & "procteted_files")
    EndIf
    For $i = 1 To $AllModFiles[0]
    For $k = 1 To $arNoMoveCustom[0][0]
    ;Custom Dateien markieren, die nicht verschoben werden sollen
    If $AllModFiles[$i] = $arNoMoveCustom[$k][1] Then $AllModFiles[$i] &= "|"
    Next
    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], $QuellPfad)
    Next
    $counterclear = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", "0")
    $i = $counterclear + 1
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "counterclear", $i)
    GUICtrlSetData($clearmainfolderamountlabel, $i)
    If $devmapsaveposmod = "On" Then
    FileMove($filepath & "procteted_files\zzz_Save_position_mod_V1.0.iwd", $filepath, 1)
    FileMove($filepath & "procteted_files\zzz_999_nades.iwd", $filepath, 1)
    DirRemove($filepath & "procteted_files", 1)
    EndIf
    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

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

    ; nomovelist Anfag
    Func _iniread_input_nomovecustom()
    Dim $INIPfad = @ScriptDir & "\modmove.ini"
    $var1 = IniRead($INIPfad, "NoMoveCustom", "wert1", "notset")
    $var2 = IniRead($INIPfad, "NoMoveCustom", "wert2", "notset")
    $var3 = IniRead($INIPfad, "NoMoveCustom", "wert3", "notset")
    $var4 = IniRead($INIPfad, "NoMoveCustom", "wert4", "notset")
    $var5 = IniRead($INIPfad, "NoMoveCustom", "wert5", "notset")
    $var6 = IniRead($INIPfad, "NoMoveCustom", "wert6", "notset")
    $var7 = IniRead($INIPfad, "NoMoveCustom", "wert7", "notset")
    $var8 = IniRead($INIPfad, "NoMoveCustom", "wert8", "notset")
    $var9 = IniRead($INIPfad, "NoMoveCustom", "wert9", "notset")
    $var10 = IniRead($INIPfad, "NoMoveCustom", "wert10", "notset")
    $var11 = IniRead($INIPfad, "NoMoveCustom", "wert11", "notset")
    $var12 = IniRead($INIPfad, "NoMoveCustom", "wert12", "notset")
    $var13 = IniRead($INIPfad, "NoMoveCustom", "wert13", "notset")
    $var14 = IniRead($INIPfad, "NoMoveCustom", "wert14", "notset")
    $var15 = IniRead($INIPfad, "NoMoveCustom", "wert15", "notset")
    EndFunc
    Func _nomovelist()
    ;GUISetState(@sw_hide, $gui_nomovelist)
    $var1 = GUICtrlRead($custominput1)
    $var2 = GUICtrlRead($custominput2)
    $var3 = GUICtrlRead($custominput3)
    $var4 = GUICtrlRead($custominput4)
    $var5 = GUICtrlRead($custominput5)
    $var6 = GUICtrlRead($custominput6)
    $var7 = GUICtrlRead($custominput7)
    $var8 = GUICtrlRead($custominput8)
    $var9 = GUICtrlRead($custominput9)
    $var10 = GUICtrlRead($custominput10)
    $var11 = GUICtrlRead($custominput11)
    $var12 = GUICtrlRead($custominput12)
    $var13 = GUICtrlRead($custominput13)
    $var14 = GUICtrlRead($custominput14)
    $var15 = GUICtrlRead($custominput15)
    IniWrite($INIPfad, "NoMoveCustom", "wert1", $var1)
    IniWrite($INIPfad, "NoMoveCustom", "wert2", $var2)
    IniWrite($INIPfad, "NoMoveCustom", "wert3", $var3)
    IniWrite($INIPfad, "NoMoveCustom", "wert4", $var4)
    IniWrite($INIPfad, "NoMoveCustom", "wert5", $var5)
    IniWrite($INIPfad, "NoMoveCustom", "wert6", $var6)
    IniWrite($INIPfad, "NoMoveCustom", "wert7", $var7)
    IniWrite($INIPfad, "NoMoveCustom", "wert8", $var8)
    IniWrite($INIPfad, "NoMoveCustom", "wert9", $var9)
    IniWrite($INIPfad, "NoMoveCustom", "wert10", $var10)
    IniWrite($INIPfad, "NoMoveCustom", "wert11", $var11)
    IniWrite($INIPfad, "NoMoveCustom", "wert12", $var12)
    IniWrite($INIPfad, "NoMoveCustom", "wert13", $var13)
    IniWrite($INIPfad, "NoMoveCustom", "wert14", $var14)
    IniWrite($INIPfad, "NoMoveCustom", "wert15", $var15)
    _setdata_input_nomovecustom()
    EndFunc
    Func _setdata_input_nomovecustom()
    GUICtrlSetData($custominput1, $var1)
    GUICtrlSetData($custominput2, $var2)
    GUICtrlSetData($custominput3, $var3)
    GUICtrlSetData($custominput4, $var4)
    GUICtrlSetData($custominput5, $var5)
    GUICtrlSetData($custominput6, $var6)
    GUICtrlSetData($custominput7, $var7)
    GUICtrlSetData($custominput8, $var8)
    GUICtrlSetData($custominput9, $var9)
    GUICtrlSetData($custominput10, $var10)
    GUICtrlSetData($custominput11, $var11)
    GUICtrlSetData($custominput12, $var12)
    GUICtrlSetData($custominput13, $var13)
    GUICtrlSetData($custominput14, $var14)
    GUICtrlSetData($custominput15, $var15)
    EndFunc
    Func _nomovelist_old()
    GUISetState(@SW_show, $gui_nomovelist)
    $werteanzahl = IniReadSection($INIPfad, "NoMoveCustom")
    ;$lastwertnumber = $werteanzahl[0][0]
    ;MsgBox(64,"Anzahl", $lastwertnumber)

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

    Global $tmp

    For $i = 0 To $werteanzahl[0][0]
    If $werteanzahl[$i][1] = "notset" Then
    ExitLoop
    Else
    $tmp &= "|" & $werteanzahl[$i][1]
    EndIf
    Next
    GUICtrlSetData($list_nomovelist, $tmp)

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

    ;GUICtrlSetData(-1,"item2|item3","item3")
    ;$arNoMoveCustom = IniReadSection(@Scriptdir & "\modmove.ini", "NoMoveCustom")
    ;_ArraySort($arNoMoveCustom, 1, 1,$lastwertnumber)
    ;Next
    EndFunc ;==>_nomovelist
    ;nomovelist Ende
    ;===================Options=============================
    ; jumpermode
    Func _jumpermodeon()
    IniWrite(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "On")
    $jumpermodestatus = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "Off")
    GUICtrlSetData($jumpermode_label,"jumpermode is " & $jumpermodestatus)
    ENDFunc ;==> _jumpermodon
    Func _jumpermodeoff()
    IniWrite(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "Off")
    $jumpermodestatus = IniRead(@ScriptDir & "\modmove.ini", "Extra", "devmapsavemod", "Off")
    GUICtrlSetData($jumpermode_label,"jumpermode is " & $jumpermodestatus)
    ENDFunc ;==> _jumpermodoff
    ; jumpermode end
    ;languageoptions on
    Func _languageSetger()
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "language", "ger")
    $language = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "language", "eng")
    $languagefilename = "german"
    GUICtrlSetData($languageshowlabel, "language is set to: " & $languagefilename)
    _language()
    EndFunc
    Func _languageSeteng()
    IniWrite(@ScriptDir & "\modmove.ini", "Programminfo", "language", "eng")
    $language = IniRead(@ScriptDir & "\modmove.ini", "Programminfo", "language", "eng")
    $languagefilename = "english"
    GUICtrlSetData($languageshowlabel, "language is set to: " & $languagefilename)
    _language()
    EndFunc
    ;language options off
    ;path to mainfolder
    Func _pathtomainfolder()
    $varpath = GUICtrlRead($input_pathmainfolder)
    IniWrite(@ScriptDir & "\modmove.ini", "Folder", "filepath", $varpath)
    GUICtrlSetData($input_pathmainfolder,$varpath) ; unötig da sich der Wert durch auslesen ja nicht ändert
    $filepath = $varpath
    EndFunc
    ;path to main folder \
    ;resets the options to default
    Func _resetoptions()
    $varpath = "F:\Call of Duty 2\main\"
    $filepath = $varpath
    IniWrite(@ScriptDir & "\modmove.ini", "Folder", "filepath", "F:\Call of Duty 2\main\")
    GUICtrlSetData($input_pathmainfolder,$varpath)
    _languageSeteng()
    $jumpermodestatus = "Off"
    ;Resets NoMoveCustoms List
    ;$arNoMoveCustom = IniReadSection($INIPfad, "NoMoveCustom")
    ;For $k = 1 To $arNoMoveCustom[0][0]
    ; ;$arNoMoveCustom[$k][1] = "notset"
    ; IniWrite(@ScriptDir & "\modmove.ini", "NoMoveCustom", "wert" & $k, "notset")
    ;Next
    EndFunc
    ; delete tmp files
    Func _deletetmpfiles()
    FileDelete($QuellPfad & "*.tmp")
    EndFunc

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

    wenn man es minimiert dann wird es in den tray gesetzt probiers mal aus

    hier mal rausgeschrieben:

    [autoit]


    Opt("TrayIconHide", 1) ; verstecken des Trayicons
    Opt("GUIEventOptions", 1) ;zum belegen der Minimieren und Schließen und Maximieren Buttons einer GUI

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

    If $msg[0] = $GUI_EVENT_MINIMIZE AND $msg[1] = $gui_main Then
    GUISetState(@sw_hide, $gui_main) ; Fenster unsichtbar und wegmachen
    Opt("TrayIconHide", 0)

    [/autoit]

    dann noch ein Traymenu erzeugen (schaue Hilfedatei) und fertsch

    3 Mal editiert, zuletzt von leviathan (14. April 2007 um 15:28)

  • genau das möchte ich ja, das da zusätzlich noch ein Button zu sehen ist.
    aber danke trotzdem