1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. sc4ry

Beiträge von sc4ry

  • Fehler ausgeben

    • sc4ry
    • 2. September 2008 um 16:55

    Hiho,

    schonmal danke an alle die geholfen haben ...
    da ich aktuell das problem beim _ProgressCreate hatte, dass dies auch nicht funktioniert hat, wg des obfuscators (wie sich dann herausstellte), habe ich dies bei den tools auch mal deaktiviert.
    siehe da, sie laufen alle durch.

    das ganze muss ich jetzt erstmal weiter austesten, obs wirklich am obfuscator lag, aber ich habe 3 tools dabei, welche mit pw arbeiten und die ich definitiv mit dem obfuscator "behandeln" möchte.
    mal gucken ob ichs schaffe, bzw komm ich nochmal darauf zurück *g*

  • Fehler ausgeben

    • sc4ry
    • 2. September 2008 um 10:07

    mein problem ist, dass programme von mir, die automatisch mit windows gestartet werden, mit einem fehler abbrechen.
    starte ich die programme aber von hand irgendwann nach dem booten, laufen sie problemlos.

    heisst (für mich): theoretisch sind die programme in ordnung/ lauffähig, aber irgednwas beim systemstart bringt die programme zum abstürtzen (vllt ein nicht geladener dienst o.ä.)

    filewritelog müsste ich dann in den code quasi nach jeder zeile einbauen, oder?

  • Fehler ausgeben

    • sc4ry
    • 2. September 2008 um 09:07

    wenn du mir sagst, welcher dienst das ist, mache ich das sofort ;)

    hab mir schon überlegt, nen einfachen sleep einzubauen, aber das behebt das problem ja nicht in allen fällen, von daher würde ich gerne wissen, wodran es wirklich liegt.
    hab übrigens heute mal alle dateien gleichzeit direkt durch windows autostarten lassen ... sind alle mit array-fehler abgebrochen.

    schon sehr strange irgendwie.

  • Fehler ausgeben

    • sc4ry
    • 1. September 2008 um 22:54

    Hiho,

    wie schon im chat heute geschrieben, habe ich etwas komplizierte probs mit einigen scripten, die nach dem booten ausgeführt werden sollen. die fehlermeldungen verweisen auf ein array-problem, führe ich die dateien jedoch von hand (später) aus, klappt alles einwandfrei.

    tip aus dem chat war, dass evtl ein dienst noch nicht verfügbar ist.

    das blöde ist nur, um zu testen was nicht geht müssen die programme zwingend beim booten ausgeführt werden, also nicht als au3 möglich (außer als verknüpfung, bringt mir aber auch nix, da trayicondebug dann auch nicht funzt).

    kann ich mir eine detaillierte fehlerbeschreibung in ein file ausgeben lassen und endlich dem fehler auf die schliche zu kommen?
    für tips zu eine detaillierten fehlerausgabe wäre ich seeeeeeeeehr dankbar ;)

  • Progressbar mit GDIplus

    • sc4ry
    • 29. August 2008 um 16:26

    Hallo, mir ist leider noch was aufgefallen.

    Die UDF läuft leider nicht, wenn man das Script Obfuscated. Wenn ich das richtig recherchiert habe, liegt dies in erster Linie an der "create"-funktion (bin mir nicht 100%tig sicher).
    vllt könnte das jmd mal ausprobieren und dies bestätigen, wiederlegen.

    sobald ich das script obfuscate kommt folgender fehler:

    ---------------------------
    AutoIt Error
    ---------------------------
    Line -1:


    Error: Badly formatted "Func" statement.
    ---------------------------
    OK
    ---------------------------

  • Einträge unter Software entfernen

    • sc4ry
    • 29. August 2008 um 15:24

    ccleaner nutze ich schon einige zeit, aber bis jetzt nur zum aufräumen, das mit software umbennen entfernen war mir nicht bekannt =)

  • Einträge unter Software entfernen

    • sc4ry
    • 29. August 2008 um 09:51

    geil, das geht ja echt, ... umbenennen oder eintrag entfernen.
    klasse, das auch n super tip ;) thx

  • Einträge unter Software entfernen

    • sc4ry
    • 29. August 2008 um 09:26

    danke oliverh,

    in den besagten schlüsseln befindet sich je ein eintrag "UninstallString" ... der wird für "Software" benötigt.
    ich habe den string einfach umbenannt und die einträge sind aus software verschwunden ... ansonsten scheinen die aber noch normal zu laufen ... also nix gefährlich *hehe*

    so kann mich dann später auch keiner anmeckern ;)

  • IRC Client mit dcc funktion

    • sc4ry
    • 28. August 2008 um 14:40

    Hiho,

    funzt dein teil jetzt mit dcc-send und dcc-get, oder wie seh ich das?
    sowas würde ich auch gerne machen, mit den tut von "weissleidergradnimmerwerswar" wäre das ganz cool.

    wie schauts denn mit ssl und fish support aus ? ;)

  • Gui-Hile: minimieren Button soll Gui "verstecken"

    • sc4ry
    • 28. August 2008 um 10:18

    thx, das wars *g*

  • Einträge unter Software entfernen

    • sc4ry
    • 28. August 2008 um 09:55

    Hallo,

    ich habe einige Tools auf dem Arbeitsrechner, die einen Eintrag unter "Software" (Systemsteuerung) erstellt haben.
    das ganze ist natürlich normal, aber wenn da mal einer guckt, wäre es schon, wenn da nix stehen würde.

    kann mir wer sagen, wie ich die einträge da entfernen kann, die tools aber weiter auf dem pc sind?

    danke schonmal.

    das ganze mache ich von hand, also keine autoit-frage *g*

  • Gui-Hile: minimieren Button soll Gui "verstecken"

    • sc4ry
    • 28. August 2008 um 08:47

    Hiho,

    ich habe ein Tool, dass nur im Systray sichtbar sein soll. ein Klick auf das Symbol öffnet das GUI zum Tool.
    das GUI soll eigentlich nicht in der Taskleiste erscheinen, es ist aber nicht weiter schlimm, falls es das doch
    tun sollte.

    Wichtig für mich ist, dass man das GUI mit der Maus wieder verstecken kann. Eigentlich gibt es ja dazu
    den Unterstrich oben rechts beim X ... wobei dabei das Fenster nur minimiert wird. wenn ich nun also den
    Style auswähle, damit oben der _ erscheint, wird automatisch auch ein Fenster in der Taskleiste erstellt.
    wie gesagt, nicht weiter schlimm, nun soll das Fenster aber versteckt, und nicht minimiert werden, wenn
    der _ gedrückt wird. Ist das möglich oder gibts irgendwie andere ideen, dass zu realisieren?

    anbei mein GUI:

    [autoit]

    $Form1_1 = GUICreate($Title, 510, 301, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU ,$DS_SETFOREGROUND), $WS_EX_TOPMOST)

    [/autoit]

    Hier komplettes Script:

    Spoiler anzeigen
    Zitat

    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=..\_Icons\bitch.ico
    #AutoIt3Wrapper_Run_Obfuscator=y
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    ; neue Funktionen
    ; Fenster in Tray minimieren -> sample_Win2Tray.au3!
    ; kontextmenüeintrag in der taskleiste -> RegHack?
    ; verschieben in taskleiste/systray -> Taskbar_UDF?/ Systray_UDF!
    ; Tray-Icons verstecken -> Systray_UDF!

    ;-----------------------------------------------------------------------------
    ; Includes
    ;-----------------------------------------------------------------------------

    ;~ #include <SysTray_UDF.au3>
    #include <WinAPI.au3>
    #include <Array.au3>
    #include <Process.au3>
    #include <File.au3>
    #include <GUIConstants.au3>
    #Include <GuiListView.au3>
    #include <GuiConstantsEx.au3>
    #Include <GuiEdit.au3>
    #Include <GuiMenu.au3>
    #Include <GuiTab.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>
    #include <ButtonConstants.au3>
    #include <SliderConstants.au3>
    #include <Constants.au3>

    ;-----------------------------------------------------------------------------
    ; 1 Instance
    ;-----------------------------------------------------------------------------

    If _Singleton(@ScriptName, 1) = 0 Then
    Msgbox(16,"Warning","An occurence is already running", 10)
    Exit
    EndIf

    ;-----------------------------------------------------------------------------
    ; Options
    ;-----------------------------------------------------------------------------

    Opt("GUIOnEventMode", 1)
    Opt("WinTitleMatchMode", 2)
    Opt("OnExitFunc", "_OnExitFunc")
    Opt("GUICloseOnESC", 0)
    Opt("MustDeclareVars", 0)

    Opt("TrayMenuMode",1)
    Opt("TrayOnEventMode",1)
    TraySetClick(8)

    ;-----------------------------------------------------------------------------
    ; Variablen
    ;-----------------------------------------------------------------------------

    Global $ini = @scriptdir & "\Settings.ini"
    Global $iniTop = @scriptdir & "\Window_Top.ini"
    Global $iniTray = @scriptdir & "\Window_Tray.ini"
    Global $iniHide = @scriptdir & "\Window_Hide.ini"
    Global $iniTTI = @scriptdir & "\Window_TTi.ini"
    Global $iniTrans = @scriptdir & "\Window_Trans.ini"
    Global $iniMove = @scriptdir & "\Window_Move.ini"

    Global $WinList, $var2, $tInfo, $ListView1, $B_DESCENDING, $HowToSort, $DoubleAction = "do Nothing";, $TRAY_EVENT_PRIMARYDOWN, $WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $TBS_BOTTOM, $TBS_VERT, $WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE, $WM_NOTIFY, $WS_EX_TRANSPARENT, $TBS_TOP, $GWL_EXSTYLE, $Style,$WS_EX_LAYERED, $NM_DBLCLK, $NM_DBLCLK
    Global $transwins, $wins, $Transparency, $i_transcolor, $Window, $Window_Trans, $WinGetHandle, $opt1, $opt2, $Position, $WinGetTitle, $ProcessName, $WinPos
    Global $ToogleTray = 0

    Global $Title = "Window Management DeluxXx Edition V++"

    $dll = DllOpen("user32.dll")

    If IniRead($ini, "Settings", "Show Tray-Icon on Start", "1") <> 1 Then Opt("TrayIconHide", 1)
    If IniRead($ini, "Settings", "Enable Hotkeys on Start", "1") <> 1 Then
    Global $HotKeySet = False
    Else
    HotKeySet("{F9}","_HKToggleTop") ;set active window on top or back
    HotKeySet("{F10}", "_HKToogleTrans") ;set trans to window or back
    HotKeySet("{F7}", "_HKWindowHide") ;hide window
    HotKeySet("^!{F7}", "_AllWindowHideBack") ;set hide back on all windows
    HotKeySet("{F8}", "_HKWindowTray") ;hide window to tray
    HotKeySet("^!{F8}", "_AllWindowTrayBack") ;set hide to tray back on all windows
    HotKeySet("!^{INS}", "_HKWindowTransNoClick") ;set immun to window
    HotKeySet("!{INS}", "_AllWindowTransNoClickBack") ;set immun back on all windows

    HotKeySet("!{PGUP}", "_TransPlus") ;set window-trans +10
    HotKeySet("!{PGDN}", "_TransMinus") ;set window-trans -10

    HotKeySet("!{UP}", "_HKMoveWindowUP") ;move active window to top
    HotKeySet("!{DOWN}", "_HKMoveWindowDOWN") ;move active window to bottom
    HotKeySet("!{LEFT}", "_HKMoveWindowLEFT") ;move active window to left
    HotKeySet("!{RIGHT}", "_HKMoveWindowRIGHT") ;move active window to right
    HotKeySet("!^{F9}", "_HKMoveWindowMax") ;maximize active window

    HotKeySet("{F11}","_ExploreVertical") ;show 2 vertical explorer windows
    HotKeySet("!{F11}","_ExploreHorizontal") ;show 2 horizontal explorer windows
    HotKeySet("!^s","_ToogleHiddenFiles") ;show/hide hidden filesGlobal $HotKeySet = False
    Global $HotKeySet = True
    EndIf
    If IniRead($ini, "Settings", "Update Window List", "4") = 1 Then AdlibEnable("_UpdateListView", IniRead($ini, "Update Window List", "every Sec.", 10) * 1000)
    If IniRead($ini, "Settings", "Enable automatic Sort", "4") = 1 Then $HowToSort = IniRead($ini, "Sort", "Method", "don´t Sort")
    If IniRead($ini, "Settings", "Action for double-click on Item", "4") = 1 Then $DoubleAction = IniRead($ini, "Action", "Double-Click", "do Nothing")

    ;-----------------------------------------------------------------------------
    ; TrayMenü
    ;-----------------------------------------------------------------------------

    TraySetToolTip($Title)
    TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "_TrayLClick")
    ;TraySetOnEvent($TRAY_EVENT_SecondaryDOWN, "_TrayRClick")

    $TrayMenu1 = TrayCreateMenu("Corner")
    $TrayItem1 = TrayCreateItem("Left Top", $TrayMenu1)
    TrayItemSetOnEvent($TrayItem1, "_TrayLeftTop")
    $TrayItem2 = TrayCreateItem("Right Top", $TrayMenu1)
    TrayItemSetOnEvent($TrayItem2, "_TrayRightTop")
    $TrayItem3 = TrayCreateItem("Center", $TrayMenu1)
    TrayItemSetOnEvent($TrayItem3, "_TrayCenter")
    $TrayItem4 = TrayCreateItem("Right Bottom", $TrayMenu1)
    TrayItemSetOnEvent($TrayItem4, "_TrayRightBottom")
    $TrayItem5 = TrayCreateItem("Left Bottom", $TrayMenu1)
    TrayItemSetOnEvent($TrayItem5, "_TrayLeftBottom")
    $IniCorner = IniRead($ini, "Position", "Corner", "4")
    If $IniCorner = 1 Then
    TrayItemSetState($TrayItem1, 1)
    ElseIf $IniCorner = 2 Then
    TrayItemSetState($TrayItem2, 1)
    ElseIf $IniCorner = 3 Then
    TrayItemSetState($TrayItem3, 1)
    ElseIf $IniCorner = 4 Then
    TrayItemSetState($TrayItem4, 1)
    ElseIf $IniCorner = 5 Then
    TrayItemSetState($TrayItem5, 1)
    EndIf
    TrayCreateItem("")
    $TrayItem6 = TrayCreateItem("Enable Hotkeys" & @TAB & "[ALT Gr + Space]")
    TrayItemSetOnEvent($TrayItem6, "_HotKeySet")
    TrayItemSetState($TrayItem6, IniRead($ini, "Settings", "Enable Hotkeys on Start", "1"))
    $TrayItem6a = TrayCreateItem("Sort Systray-Icons" & @TAB & "[ALT + T]")
    TrayItemSetOnEvent($TrayItem6a, "_SortSysTray")
    TrayCreateItem("")
    $TrayItem7 = TrayCreateItem("Open" & @TAB & "[ALT + ESC]")
    TrayItemSetOnEvent($TrayItem7, "_TrayOpen")
    $TrayItem7a = TrayCreateItem("Help")
    TrayItemSetOnEvent($TrayItem7a, "_Help")
    TrayCreateItem("")
    $TrayItem8 = TrayCreateItem("Exit")
    TrayItemSetOnEvent($TrayItem8, "_TrayExit")
    ;-----------------------------------------------------------------------------
    ; Hotkeys
    ;-----------------------------------------------------------------------------

    HotKeySet("^!{Space}", "_HotKeySet") ;show/hide WRiTeR
    HotKeySet("!{ESC}", "_ToogleMain") ;show/hide main-window
    HotKeySet("!^{ESC}", "_EndScript") ;show/hide main-window
    HotKeySet("^!m", "_ToogleTray") ;show/hide Tray
    HotKeySet("^!p", "_ToogleWRiTeR") ;show/hide WRiTeR

    ;-----------------------------------------------------------------------------
    ; Create GUI
    ;-----------------------------------------------------------------------------


    #Region ### START Koda GUI section ### Form=o:\autoscripts\window management\form1.kxf

    $Form1_1 = GUICreate($Title, 510, 301, -1, -1, BitOR($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU ,$DS_SETFOREGROUND), $WS_EX_TOPMOST)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_EndScript")
    $Menu1 = GUICtrlCreateMenu("&File")
    $Menu1_1 = GUICtrlCreateMenuItem("Hide Tray" & @TAB & "[ALT Gr + M]", $Menu1)
    GUICtrlSetOnEvent($Menu1_1, "_ToogleTray")
    $Menu1_2 = GUICtrlCreateMenuItem("Enable Hotkeys" & @TAB & "[ALT Gr + Space]", $Menu1)
    GUICtrlSetOnEvent($Menu1_2, "_HotKeySet")
    GUICtrlSetState($Menu1_2, IniRead($ini, "Settings", "Enable Hotkeys on Start", "1"))
    GUICtrlCreateMenuItem("", $Menu1)
    $Menu1_3 = GUICtrlCreateMenuItem("Expert Mode" & @TAB & "", $Menu1)
    GUICtrlSetOnEvent($Menu1_3, "_Settings")
    GUICtrlCreateMenuItem("", $Menu1)
    $Menu1_4 = GUICtrlCreateMenuItem("Exit" & @TAB & "[ALT Gr + ESC]", $Menu1)
    GUICtrlSetOnEvent($Menu1_4, "_EndScript")
    $Menu2 = GUICtrlCreateMenu("&Explorer")
    $Menu2_1 = GUICtrlCreateMenuItem("2 Windows Vertical" & @TAB & "[F11]", $Menu2)
    GUICtrlSetOnEvent($Menu2_1, "_ExploreVertical")
    $Menu2_2 = GUICtrlCreateMenuItem("2 Windows Horizontal" & @TAB & "[ALT + F11]", $Menu2)
    GUICtrlSetOnEvent($Menu2_2, "_ExploreHorizontal")
    $Menu2_3 = GUICtrlCreateMenuItem("", $Menu2)
    $Menu2_4 = GUICtrlCreateMenuItem("Show Hidden Files" & @TAB & "[ALT Gr + S]", $Menu2)
    GUICtrlSetOnEvent($Menu2_4, "_ToogleHiddenFiles")
    $i_State = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced", "Hidden")
    If $i_State = 1 Then
    GUICtrlSetState($Menu2_4, $GUI_checked)
    ElseIf $i_State = 2 Then
    GUICtrlSetState($Menu2_4, $GUI_unchecked)
    EndIf
    $Menu3 = GUICtrlCreateMenu("&More")
    $Menu3_1 = GUICtrlCreateMenuItem("Help" & @TAB & "[F1]", $Menu3)
    GUICtrlSetOnEvent($Menu3_1, "_Help")
    $Menu3_2 = GUICtrlCreateMenuItem("About" & @TAB & "", $Menu3)
    GUICtrlSetOnEvent($Menu3_2, "_About")
    $PageControl1 = GUICtrlCreateTab(0, 0, 508, 280)
    GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
    $TabSheet1 = GUICtrlCreateTabItem("Windows")
    $ListView = GUICtrlCreateListView("Process|Window|Top|Tray|Hide|TTI|Trans|Handle", 3, 23, 439, 228, BitOR($LVS_REPORT, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS), BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_HEADERDRAGDROP,$LVS_EX_FULLROWSELECT))
    $ListView1 = GUICtrlGetHandle($ListView)
    _GUICtrlListView_SetExtendedListViewStyle($ListView1, BitOR($WS_EX_CLIENTEDGE,$LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES,$LVS_EX_HEADERDRAGDROP,$LVS_EX_FULLROWSELECT))
    _GUICtrlListView_SetColumnWidth($ListView1, 0, 80)
    _GUICtrlListView_SetColumnWidth($ListView1, 1, 170)
    _GUICtrlListView_SetColumnWidth($ListView1, 2, 35)
    _GUICtrlListView_SetColumnWidth($ListView1, 3, 35)
    _GUICtrlListView_SetColumnWidth($ListView1, 4, 35)
    _GUICtrlListView_SetColumnWidth($ListView1, 5, 35)
    _GUICtrlListView_SetColumnWidth($ListView1, 6, 45)
    _GUICtrlListView_SetColumnWidth($ListView1, 7, 0)
    $Button1 = GUICtrlCreateButton("update", 3, 253, 342, 25, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button1, "_UpdateListView")
    $Button2 = GUICtrlCreateButton("Top", 448, 28, 55, 20, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button2, "_BToogleTop")
    $Button3 = GUICtrlCreateButton("Tray", 448, 63, 55, 20, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetState($Button3, $GUI_Disable)
    GUICtrlSetOnEvent($Button3, "_BWindowTray")
    $Button4 = GUICtrlCreateButton("Hide", 448, 99, 55, 20, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button4, "_BWindowHide")
    $Button5 = GUICtrlCreateButton("T T I", 448, 134, 55, 20, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button5, "_BWindowTransNoClick")
    $Button6 = GUICtrlCreateButton("Trans", 448, 169, 55, 20, 0, BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button6, "_BToogleTrans")
    $Button7 = GUICtrlCreateButton("<", 350, 253, 20, 25, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_CENTER, $BS_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button7, "_BMoveWindowLeft")
    $Button8 = GUICtrlCreateButton("^", 375, 253, 20, 25, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_CENTER, $BS_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button8, "_BMoveWindowUP")
    $Button9 = GUICtrlCreateButton("v", 400, 253, 20, 25, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_CENTER, $BS_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button9, "_BMoveWindowDown")
    $Button10 = GUICtrlCreateButton(">", 425, 253, 20, 25, BitOR($WS_TABSTOP, $BS_NOTIFY, $BS_CENTER, $BS_CENTER), BitOR($WS_EX_CLIENTEDGE,$WS_EX_STATICEDGE))
    GUICtrlSetOnEvent($Button10, "_BMoveWindowRight")
    $Slider1 = GUICtrlCreateSlider(455, 193, 20, 80, $TBS_VERT)
    GUICtrlCreateLabel("0", 485, 195)
    GUICtrlCreateLabel("255", 480, 255)
    GUICtrlSetLimit($Slider1,255,0)
    GUICtrlSetData($Slider1, IniRead($ini, "Transparence", "Trans", 200))
    $TabSheet2 = GUICtrlCreateTabItem("WRiTeR")
    $Edit = GUICtrlCreateEdit("", 2, 22, 503, 255)
    $Edit1 = GUICtrlGetHandle($Edit)
    _GUICtrlEdit_CanUndo($Edit1)
    _GUICtrlEdit_SetText($Edit1, StringReplace(IniRead($ini, "WRiTeR", "Notes", ""), "[CRLF]" ,@CRLF))

    $TabSheet3 = GUICtrlCreateTabItem("Settings")
    $Group1 = GUICtrlCreateGroup("GUI Postition", 10, 30, 250, 90)
    $Radio1 = GUICtrlCreateRadio("Left Top", 20, 50, 65)
    $Radio2 = GUICtrlCreateRadio("Right Top", 170, 50, 70)
    $Radio3 = GUICtrlCreateRadio("Center", 100, 70, 55)
    $Radio4 = GUICtrlCreateRadio("Right Bottom", 170, 90, 80)
    $Radio5 = GUICtrlCreateRadio("Left Bottom", 20, 90, 80)
    $IniCorner = IniRead($ini, "Position", "Corner", "4")
    If $IniCorner = 1 Then
    GUICtrlSetState($Radio1, 1)
    WinMove($Title, '', 0, 0)
    ElseIf $IniCorner = 2 Then
    GUICtrlSetState($Radio2, 1)
    WinMove($Title, '', @DesktopWidth - 515, 0)
    ElseIf $IniCorner = 3 Then
    GUICtrlSetState($Radio3, 1)
    ;WinMove($Title, '', (@DesktopWidth / 2) - (515 / 2), (@DesktopHeight / 2) - (350 / 2))
    ElseIf $IniCorner = 4 Then
    GUICtrlSetState($Radio4, 1)
    WinMove($Title, '', @DesktopWidth - 515, @DesktopHeight - 350)
    ElseIf $IniCorner = 5 Then
    GUICtrlSetState($Radio5, 1)
    WinMove($Title, '', 0, @DesktopHeight - 350)
    EndIf
    $Group2 = GUICtrlCreateGroup("Transparence", 10, 130, 250, 115)
    GUICtrlCreateLabel("TRANS-Func", 25, 155, 100, 30)
    $SSlider1 = GUICtrlCreateSlider(105, 150, 140, 30, $TBS_BOTTOM)
    GUICtrlSetLimit($SSlider1, 255, 0)
    GUICtrlSetData($SSlider1, IniRead($ini, "Transparence", "Trans", 200))
    GUICtrlCreateLabel("TTI-Func", 25, 210, 100, 30)
    $SSlider2 = GUICtrlCreateSlider(105, 205, 140, 30, $TBS_TOP)
    GUICtrlSetLimit($SSlider2, 255, 0)
    GUICtrlCreateLabel("0", 115, 185)
    GUICtrlCreateLabel("255", 220, 185)
    GUICtrlSetData($SSlider2, IniRead($ini, "Transparence", "TTI", 50))
    $Group3 = GUICtrlCreateGroup("Extras", 270, 30, 230, 245)
    $SButton1 = GUICtrlCreateButton("standard", 30, 250, 80)
    GUICtrlSetOnEvent($SButton1, "_StandardSettings")
    $SButton2 = GUICtrlCreateButton("apply", 160, 250, 80)
    GUICtrlSetOnEvent($SButton2, "_ApplySettings")
    $Checkbox1 = GUICtrlCreateCheckbox("Run with Windows", 280, 45, 120)
    GUICtrlSetState($Checkbox1, IniRead($ini, "Settings", "Run with Windows", "4"))
    $Checkbox2 = GUICtrlCreateCheckbox("Show Tray-Icon on Start", 280, 65, 140)
    GUICtrlSetState($Checkbox2, IniRead($ini, "Settings", "Show Tray-Icon on Start", "1"))
    $Checkbox3 = GUICtrlCreateCheckbox("Enable Hotkeys on Start", 280, 85, 140)
    GUICtrlSetState($Checkbox3, IniRead($ini, "Settings", "Enable Hotkeys on Start", "1"))
    $checkbox3a = GUICtrlCreateCheckbox("Show Window on Start", 280, 105, 140)
    GUICtrlSetState($Checkbox3a, IniRead($ini, "Settings", "Show Window on Start", "4"))
    $Checkbox4 = GUICtrlCreateCheckbox("update Window-List every", 280, 125, 142)
    GUICtrlSetState($Checkbox4, IniRead($ini, "Settings", "update Window List", "4"))
    GUICtrlSetOnEvent($Checkbox4, "_EnableUpdate")
    $Input1 = GUICtrlCreateInput(IniRead($ini, "Update Window List", "every Sec.", 10), 427, 125, 40)
    _EnableUpdate()
    GUICtrlCreateLabel("Sec.", 472, 130, 30)
    $Checkbox5 = GUICtrlCreateCheckbox("Enable automatic Sort", 280, 145, 123)
    GUICtrlSetState($Checkbox5, IniRead($ini, "Settings", "Enable automatic Sort", "4"))
    GUICtrlSetOnEvent($Checkbox5, "_EnableSort")
    $Combo1 = GUICtrlCreateCombo("", 340, 165, 90)
    GUICtrlSetData($Combo1, "don´t Sort|Ascending|Descending", IniRead($ini, "Sort", "Method", "don´t Sort"))
    _EnableSort()
    $Checkbox6 = GUICtrlCreateCheckbox("Action for double-click on Item", 280, 187, 165)
    GUICtrlSetState($Checkbox6, IniRead($ini, "Settings", "Action for double-click on Item", "4"))
    GUICtrlSetOnEvent($Checkbox6, "_EnableDoubleClick")
    $Combo2 = GUICtrlCreateCombo("", 310, 207, 150)
    GUICtrlSetData($Combo2, "do Nothing|Show/Hide Window|Set on Top/Back|Set Trans/ Back|Set TTI/Back|Move to Tray/Back", IniRead($ini, "Action", "Double-Click", "do Nothing"))
    _EnableDoubleClick()
    $Checkbox7 = GUICtrlCreateCheckbox("Sort Systray-Icons", 280, 229, 165)
    GUICtrlSetState($Checkbox7, IniRead($ini, "Settings", "Sort Systray-Icons", "4"))
    GUICtrlSetOnEvent($Checkbox7, "_EnableSystraySort")
    $Combo3 = GUICtrlCreateCombo("", 310, 249, 150)
    GUICtrlSetData($Combo3, "by Title|by Process|Ascending|Descending", "by Title")
    _EnableSystraySort()

    _GUICtrlTab_DeleteItem($PageControl1, 2)

    If IniRead($ini, "Settings", "Show Window on Start", "4") = 1 Then
    WinSetTrans($Title, "", 200)
    WinSetOnTop($Title,'',1)
    GUISetState(@SW_SHOW)
    Else
    WinSetTrans($Title, "", 0)
    GUISetState(@SW_SHOW)
    WinSetState($Title, "", @SW_HIDE)
    WinSetTrans($Title, "", 200)
    WinSetOnTop($Title,'',1)
    EndIf

    GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY")


    $DoNotEndScript = True
    $DoNotEndScript2 = True
    $DoNotEndScript3 = True

    _EndScript()
    _UpdateListView()

    If Not FileExists($ini) Then
    _StandardSettings()
    _ApplySettings()
    EndIf

    If IniRead($ini, "Settings", "Sort Systray-Icons", "4") = 1 Then _SortSysTray()

    While 1
    Sleep(10)
    If _IsPressed("1B") Or _IsPressed("70") Then
    $WinGetState = WinGetState($Title)
    If _IsPressed("1B") And $WinGetState = 15 or $WinGetState = 31 Then
    _ToogleMain()
    ElseIf _IsPressed("70") And $WinGetState = 15 Then
    _Help()
    EndIf
    EndIf
    WEnd

    ;-----------------------------------------------------------------------------
    ; Update Listview
    ;-----------------------------------------------------------------------------

    Func _UpdateListView()
    _GUICtrlListView_DeleteAllItems($ListView1)
    $WinList = WinList()
    For $i = 1 to $WinList[0][0]
    If Not @error Then
    If $WinList[$i][0] <> "" AND IsVisible($WinList[$i][1]) Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinList[$i][0]))
    $WinGetHandle = WinGetHandle($WinList[$i][0])
    If $ProcessName = @ScriptName Then
    Else
    _GUICtrlListView_AddItem($ListView1, $ProcessName)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $WinList[$i][0], 1)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $WinGetHandle, 7)
    $WinIsOnTp = _WinIsOnTop($WinGetHandle)
    If $WinIsOnTp = True Then _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " x", 2)
    ;Tray - Missing
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If $Transparency <> -1 Then
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " " & $Transparency, 6)
    Else
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, "", 6)
    EndIf
    EndIf
    EndIf
    EndIf
    Next
    $SectionName = IniReadSectionNames($iniHide)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniHide, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    _GUICtrlListView_AddItem($ListView1, $SectionName[$i])
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $Section[$ii][0], 1)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $WinGetHandle, 7)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " x", 4)
    $WinIsOnTp = _WinIsOnTop($WinGetHandle)
    If $WinIsOnTp = True Then _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " x", 2)
    ;Tray - Missing
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If $Transparency <> -1 Then
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " " & $Transparency, 6)
    Else
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, "", 6)
    EndIf
    Next
    EndIf
    Next
    EndIf
    $SectionName = IniReadSectionNames($iniTTI)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniTTI, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    _GUICtrlListView_AddItem($ListView1, $SectionName[$i])
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $Section[$ii][0], 1)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, $WinGetHandle, 7)
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " x", 4)
    $WinIsOnTp = _WinIsOnTop($WinGetHandle)
    If $WinIsOnTp = True Then _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " x", 2)
    ;Tray - Missing
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If $Transparency <> -1 Then
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, " " & $Transparency, 6)
    Else
    _GUICtrlListView_AddSubItem($ListView1, _GUICtrlListView_GetItemCount($ListView1) - 1, "", 6)
    EndIf
    Next
    EndIf
    Next
    EndIf
    If IniRead($ini, "Settings", "Enable automatic Sort", "4") = 1 Then
    If $HowToSort = "" Then $HowToSort = IniRead($ini, "Sort", "Method", "don´t Sort")
    If $HowToSort = "DESCENDING" Then
    Global $B_DESCENDING[_GUICtrlListView_GetColumnCount ($ListView1) ]
    _GUICtrlListView_SimpleSort ($ListView1, $B_DESCENDING, DllStructGetData($tInfo, "SubItem"))
    _GUICtrlListView_SimpleSort ($ListView1, $B_DESCENDING, DllStructGetData($tInfo, "SubItem"))
    ElseIf $HowToSort = "ASCENDING" Then
    Global $B_ASCENDING[_GUICtrlListView_GetColumnCount ($ListView1) ]
    _GUICtrlListView_SimpleSort ($ListView1, $B_ASCENDING, DllStructGetData($tInfo, "SubItem"))
    Else
    EndIf
    EndIf
    EndFunc

    ;-----------------------------------------------------------------------------
    ; GUICtrlSetOnEvent
    ;-----------------------------------------------------------------------------

    ;EndFunc
    Func _EndScript()
    If $DoNotEndScript = False Then WinSetState($TiTle, "", @sw_hide)
    ;ReMove
    $SectionName = IniReadSectionNames($iniMove)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniMove, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    $Value = IniRead($iniMove, $SectionName[$i], $Section[$ii][0], "")
    $Split = StringSplit($Value, "|")
    If Not @error Then
    $WinGetPos = WinGetPos($WinGetHandle)
    If Not @error Then
    If $WinGetPos[0] = $Split[1] And $WinGetPos[1] = $Split[2] And $WinGetPos[2] = $Split[3] And $WinGetPos[3] = $Split[4] Then
    Else
    WinMove($WinGetHandle, "", $Split[1], $Split[2], $Split[3], $Split[4])
    EndIf
    EndIf
    EndIf
    Next
    EndIf
    Next
    EndIf
    ;ReTrans
    $SectionName = IniReadSectionNames($iniTrans)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniTrans, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    $Value = IniRead($iniTrans, $SectionName[$i], $Section[$ii][0], "255")
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If $Value <> $Transparency Then WinSetTrans($WinGetHandle, "", $value)
    Next
    EndIf
    Next
    EndIf
    ;ReOnTop
    $SectionName = IniReadSectionNames($iniTop)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniTop, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    $Value = IniRead($iniTop, $SectionName[$i], $Section[$ii][0], "False")
    $WinIsOnTop = _WinIsOnTop($WinGetHandle)
    If $Value <> $WinIsOnTop Then
    If $Value = "False" Then
    WinSetOnTop($WinGetHandle, "", 0)
    WinSetState($WinGetHandle, "", @SW_MINIMIZE)
    Else
    WinSetOnTop($WinGetHandle, "", 1)
    EndIf
    EndIf
    IniDelete($iniTop, $SectionName[$i], $Section[$ii][0])
    Next
    EndIf
    Next
    EndIf
    ;ReHide
    _AllWindowHideBack()
    ;ReImmunization
    _AllWindowTransNoClickBack()
    FileDelete($iniTop)
    FileDelete($iniTray)
    FileDelete($iniHide)
    FileDelete($iniTTI)
    FileDelete($iniTrans)
    FileDelete($iniMove)
    If $DoNotEndScript = False Then
    IniDelete($ini, "WRiTeR", "Notes")
    IniWrite($ini, "WRiTeR", "Notes", StringReplace(_GUICtrlEdit_GetText($Edit1), @CRLF, "[CRLF]"))
    DllClose($dll)
    Exit
    Else
    _ApplySettings()
    $DoNotEndScript = False
    EndIf
    EndFunc

    Func _OnExitFunc()
    If @exitMethod = 3 Or @exitMethod = 4 Then
    IniDelete($ini, "WRiTeR", "Notes")
    IniWrite($ini, "WRiTeR", "Notes", StringReplace(_GUICtrlEdit_GetText($Edit1), @CRLF, "[CRLF]"))
    EndIf
    EndFunc

    ;show/hide main
    Func _ToogleMain()
    $State = WinGetState($Title)
    If $State = 15 Or $State = 7 Then
    WinSetState($Title, "", @SW_HIDE)
    ElseIf $State = 23 Then
    _UpdateListView()
    WinSetState($Title, "", @SW_SHOW)
    WinActivate($Title)
    Else
    _UpdateListView()
    WinSetState($Title, "", @SW_SHOW)
    WinActivate($Title)
    EndIf
    EndFunc

    ;show/hide tray-icon
    Func _ToogleTray()
    Opt("TrayIconHide", Not Opt("TrayIconHide", "Default"))
    If $ToogleTray = 0 Then
    GUICtrlSetState($Menu1_1, $GUI_Checked)
    $ToogleTray = 1
    ElseIf $ToogleTray = 1 Then
    GUICtrlSetState($Menu1_1, $GUI_UnChecked)
    $ToogleTray = 0
    EndIf
    EndFunc

    ;show Tab1
    Func _TrayLClick()
    $WinGetState = WinGetState($Title)
    If $WinGetState = 15 Or $WinGetState = 7 Then
    If _GUICtrlTab_GetCurSel($PageControl1) = 0 Then
    $SetTab = $TabSheet2
    ElseIf _GUICtrlTab_GetCurSel($PageControl1) = 1 Then
    $SetTab = $TabSheet1
    Else
    $SetTab = $TabSheet1
    EndIf
    GUICtrlSetState($SetTab, $GUI_SHOW)
    Else
    _ToogleMain()
    EndIf
    EndFunc

    ;Settings
    Func _Settings()
    $GetItemState = _GUICtrlMenu_GetItemState(_GUICtrlMenu_GetItemSubMenu (_GUICtrlMenu_GetMenu (WinGetHandle($Title)), 0), 3)
    If $GetItemState = 0 Then
    GUICtrlSetState($Menu1_3, $GUI_Checked)
    $TabSheet3 = GUICtrlCreateTabItem("Settings")
    ;GUICtrlSetState($TabSheet3, $GUI_SHOW)
    Else
    GUICtrlSetState($Menu1_3, $GUI_UnChecked)
    _GUICtrlTab_DeleteItem($PageControl1, 2)
    GUICtrlSetState($TabSheet1, $GUI_SHOW)
    EndIf
    EndFunc

    ;show Help
    Func _Help()
    SplashTextOn("Help", "Hilfe:" & @CRLF & @CRLF & _
    "Programm Funktionen: " & @CRLF & _
    @TAB & "* [ESC] minimiert Programm" & @CRLF & _
    @TAB & "* anzeigen/ verstecken des Programms bei Klick auf Tray-Symbol oder [ALT + ESC]" & @CRLF & _
    @TAB & "* anzeigen/ verstecken des WRiTeR-Tabs über [ALT Gr + P]" & @CRLF & _
    @TAB & "* anzeigen/ verstecken der Einstellungen über das Menü" & @CRLF & _
    @TAB & "* anzeigen/ verstecken des Tray-Symbols per Menü oder HotKey [ALT Gr + M]" & @CRLF & _
    @TAB & "* Rechtsklick auf Tray-Symbol zeigt Menü an" & @CRLF & _
    @TAB & "* Linksklick zeigt Fenster an und/ oder wechselt zwischen den Tabs (Windows + WRiTeR)" & @CRLF & _
    @TAB & "* an/ ausschalten der HotKeys per Menü oder HotKey [ALT Gr + Space] - dieser HotKey bleibt immer aktiviert" & @CRLF & _
    @TAB & "* Auswahl im Tray-Menü für Anzeige des GUIs in welcher Ecke" & @CRLF & _
    @TAB & "* WRiTeR: Edit-Feld, um schnell Informationen aufzuschreiben. Eingaben werden nach dem Schließen speichert und beim Start wieder zur Verfügung gestellt" & @CRLF & @CRLF & _
    "Einstellungen:" & @CRLF & _
    @TAB & "* Autostart mit Windows" & @CRLF & _
    @TAB & "* Anzeige des Tray-Symbols beim Start" & @CRLF & _
    @TAB & "* HotKey-Aktivierung beim Start des Programms" & @CRLF & _
    @TAB & '* automatisches Update der "Window-Liste"' & @CRLF & _
    @TAB & '* automatisches Sortieren der "Window-Liste"' & @CRLF & _
    @TAB & '* Aktion bei Doppelklick auf Eintrag in der "Window-Liste"' & @CRLF & _
    @TAB & "* Start des Programms in beborzugter Ecke" & @CRLF & _
    @TAB & '* voreingestellte Transparenz für "Trans-" und "TTI-Funktion"' & @CRLF & @CRLF & _
    "Expolorer Funktionen:" & @CRLF & _
    @TAB & "* aufrufen 2 Explorer-Fenster per HotKey (vertikal [F11] oder horizontal [ALT + F11]) oder Menü möglich" & @CRLF & _
    @TAB & '* anzeigen/ verstecken der "versteckten Dateien" per HotKey [ALT Gr + S] oder Menü möglich' & @CRLF & @CRLF & _
    "Hauptfunktionen:" & @CRLF & _
    @TAB & " jedes Sichtbare Fenster kann..." & @CRLF & _
    @TAB & '* "On Top" gesetzt werden + "On Top"-Attribut zurücknehmen (per Button oder HotKey [F9])' & @CRLF & _
    @TAB & "* Transparent gesetzt werden + Transparenz zurücknehmen (per Button oder HotKey [F10], oder Transparenz durch [ALT + Bild hoch/runter] erhöhen oder verringern" & @CRLF & _
    @TAB & "* versteckt werden + wieder sichtbar (per Button oder HotKey [F7] zum verstecken, [ALT + F7] zum zurücksetzen ALLER versteckten Fenster)" & @CRLF & _
    @TAB & '* sichtbar, "On Top", Transparent und durchklickbar gesetzt werden + zurück (per Button oder HotKey [ALT Gr + Einfg], [ALT + Einfg] setzt die Attribute aller Fenster zurück)' & @CRLF & _
    @TAB & "* halbiert und an einen beliebigen Bildschirmrand verschoben werden ([ALT + UP/DOWN/RIGHT/LEFT])" & @CRLF & _
    @TAB & "* maximiert werden [ALT Gr + F9]" & @CRLF & @CRLF & _
    "alle Einstellungen die Fenster betreffen, die durch das Programm getroffen werden, werden beim Beenden wieder zurückgesetzt", 860, 500, -1, -1, 0 + 1 + 4 + 32, "", 8)

    While 1
    Sleep(100)
    If _IsPressed("1B") Then
    SplashOff()
    ;WinSetState($Title, "", @SW_SHOWNA)
    ExitLoop
    EndIf
    WEnd
    EndFunc

    ;show About
    Func _About()
    WinSetOnTop($Title, "", 0)
    $MsgBox = MsgBox(64, "About", "by sc4ry" & @crlf & " ---IFK2005--- ")
    WinSetOnTop($Title, "", 1)
    EndFunc

    Func _HotKeySet()
    If $HotKeySet = True Then
    HotKeySet("{F9}")
    HotKeySet("{F10}")
    HotKeySet("{F7}")
    HotKeySet("^!{F7}")
    HotKeySet("{F8}")
    HotKeySet("^!{F8}")
    HotKeySet("!^{INS}")
    HotKeySet("!{INS}")
    HotKeySet("!{PGUP}")
    HotKeySet("!{PGDN}")
    HotKeySet("!{UP}")
    HotKeySet("!{DOWN}")
    HotKeySet("!{LEFT}")
    HotKeySet("!{RIGHT}")
    HotKeySet("!^{F9}")
    HotKeySet("{F11}")
    HotKeySet("!{F11}")
    HotKeySet("!^s")
    $HotKeySet = False
    GUICtrlSetState($Menu1_2, $GUI_Unchecked)
    TrayItemSetState($TrayItem6, $GUI_Unchecked)
    Else
    HotKeySet("{F9}","_HKToggleTop") ;set active window on top or back
    HotKeySet("{F10}", "_HKToogleTrans") ;set trans to window or back
    HotKeySet("{F7}", "_HKWindowHide") ;hide window
    HotKeySet("^!{F7}", "_AllWindowHideBack") ;set hide back on all windows
    HotKeySet("{F8}", "_HKWindowTray") ;hide window to tray
    HotKeySet("^!{F8}", "_AllWindowTrayBack") ;set hide to tray back on all windows
    HotKeySet("!^{INS}", "_HKWindowTransNoClick") ;set immun to window
    HotKeySet("!{INS}", "_AllWindowTransNoClickBack") ;set immun back on all windows
    HotKeySet("!{PGUP}", "_TransPlus") ;set window-trans +10
    HotKeySet("!{PGDN}", "_TransMinus") ;set window-trans -10
    HotKeySet("!{UP}", "_HKMoveWindowUP") ;move active window to top
    HotKeySet("!{DOWN}", "_HKMoveWindowDOWN") ;move active window to bottom
    HotKeySet("!{LEFT}", "_HKMoveWindowLEFT") ;move active window to left
    HotKeySet("!{RIGHT}", "_HKMoveWindowRIGHT") ;move active window to right
    HotKeySet("!^{F9}", "_HKMoveWindowMax") ;maximize active window
    HotKeySet("{F11}","_ExploreVertical") ;show 2 vertical explorer windows
    HotKeySet("!{F11}","_ExploreHorizontal") ;show 2 horizontal explorer windows
    HotKeySet("!^s","_ToogleHiddenFiles") ;show/hide hidden files
    $HotKeySet = True
    GUICtrlSetState($Menu1_2, $GUI_checked)
    TrayItemSetState($TrayItem6, $GUI_checked)
    EndIf
    EndFunc

    Func _EnableUpdate()
    If GUICtrlRead($Checkbox4) = 1 Then
    GUICtrlSetState($Input1, $GUI_ENABLE)
    Else
    GUICtrlSetState($Input1, $GUI_DISABLE)
    EndIf
    EndFunc

    Func _EnableSort()
    If GUICtrlRead($Checkbox5) = 1 Then
    GUICtrlSetState($Combo1, $GUI_ENABLE)
    Else
    GUICtrlSetState($Combo1, $GUI_DISABLE)
    EndIf
    EndFunc

    Func _EnableDoubleClick()
    If GUICtrlRead($Checkbox6) = 1 Then
    GUICtrlSetState($Combo2, $GUI_ENABLE)
    Else
    GUICtrlSetState($Combo2, $GUI_DISABLE)
    EndIf
    EndFunc

    Func _EnableSystraySort()
    If GUICtrlRead($Checkbox7) = 1 Then
    GUICtrlSetState($Combo3, $GUI_ENABLE)
    Else
    GUICtrlSetState($Combo3, $GUI_DISABLE)
    EndIf
    EndFunc

    Func _SortSysTray()
    FileInstall("SortSysTray.exe", "SortSysTray.exe")
    If GUICtrlRead($Checkbox7) = 1 Then
    If GUICtrlRead($Combo3) = "by Title" Then
    ShellExecute(@scriptdir & "\SortSysTray.exe", "/title", @scriptdir)
    ElseIf GUICtrlRead($Combo3) = "by Process" Then
    ShellExecute(@scriptdir & "\SortSysTray.exe", "/proc", @scriptdir)
    ElseIf GUICtrlRead($Combo3) = "Ascending" Then
    ShellExecute(@scriptdir & "\SortSysTray.exe", "/up", @scriptdir)
    ElseIf GUICtrlRead($Combo3) = "Descending" Then
    ShellExecute(@scriptdir & "\SortSysTray.exe", "/down", @scriptdir)
    Else
    EndIf
    EndIf
    ;~ FileDelete(@ScriptDir & "\SysTraySort.exe")
    EndFunc

    Func _StandardSettings()
    GUICtrlSetState($Radio4, 1)
    GUICtrlSetData($SSlider1, 200)
    GUICtrlSetData($SSlider2, 50)
    GUICtrlSetState($Checkbox1, 4)
    GUICtrlSetState($Checkbox2, 1)
    GUICtrlSetState($Checkbox3, 1)
    GUICtrlSetState($Checkbox3a, 4)
    GUICtrlSetState($Checkbox4, 4)
    GUICtrlSetData($Input1, 10)
    GUICtrlSetState($Input1, $GUI_DISABLE)
    GUICtrlSetState($Checkbox5, 4)
    GUICtrlSetData($Combo1, "")
    GUICtrlSetData($Combo1, "don´t Sort|Ascending|Descending", "don´t Sort")
    GUICtrlSetState($Combo1, $GUI_DISABLE)
    GUICtrlSetState($Checkbox6, 4)
    GUICtrlSetData($Combo2, "")
    GUICtrlSetData($Combo2, "do Nothing|Show/Hide Window|Set on Top/Back|Set Trans/ Back|Set TTI/Back|Move to Tray/Back", "do Nothing")
    GUICtrlSetState($Combo2, $GUI_DISABLE)
    GUICtrlSetState($Checkbox7, 4)
    GUICtrlSetData($Combo3, "")
    GUICtrlSetData($Combo3, "by Title|by Process|Ascending|Descending", "by Title")
    GUICtrlSetState($Combo3, $GUI_DISABLE)
    EndFunc

    Func _ApplySettings()
    If GUICtrlRead($Radio1) = 1 Then
    IniWrite($ini, "Position", "Corner", "1")
    WinMove($Title, '', 0, 0)
    TrayItemSetState($TrayItem1, 1)
    TrayItemSetState($TrayItem2, 4)
    TrayItemSetState($TrayItem3, 4)
    TrayItemSetState($TrayItem4, 4)
    TrayItemSetState($TrayItem5, 4)
    ElseIf GUICtrlRead($Radio2) = 1 Then
    IniWrite($ini, "Position", "Corner", "2")
    WinMove($Title, '', @DesktopWidth - 515, 0)
    TrayItemSetState($TrayItem1, 4)
    TrayItemSetState($TrayItem2, 1)
    TrayItemSetState($TrayItem3, 4)
    TrayItemSetState($TrayItem4, 4)
    TrayItemSetState($TrayItem5, 4)
    ElseIf GUICtrlRead($Radio3) = 1 Then
    IniWrite($ini, "Position", "Corner", "3")
    WinMove($Title, '', (@DesktopWidth / 2) - (515 / 2), (@DesktopHeight / 2) - (350 / 2))
    TrayItemSetState($TrayItem1, 4)
    TrayItemSetState($TrayItem2, 4)
    TrayItemSetState($TrayItem3, 1)
    TrayItemSetState($TrayItem4, 4)
    TrayItemSetState($TrayItem5, 4)
    ElseIf GUICtrlRead($Radio4) = 1 Then
    IniWrite($ini, "Position", "Corner", "4")
    WinMove($Title, '', @DesktopWidth - 515, @DesktopHeight - 350)
    TrayItemSetState($TrayItem1, 4)
    TrayItemSetState($TrayItem2, 4)
    TrayItemSetState($TrayItem3, 4)
    TrayItemSetState($TrayItem4, 1)
    TrayItemSetState($TrayItem5, 4)
    ElseIf GUICtrlRead($Radio5) = 1 Then
    IniWrite($ini, "Position", "Corner", "5")
    WinMove($Title, '', 0, @DesktopHeight - 350)
    TrayItemSetState($TrayItem1, 4)
    TrayItemSetState($TrayItem2, 4)
    TrayItemSetState($TrayItem3, 4)
    TrayItemSetState($TrayItem4, 4)
    TrayItemSetState($TrayItem5, 1)
    EndIf
    IniWrite($ini, "Transparence", "Trans", GUICtrlRead($SSlider1))
    IniWrite($ini, "Transparence", "TTI", GUICtrlRead($SSlider2))
    IniWrite($ini, "Settings", "Run with Windows", GUICtrlRead($Checkbox1))
    If GUICtrlRead($Checkbox1) = 1 Then
    RegWrite("HKCU\Software\Microsoft\Windows\CurrentVersion\Run\", $Title, "REG_SZ", @AutoItExe)
    Else
    RegDelete("HKCU\Software\Microsoft\Windows\CurrentVersion\Run\", $Title)
    EndIf
    IniWrite($ini, "Settings", "Show Tray-Icon on Start", GUICtrlRead($Checkbox2))
    IniWrite($ini, "Settings", "Enable Hotkeys on Start", GUICtrlRead($Checkbox3))
    IniWrite($ini, "Settings", "Show Window on Start", GUICtrlRead($Checkbox3a))
    IniWrite($ini, "Settings", "Update Window List", GUICtrlRead($Checkbox4))
    IniWrite($ini, "Update Window List", "every Sec.", GUICtrlRead($Input1))
    If GUICtrlRead($Checkbox4) = 1 Then
    AdlibEnable("_UpdateListView", GUICtrlRead($Input1) * 1000)
    Else
    AdlibDisable( )
    EndIf
    IniWrite($ini, "Settings", "Enable automatic Sort", GUICtrlRead($Checkbox5))
    IniWrite($ini, "Sort", "Method", GUICtrlRead($Combo1))
    If GUICtrlRead($Checkbox5) = 1 Then
    $HowToSort = GUICtrlRead($Combo1)
    Else
    $HowToSort = "don´t Sort"
    EndIf
    IniWrite($ini, "Settings", "Action for double-click on Item", GUICtrlRead($Checkbox6))
    IniWrite($ini, "Action", "Double-Click", GUICtrlRead($Combo2))
    If GUICtrlRead($Checkbox6) = 1 Then
    $DoubleAction = GUICtrlRead($Combo2)
    Else
    $DoubleAction = "do Nothing"
    EndIf
    IniWrite($ini, "Settings", "Sort Systray-Icons", GUICtrlRead($Checkbox7))
    IniWrite($ini, "Systray", "Sort", GUICtrlRead($Combo3))
    If GUICtrlRead($Checkbox7) = 1 Then
    $SystrayAction = GUICtrlRead($Combo3)
    Else
    $SystrayAction = "by Title"
    EndIf
    EndFunc

    ;-----------------------------------------------------------------------------
    ;Button Funcs
    ;-----------------------------------------------------------------------------

    Func _BToogleTop()
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _ToggleTop($Window)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    _UpdateListView()
    EndFunc

    Func _BWindowTray()
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _WindowTray($Window)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    _UpdateListView()
    EndFunc

    Func _BWindowHide()
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _WindowHide($Window)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    _UpdateListView()
    EndFunc

    Func _BWindowTransNoClick()
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _WindowTransNoClick($Window)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    _UpdateListView()
    EndFunc

    Func _BToogleTrans()
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _ToogleTrans($Window)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    _UpdateListView()
    EndFunc

    Func _BMoveWindowLeft()
    $Position = "Left"
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _MoveWindow($Window, $Position)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    EndFunc

    Func _BMoveWindowUp()
    $Position = "Up"
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _MoveWindow($Window, $Position)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    EndFunc

    Func _BMoveWindowDown()
    $Position = "Down"
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _MoveWindow($Window, $Position)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    EndFunc

    Func _BMoveWindowRight()
    $Position = "Right"
    For $i = 1 To _GUICtrlListView_GetItemCount($ListView1)
    $LV_Checked = _GUICtrlListView_GetItemChecked($ListView1, $i - 1)
    If $LV_Checked = True Then
    $Window = _GUICtrlListView_GetItemText($ListView1, $i - 1, 7)
    _MoveWindow($Window, $Position)
    _GUICtrlListView_SetItemChecked($ListView1, $i - 1, False)
    EndIf
    Next
    EndFunc

    ;-----------------------------------------------------------------------------
    ;Hotkey Funcs
    ;-----------------------------------------------------------------------------

    Func _ToogleWRiTeR()
    $State = WinGetState($Title)
    If $State = 15 Or $State = 7 Then
    WinSetState($Title, "", @SW_HIDE)
    ElseIf $State = 23 Then
    GUICtrlSetState($TabSheet2, $GUI_SHOW)
    WinSetState($Title, "", @SW_SHOW)
    WinActivate($Title)
    ControlClick($Title, "", "[Class:Edit;Instance:1]")
    Else
    GUICtrlSetState($TabSheet2, $GUI_SHOW)
    WinSetState($Title, "", @SW_SHOW)
    WinActivate($Title)
    ControlClick($Title, "", "[Class:Edit;Instance:1]")
    EndIf
    EndFunc

    Func _HKToggleTop()
    $Window = ''
    _ToggleTop($Window)
    _UpdateListView()
    EndFunc

    Func _HKToogleTrans()
    $Window = ''
    _ToogleTrans($Window)
    _UpdateListView()
    EndFunc

    Func _HKWindowHide()
    $Window = ''
    _WindowHide($Window)
    _UpdateListView()
    EndFunc

    Func _HKWindowTray()
    $Window = ''
    _WindowTray($Window)
    _UpdateListView()
    EndFunc

    Func _HKWindowTransNoClick()
    $Window = ''
    _WindowTransNoClick($Window)
    _UpdateListView()
    EndFunc

    ;-----------------------------------------------------------------------------
    ;Tray Funcs
    ;-----------------------------------------------------------------------------

    Func _TrayLeftTop()
    WinMove($Title, '', 0, 0)
    EndFunc

    Func _TrayRightTop()
    WinMove($Title, '', @DesktopWidth - 515, 0)
    EndFunc

    Func _TrayCenter()
    WinMove($Title, '', (@DesktopWidth / 2) - (515 / 2), (@DesktopHeight / 2) - (350 / 2))
    EndFunc

    Func _TrayRightBottom()
    WinMove($Title, '', @DesktopWidth - 515, @DesktopHeight - 350)
    EndFunc

    Func _TrayLeftBottom()
    WinMove($Title, '', 0, @DesktopHeight - 350)
    EndFunc

    Func _TrayOpen()
    _UpdateListView()
    WinSetState($Title, "", @sw_show)
    EndFunc

    Func _TrayExit()
    _EndScript()
    EndFunc

    ;-----------------------------------------------------------------------------
    ;Window Funcs
    ;-----------------------------------------------------------------------------

    ;more Transparency
    Func _TransPlus()
    $WinGetHandle = WinGetHandle("")
    $WinGetTitle = WinGetTitle("")
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If IniRead($iniTrans, $ProcessName, $WinGetTitle, "") = "" Then IniWrite($iniTrans, $ProcessName, $WinGetTitle, $Transparency)
    If $Transparency = -1 or $Transparency = 255 Or $Transparency + 10 > 255 Then
    WinSetTrans($WinGetHandle, '', 255)
    Else
    WinSetTrans($WinGetHandle, '', $Transparency + 10)
    EndIf
    _UpdateListView()
    EndFunc

    ;less Transparency
    Func _TransMinus()
    $WinGetHandle = WinGetHandle("")
    $WinGetTitle = WinGetTitle("")
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If IniRead($iniTrans, $ProcessName, $WinGetTitle, "") = "" Then IniWrite($iniTrans, $ProcessName, $WinGetTitle, $Transparency)
    If $Transparency = -1 or $Transparency = 255 Then
    WinSetTrans($WinGetHandle, '', 255 - 10)
    ElseIf $Transparency - 10 > 0 then
    WinSetTrans($WinGetHandle, '', $Transparency - 10)
    Else
    WinSetTrans($WinGetHandle, '', 10)
    EndIf
    _UpdateListView()
    EndFunc

    ;sets fix trans to window
    Func _ToogleTrans($Window)
    $WinGetHandle = WinGetHandle($Window)
    $WinGetTitle = WinGetTitle($Window)
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    _API_GetLayeredWindowAttributes($WinGetHandle,$i_transcolor,$Transparency)
    If IniRead($iniTrans, $ProcessName, $WinGetTitle, "") = "" Then IniWrite($iniTrans, $ProcessName, $WinGetTitle, $Transparency)
    If $Transparency = GUICtrlRead($Slider1) Then
    WinSetTrans($WinGetHandle,'', 255)
    Else
    WinSetTrans($WinGetHandle,'', GUICtrlRead($Slider1))
    EndIf
    EndFunc

    ;immunize window
    Func _WindowTransNoClick($Window)
    $WinGetTitle = WinGetTitle($Window)
    $WinGetHandle = WinGetHandle($Window)
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    $Value = IniRead($iniTTI, $ProcessName, $WinGetTitle, "")
    If $Value = "" Then
    _Win_SetClickThrough($WinGetHandle)
    IniWrite($iniTTI, $ProcessName, $WinGetTitle, "x")
    Else
    _Win_SetClickThrough($WinGetHandle, "", False)
    WinSetOnTop($WinGetTitle, "", 0)
    WinSetTrans($WinGetTitle, "", 255)
    IniDelete($iniTTI, $ProcessName, $WinGetTitle)
    EndIf
    EndIf
    EndFunc

    ;hide window
    Func _WindowHide($Window)
    $WinGetHandle = WinGetHandle($Window)
    $WinGetTitle = WinGetTitle($Window)
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniHide, $ProcessName, $WinGetTitle, "") = "" Then
    ;~ If Not $WinGetTitle = "" And $WinGetTitle <> "Startmenü" And Not $WinGetTitle <> "Startmenu" Then
    WinSetState($WinGetHandle, "", @SW_HIDE)
    IniWrite($iniHide, $ProcessName, $WinGetTitle, "x")
    ;~ EndIf
    Else
    WinSetState($WinGetHandle, "", @SW_SHOW)
    IniDelete($iniHide, $ProcessName, $WinGetTitle)
    EndIf
    EndFunc

    ;toogle on top
    Func _ToggleTop($Window)
    $WinGetHandle = WinGetHandle($Window)
    $WinGetTitle = WinGetTitle($Window)
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    $WinIsOnTop = _WinIsOnTop($WinGetHandle)
    If IniRead($iniTop, $ProcessName, $WinGetTitle, "") = "" Then IniWrite($iniTop, $ProcessName, $WinGetTitle, $WinIsOnTop)
    If $WinIsOnTop = True Then
    WinSetOnTop($WinGetHandle, "", 0)
    Else
    WinSetOnTop($WinGetHandle, "", 1)
    EndIf
    WinSetOnTop($Form1_1, "", 1)
    EndFunc

    ;hide window to tray
    Func _WindowTray($Window)
    EndFunc

    ;;;;;;;;;;;;;;;;
    ;Set-Back Funcs
    ;;;;;;;;;;;;;;;;

    ;set hide to tray back on all windows
    Func _AllWindowTrayBack()
    _UpdateListView()
    EndFunc

    ;set immunization back
    Func _AllWindowTransNoClickBack()
    $SectionName = IniReadSectionNames($iniTTI)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniTTI, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    $Style = _WinAPI_GetWindowLong($WinGetHandle,$GWL_EXSTYLE)
    If BitAND($Style,$WS_EX_TRANSPARENT) = $WS_EX_TRANSPARENT And BitAND($Style,$WS_EX_LAYERED) = $WS_EX_LAYERED Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetHandle))
    If $ProcessName <> @ScriptName Then
    _Win_SetClickThrough($WinGetHandle, "", False)
    WinSetOnTop($WinGetHandle, "", 0)
    WinSetTrans($WinGetHandle, "", 255)
    If $Section[0][0] = 0 Or $Section[0][0] = 1 Then
    IniDelete($iniTTI, $ProcessName)
    Else
    IniDelete($iniTTI, $ProcessName, $Section[$ii][0])
    EndIf
    EndIf
    EndIf
    Next
    EndIf
    Next
    EndIf
    If $DoNotEndScript2 = False Then
    _UpdateListView()
    Else
    $DoNotEndScript2 = False
    EndIf
    EndFunc

    Func _AllWindowHideBack()
    $SectionName = IniReadSectionNames($iniHide)
    If Not @error Then
    For $i = 1 To $SectionName[0]
    $Section = IniReadSection($iniHide, $SectionName[$i])
    If Not @error Then
    For $ii = 1 To $Section[0][0]
    $WinGetHandle = WinGetHandle($Section[$ii][0])
    $Value = IniRead($iniHide, $SectionName[$i], $Section[$ii][0], "x")
    If $Value <> "" Then
    WinSetState($Section[$ii][0], "", @SW_SHOW)
    If $Section[0][0] = 0 Or $Section[0][0] = 1 Then
    IniDelete($iniTTI, $SectionName[$i])
    Else
    IniDelete($iniTTI, $SectionName[$i], $Section[$ii][0])
    EndIf
    Else
    WinSetState($WinGetHandle, "", @SW_HIDE)
    EndIf
    Next
    EndIf
    Next
    EndIf
    If $DoNotEndScript3 = False Then
    _UpdateListView()
    Else
    $DoNotEndScript3 = False
    EndIf
    EndFunc

    ;-----------------------------------------------------------------------------
    ;Explorer Funcs
    ;-----------------------------------------------------------------------------

    ;2 explorer windows vertical
    Func _ExploreVertical()
    $appHorizontal = False
    _Explore($appHorizontal)
    EndFunc

    ;2 explorer windows horizontal
    Func _ExploreHorizontal()
    $appHorizontal = True
    _Explore($appHorizontal)
    EndFunc

    ;create explorer windows
    Func _Explore($appHorizontal)
    Local $aSize[3][5] ; [0]=Handle, [1]=Breite, [2]=Höhe, [3]=x, [4]=y
    $aSize[0][1] = @DesktopWidth
    $aSize[0][2] = @DesktopHeight
    If $appHorizontal = True Then
    $aSize[1][1] = @DesktopWidth/2
    $aSize[2][1] = @DesktopWidth/2
    $aSize[1][2] = @DesktopHeight
    $aSize[2][2] = @DesktopHeight
    $aSize[1][3] = 0
    $aSize[2][3] = @DesktopWidth/2
    $aSize[1][4] = 0
    $aSize[2][4] = 0
    ElseIf $appHorizontal = False Then
    $aSize[1][1] = @DesktopWidth
    $aSize[2][1] = @DesktopWidth
    $aSize[1][2] = @DesktopHeight/2 + 12.5
    $aSize[2][2] = @DesktopHeight/2 + 12.5
    $aSize[1][3] = 0
    $aSize[2][3] = 0
    $aSize[1][4] = 0
    $aSize[2][4] = @DesktopHeight/2 - 12.5
    EndIf
    Run ('Explorer.exe /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', '', @SW_HIDE)
    WinWaitActive('Arbeitsplatz')
    $aSize[1][0] = WinGetHandle('Arbeitsplatz')
    WinMove($aSize[1][0], '', $aSize[1][3], $aSize[1][4], $aSize[1][1], $aSize[1][2] - 25)
    WinSetTitle('Arbeitsplatz', '', 'Arbeitsplatz_1')
    Run ('Explorer.exe /e, ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}', '', @SW_HIDE)
    WinWaitActive('Arbeitsplatz')
    $aSize[2][0] = WinGetHandle('Arbeitsplatz')
    WinMove($aSize[2][0], '', $aSize[2][3], $aSize[2][4], $aSize[2][1], $aSize[2][2] - 25)
    WinSetTitle('Arbeitsplatz', '', 'Arbeitsplatz_2')
    WinSetState($aSize[1][0], '', @SW_SHOW)
    WinSetState($aSize[2][0], '', @SW_SHOW)
    EndFunc

    ;show/hide hidden files
    Func _ToogleHiddenFiles()
    _changeFileVisible()
    EndFunc

    ;change RegKey for show/hide hidden files
    Func _changeFileVisible()
    $opt1 = Opt("WinTitleMatchMode", 4)
    $opt2 = Opt("MustDeclareVars", 1)
    Local $s_RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
    Local $i_State = RegRead($s_RegKey, "Hidden")
    If $i_State = 1 Then
    RegWrite($s_RegKey, "Hidden", "REG_DWORD", "2")
    GUICtrlSetState($Menu2_4, $GUI_UnChecked)
    Else
    RegWrite($s_RegKey, "Hidden", "REG_DWORD", "1")
    GUICtrlSetState($Menu2_4, $GUI_Checked)
    EndIf
    Opt("WinTitleMatchMode", $opt1 )
    Opt("MustDeclareVars", $opt2 )
    _refreshExplorer()
    EndFunc ;==>_changeFileVisible

    ;change explorer view to show/hide hidden files
    Func _refreshExplorer()
    $opt1 = Opt("WinTitleMatchMode", 4)
    $opt2 = Opt("MustDeclareVars", 1)
    Local $ah_WinList1 = WinList("classname=ExploreWClass")
    Local $ah_WinList2 = WinList("classname=CabinetWClass")
    Local $h_Desktop = WinGetHandle("classname=Progman")
    ;
    ; Aktualisieren der "ExploreWClass" Fenster
    If $ah_WinList1[0][0] > 0 Then
    ;_ArrayDisplay($ah_WinList1, "$ah_WinList1")
    For $i = 1 To $ah_WinList1[0][0] Step 1
    DllCall("user32.dll", "long", "SendMessage", "hwnd", $ah_WinList1[$i][1], "int", 0x111, "int", 28931, "int", 0)
    Next
    EndIf
    ;
    ; Aktualisieren der "CabinetWClass" Fenster
    If $ah_WinList2[0][0] > 0 Then
    ;_ArrayDisplay($ah_WinList2, "$ah_WinList2")
    For $i = 1 To $ah_WinList1[0][0] Step 1
    DllCall("user32.dll", "long", "SendMessage", "hwnd", $ah_WinList1[$i][1], "int", 0x111, "int", 28931, "int", 0)
    Next
    EndIf
    ;
    ; Aktualisieren des "Desktops"
    DllCall("user32.dll", "long", "SendMessage", "hwnd", $h_Desktop, "int", 0x111, "int", 28931, "int", 0)
    Opt("WinTitleMatchMode", $opt1 )
    Opt("MustDeclareVars", $opt2 )
    EndFunc ;==>_refreshExplorer

    Func _HKMoveWindowUP()
    $Window = 'active'
    $Position = "Up"
    _MoveWindow($Window, $Position)
    EndFunc

    Func _HKMoveWindowDOWN()
    $Window = 'active'
    $Position = "Down"
    _MoveWindow($Window, $Position)
    EndFunc

    Func _HKMoveWindowLEFT()
    $Window = 'active'
    $Position = "Left"
    _MoveWindow($Window, $Position)
    EndFunc

    Func _HKMoveWindowRIGHT()
    $Window = 'active'
    $Position = "Right"
    _MoveWindow($Window, $Position)
    EndFunc

    Func _HKMoveWindowMax()
    $Window = 'active'
    $Position = "Max"
    _MoveWindow($Window, $Position)
    EndFunc

    ;moves window
    Func _MoveWindow($Window, $Position)
    ;MsgBox(0, "", $Window & @CRLF & $Position)
    Local $aSize[3][5] ; [0]=Handle, [1]=Breite, [2]=Höhe, [3]=x, [4]=y
    Local $a = Opt("WinTitleMatchMode", 4)
    Local $b = Opt("WinSearchChildren", 1)
    $aSize[0][1] = @DesktopWidth
    $aSize[0][2] = @DesktopHeight
    $WinGetTitle = WinGetTitle($Window)
    Switch $Position
    Case "Up"
    $aSize[1][1] = @DesktopWidth
    $aSize[2][1] = @DesktopWidth
    $aSize[1][2] = @DesktopHeight / 2
    $aSize[2][2] = @DesktopHeight / 2
    $aSize[1][3] = 0
    $aSize[2][3] = 0
    $aSize[1][4] = 0
    $aSize[2][4] = @DesktopHeight / 2
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniMove, $ProcessName, $WinGetTitle, "") = "" Then
    $WinPos = WinGetPos($WinGetTitle)
    If Not @error Then
    IniWrite($iniMove,$ProcessName, $WinGetTitle, $WinPos[0] & "|" & $WinPos[1] & "|" & $WinPos[2] & "|" & $WinPos[3])
    EndIf
    EndIf
    If BitAND(WinGetState($WinGetTitle), 32) = 32 Then WinSetState($WinGetTitle, '', @SW_RESTORE)
    WinMove($WinGetTitle, '', $aSize[1][3], $aSize[1][4], $aSize[1][1], $aSize[1][2])
    Else
    WinMove($WinGetTitle, '', 0, 0)
    EndIf
    Case "Down"
    $aSize[1][1] = @DesktopWidth
    $aSize[2][1] = @DesktopWidth
    $aSize[1][2] = @DesktopHeight / 2
    $aSize[2][2] = @DesktopHeight / 2
    $aSize[1][3] = 0
    $aSize[2][3] = 0
    $aSize[1][4] = $aSize[1][2]
    $aSize[2][4] = @DesktopHeight / 2
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniMove, $ProcessName, $WinGetTitle, "") = "" Then
    $WinPos = WinGetPos($WinGetTitle)
    If Not @error Then
    IniWrite($iniMove,$ProcessName, $WinGetTitle, $WinPos[0] & "|" & $WinPos[1] & "|" & $WinPos[2] & "|" & $WinPos[3])
    EndIf
    EndIf
    If BitAND(WinGetState($WinGetTitle), 32) = 32 Then WinSetState($WinGetTitle, '', @SW_RESTORE)
    WinMove($WinGetTitle, '', $aSize[1][3], $aSize[1][4], $aSize[1][1], $aSize[1][2] - 25)
    Else
    WinMove($WinGetTitle, '', @DesktopWidth - 515, @DesktopHeight - 350)
    EndIf
    Case "Left"
    $aSize[1][1] = @DesktopWidth / 2
    $aSize[2][1] = @DesktopWidth / 2
    $aSize[1][2] = @DesktopHeight
    $aSize[2][2] = @DesktopHeight
    $aSize[1][3] = 0
    $aSize[2][3] = @DesktopWidth / 2
    $aSize[1][4] = 0
    $aSize[2][4] = 0
    $WinGetTitle = WinGetTitle($Window)
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniMove, $ProcessName, $WinGetTitle, "") = "" Then
    $WinPos = WinGetPos($WinGetTitle)
    If Not @error Then
    IniWrite($iniMove,$ProcessName, $WinGetTitle, $WinPos[0] & "|" & $WinPos[1] & "|" & $WinPos[2] & "|" & $WinPos[3])
    EndIf
    EndIf
    If BitAND(WinGetState($WinGetTitle), 32) = 32 Then WinSetState($WinGetTitle, '', @SW_RESTORE)
    WinMove($WinGetTitle, '', $aSize[1][3], $aSize[1][4], $aSize[1][1], $aSize[1][2] - 25)
    Else
    WinMove($WinGetTitle, '', 0, @DesktopHeight - 350)
    EndIf
    Case "RIGHT"
    $aSize[1][1] = @DesktopWidth / 2
    $aSize[2][1] = @DesktopWidth / 2
    $aSize[1][2] = @DesktopHeight
    $aSize[2][2] = @DesktopHeight
    $aSize[1][3] = $aSize[1][1]
    $aSize[2][3] = @DesktopWidth / 2
    $aSize[1][4] = 0
    $aSize[2][4] = 0
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniMove, $ProcessName, $WinGetTitle, "") = "" Then
    $WinPos = WinGetPos($WinGetTitle)
    If Not @error Then
    IniWrite($iniMove,$ProcessName, $WinGetTitle, $WinPos[0] & "|" & $WinPos[1] & "|" & $WinPos[2] & "|" & $WinPos[3])
    EndIf
    EndIf
    If BitAND(WinGetState($WinGetTitle), 32) = 32 Then WinSetState($WinGetTitle, '', @SW_RESTORE)
    WinMove($WinGetTitle, '', $aSize[1][3], $aSize[1][4], $aSize[1][1], $aSize[1][2] - 25)
    Else
    WinMove($WinGetTitle, '', @DesktopWidth - 515, 0)
    EndIf
    Case "Max"
    If $WinGetTitle <> $Title Then
    $ProcessName = _ProcessGetName(WinGetProcess($WinGetTitle))
    If IniRead($iniMove, $ProcessName, $WinGetTitle, "") = "" Then
    $WinPos = WinGetPos($WinGetTitle)
    If Not @error Then
    IniWrite($iniMove,$ProcessName, $WinGetTitle, $WinPos[0] & "|" & $WinPos[1] & "|" & $WinPos[2] & "|" & $WinPos[3])
    EndIf
    EndIf
    WinSetState($WinGetTitle, '', @SW_MAXIMIZE)
    EndIf
    EndSwitch
    Opt("WinTitleMatchMode", $a)
    Opt("WinSearchChildren", $b)
    EndFunc ;==>_MoveWindow

    ;-----------------------------------------------------------------------------
    ;Extended Window Funcs
    ;-----------------------------------------------------------------------------

    ;check if window is visible
    Func IsVisible($handle)
    If BitAnd( WinGetState($handle), 2 ) Then
    Return 1
    Else
    Return 0
    EndIf
    EndFunc

    ;get transparency of a window
    Func _API_GetLayeredWindowAttributes($hwnd, ByRef $i_transcolor, ByRef $Transparency)
    $i_transcolor = -1
    $Transparency = -1
    Local Const $AC_SRC_ALPHA = 1
    Local Const $ULW_ALPHA = 2
    Local Const $LWA_ALPHA = 0x2
    Local Const $LWA_COLORKEY = 0x1
    Local $Ret = DllCall("user32.dll", "int", "GetLayeredWindowAttributes", "hwnd", $hwnd, "long*", $i_transcolor, "byte*", $Transparency, "long*",0)
    Select
    Case @error
    Return SetError(@error,0,0)
    Case $ret[0] = 0
    Return SetError(4,0,0)
    Case Else
    $i_transcolor = $ret[2]
    $Transparency = $ret[3]
    Return $ret[4]
    EndSelect
    EndFunc ; Author(s): Prog@ndy

    ;set window "immun"
    Func _Win_SetClickThrough($title,$text = "",$noclic = True)
    Local $hWnd = WinGetHandle($title,$text)
    If @error Then Return SetError(1,0,0)
    If $noclic Then
    _WinAPI_SetWindowLong($hWnd,$GWL_EXSTYLE,BitOR(_WinAPI_GetWindowLong($hWnd,$GWL_EXSTYLE),$WS_EX_TRANSPARENT))
    If @error Then Return SetError(2,0,0)
    WinSetTrans($hWnd,"",GUICtrlRead($SSlider2)) ; Sets the Layered Attribute, but still shows the window :)
    WinSetOnTop($hwnd, "", 1)
    If @error Then Return SetError(2,0,0)
    Else
    _WinAPI_SetWindowLong($hWnd,$GWL_EXSTYLE,BitAND(_WinAPI_GetWindowLong($hWnd,$GWL_EXSTYLE),BitNOT($WS_EX_TRANSPARENT)))
    If @error Then Return SetError(2,0,0)
    EndIf
    Return 1
    EndFunc ; Author(s): Prog@ndy

    ;check if win is "on top"
    Func _WinIsOnTop($WindowHandle)
    Local $long = _WinAPI_GetWindowLong(WinGetHandle($WindowHandle),$GWL_EXSTYLE)
    Return BitAND($long,8)=8 ; $WS_EX_TOPMOST = 8
    EndFunc ; Author(s): Prog@ndy

    ;checks double-click on listviewitem
    Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam)
    Local $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView
    $hWndListView = $ListView1
    If Not IsHWnd($ListView1) Then $hWndListView = GUICtrlGetHandle($ListView1)

    $tNMHDR = DllStructCreate($tagNMHDR, $ilParam)
    $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom"))
    $iIDFrom = DllStructGetData($tNMHDR, "IDFrom")
    $iCode = DllStructGetData($tNMHDR, "Code")
    Switch $hWndFrom
    Case $hWndListView
    Switch $iCode
    Case $LVN_COLUMNCLICK ; A column was clicked
    Local $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam)
    _GUICtrlListView_SimpleSort ($hWndListView, $B_DESCENDING, DllStructGetData($tInfo, "SubItem"))
    Case $NM_DBLCLK ; Sent by a list-view control when the user double-clicks an item with the left mouse button
    If IniRead($ini, "Settings", "Action for double-click on Item", "4") = 1 Then
    $DoubleAction = IniRead($ini, "Action", "Double-Click", "do Nothing")
    Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $ilParam)
    $Window = _GUICtrlListView_GetItemText($hWndFrom, DllStructGetData($tInfo, "Index"), 1)
    ;#cs
    Select
    Case $DoubleAction = "do Nothing"
    Case $DoubleAction = "Show/Hide Window"
    _WindowHide($Window)
    _UpdateListView()
    Case $DoubleAction = "Set on Top/Back"
    _ToggleTop($Window)
    _UpdateListView()
    Case $DoubleAction = "Set Trans/ Back"
    _ToogleTrans($Window)
    _UpdateListView()
    Case $DoubleAction = "Set TTI/Back"
    _WindowTransNoClick($Window)
    _UpdateListView()
    Case $DoubleAction = "Move to Tray/Back"
    _WindowTray($Window)
    _UpdateListView()
    Case Else
    EndSelect
    ;#ce
    EndIf
    EndSwitch
    EndSwitch
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_NOTIFY

    Alles anzeigen
  • Progressbar mit GDIplus

    • sc4ry
    • 27. August 2008 um 22:14

    ist auf jeden fall ne nice sache, aber ...

    wenn ich einfach nur ne progressbar mit farbigen durchlauf (vista style) erstellen will, habe ich immer zusätzlich die 4 punkte die blinken.
    und die wegzubekommen habe ich _ProgressSetText(" ") genommen, dann erscheint aber ganz kurz "0 %" im gui.

    gleiches gilt für die farbliche darstellung beim vista style, ganz am anfang ist der balken rot. kann man das ändern?

    mein gui sieht zZ so aus:

    [autoit]

    #include <GDIpProgress.au3>

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

    $ProgressGui = GUICreate("S.T.A.R.T.E.R", 200, 32, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP, $WS_VISIBLE, $DS_SETFOREGROUND), BitOR($WS_EX_STATICEDGE, $WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    WinSetTrans($ProgressGui, "", 200)
    GUISetBkColor(0x000000, $ProgressGui)
    $ProgressLabel = GUICtrlCreateLabel("S.T.A.R.T.E.R is working", 45, 3, 120, 18)
    GUICtrlSetColor($ProgressLabel, 0xFFFFFF);Progress Marquee + Controls
    $PMarquee = _ProgressCreate(1, 20, 197, 10)
    _ProgressSetImages($PMarquee, "C:\Program Files\AutoIt3\Include\prgimgs\marquee.jpg", "C:\Program Files\AutoIt3\Include\prgimgs\bg.jpg")
    _ProgressMarquee($PMarquee, 2, 0)
    _ProgressSetText($PMarquee, " ")
    GUISetState()

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

    While 1
    Sleep(100)
    WEnd

    [/autoit]
  • Gui mit Progressbar im Vista-Stil

    • sc4ry
    • 27. August 2008 um 09:18

    hey super tweaky, das ist geil.
    aber iwie bekomm ich es nicht so hin wie in dem gui.

    und zwar im bsp die progressbar ganz unten ... genau das will ich haben.
    wenn ich das aber in mein script kopiere, habe ich da nen grünen balken, der nen roten "wegschiebt" ... im bsp ist das aber nicht oO

    [autoit]

    $Gui = GUICreate("Gradient ProgressBar", 400, 350)
    ;Progress Marquee + Controls
    $PMarquee = _ProgressCreate(10, 310, 300, 30)
    _ProgressSetImages($PMarquee, @ScriptDir & "\prgimgs\marquee.jpg", @ScriptDir & "\prgimgs\bg.jpg")
    _ProgressMarquee($PMarquee, 2, 0)
    ;End Progress Marquee + Controls

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

    GUISetState()

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

    While 1

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

    Sleep(100)

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

    WEnd

    [/autoit]
  • Gui mit Progressbar im Vista-Stil

    • sc4ry
    • 26. August 2008 um 22:35

    Hi, ich habe ein fenster in dem einfach ein progressbar immer wieder durchläuft, bis das tool fertig ist, um zu zeigen, dass das script läuft.
    das ganze sieht natürlich was trist aus ... ich fände es schöner, wenn es im vista stil (oder annähernd) wäre.

    also schwarzes fenster, schwarzer progressbar hintergrund und grüne anzeige. abgerundete ecke etc ...
    bis jetzt ist es so ... was mich daran stört ist, dass die progressbar im hintergrund noch grau ist ... geht das anders/schicker?

    [autoit]

    $ProgressGui = GUICreate($script, 200, 30, -1, -1, BitOR($WS_SIZEBOX, $WS_POPUP, $WS_DLGFRAME, $WS_VISIBLE, $DS_SETFOREGROUND), BitOR($WS_EX_TOOLWINDOW, $WS_EX_TOPMOST))
    WinSetTrans($ProgressGui, "", 200)
    GUISetBkColor(0x000000, $ProgressGui)
    $Progress = GUICtrlCreateProgress(1, 20, 200, 10)
    GUICtrlSetStyle(-1, $PBS_MARQUEE)
    GUICtrlSetColor($Progress, 0x18DF18)
    $ProgressLabel = GUICtrlCreateLabel("S.T.A.R.T.E.R is working", 45, 1, 120, 18)
    GUICtrlSetColor($ProgressLabel, 0xFFFFFF)
    GUISetState(@SW_SHOW)

    [/autoit]
  • neue Verion = Müll !?!?!

    • sc4ry
    • 26. August 2008 um 16:59

    misteriös *g*

    naja, werd mich die tage nochmal dran setzen und es so hinwurschteln, dass es wieder unter der neuen version anständig läuft und dann ist hoffentlich wieder ruhe mit diesen alt-neu frickeleien ;)

  • neue Verion = Müll !?!?!

    • sc4ry
    • 26. August 2008 um 14:53

    ich dreh noch am rad ...

    hier mal n screen, datei ist nicht included ... wie die datei aussieht und was drin steht, ist ja oben, also von mir ist die auch net *g*

    PS: hab sie mal gelöscht und rebootet, jetzt kommts nimmer oO

  • neue Verion = Müll !?!?!

    • sc4ry
    • 26. August 2008 um 14:01

    umbenannt hatte ich die schon, wo ich vor ein paar wochen auf die neue version umgestiegen bin.
    er meckert ja auch nicht über die funktionen in meinem script, sondern über die GUIList.au3 ... und die ist ja in autoit dabei gewesen.

  • neue Verion = Müll !?!?!

    • sc4ry
    • 26. August 2008 um 13:35

    also geben die include-dateien mit, die garnicht funktionieren ?
    was ist das denn???

    also muss ich jetzt die includes immer selber wählen (lassen, durch OI) und danach die restlichen fehler (in dem fall alle zeilen mit _IsClassName) löschen?

    das ist doch eher ein, bzw mehrere, schritte nach hinten als andersrum.

    PS: hat noch wer die version, bei der das nicht der fall ist? ich hatte die version von hier, ist ca. 3-6 wochen her ...

  • neue Verion = Müll !?!?!

    • sc4ry
    • 26. August 2008 um 09:59

    die am meisten suckt, ist die guilist

    das sind die fehler, nach organize includes kommt nur noch "_IsClassName(): undefined function" ... aber das doch nicht der sinn der sache, dass ich da OI durch die includes laufen lassen muss ...

    [autoit]

    >"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /AU3Check /in "C:\Program Files\AutoIt3\Include\GuiList.au3"
    +>09:58:32 Starting AutoIt3Wrapper v.1.10.1.8 Environment(Language:0409 Keyboard:00000407 OS:WIN_XP/Service Pack 2 CPU:X86)
    >Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3
    C:\Program Files\AutoIt3\Include\GuiList.au3(102,50) : WARNING: $DDL_ARCHIVE: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_ARCHIVE
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(108,52) : WARNING: $DDL_DIRECTORY: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_DIRECTORY
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(114,49) : WARNING: $DDL_HIDDEN: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_HIDDEN
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(120,51) : WARNING: $DDL_READONLY: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_READONLY
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(126,52) : WARNING: $DDL_READWRITE: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_READWRITE
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(132,49) : WARNING: $DDL_SYSTEM: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_SYSTEM
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(140,49) : WARNING: $DDL_DRIVES: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_DRIVES
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(146,52) : WARNING: $DDL_EXCLUSIVE: possibly used before declaration.
    $v_Attributes = $v_Attributes + $DDL_EXCLUSIVE
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(102,50) : ERROR: $DDL_ARCHIVE: undeclared global variable.
    $v_Attributes = $v_Attributes + $DDL_ARCHIVE
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3(95,44) : ERROR: _IsClassName(): undefined function.
    If Not _IsClassName ($h_listbox, "ListBox")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
    C:\Program Files\AutoIt3\Include\GuiList.au3 - 2 error(s), 8 warning(s)
    !>09:58:32 AU3Check ended.rc:2
    >Exit code: 0 Time: 1.320

    [/autoit]
    Spoiler anzeigen
    [autoit]

    #include-once
    #include <ListBoxConstants.au3>
    #include <Misc.au3>
    #include <Memory.au3>

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

    ; ------------------------------------------------------------------------------
    ;
    ; AutoIt Version: 3.2.3++
    ; Language: English
    ; Description: Functions that assist with Listbox.
    ;
    ; ------------------------------------------------------------------------------

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

    ; ------------------------------------------------------------------------------
    ; These functions use some code developed by Paul Campbell (PaulIA) for the Auto3Lib project
    ; particularly the _Mem* function calls which can be found in Memory.au3
    ; ------------------------------------------------------------------------------

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

    ; function list
    ;===============================================================================
    ; _GUICtrlListAddDir
    ; _GUICtrlListAddItem
    ; _GUICtrlListClear
    ; _GUICtrlListCount
    ; _GUICtrlListDeleteItem
    ; _GUICtrlListFindString
    ; _GUICtrlListGetAnchorIndex
    ; _GUICtrlListGetCaretIndex
    ; _GUICtrlListGetHorizontalExtent
    ; _GUICtrlListGetInfo
    ; _GUICtrlListGetLocale
    ; _GUICtrlListGetSelCount
    ; _GUICtrlListGetSelItems
    ; _GUICtrlListGetSelItemsText
    ; _GUICtrlListGetSelState
    ; _GUICtrlListGetText
    ; _GUICtrlListGetTextLen
    ; _GUICtrlListGetTopIndex
    ; _GUICtrlListInsertItem
    ; _GUICtrlListReplaceString
    ; _GUICtrlListSelectedIndex
    ; _GUICtrlListSelectString
    ; _GUICtrlListSelItemRange
    ; _GUICtrlListSelItemRangeEx
    ; _GUICtrlListSetAnchorIndex
    ; _GUICtrlListSetCaretIndex
    ; _GUICtrlListSetHorizontalExtent
    ; _GUICtrlListSetLocale
    ; _GUICtrlListSetSel
    ; _GUICtrlListSetTopIndex
    ; _GUICtrlListSort
    ; _GUICtrlListSwapString
    ;
    ; ************** TODO ******************
    ; _GUICtrlListAddFile
    ;===============================================================================

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListAddDir
    ; Parameter(s): $h_listbox - controlID
    ; $s_Attributes - Comma-delimited string
    ; $s_file - Optional for "Drives" only: what to get i.e *.*
    ; Requirement: None
    ; Return Value(s): zero-based index of the last name added to the list
    ; If an error occurs, the return value is $LB_ERR.
    ; If there is insufficient space to store the new strings, the return value is $LB_ERRSPACE
    ; User CallTip: _GUICtrlListAddDir($h_listbox, $s_Attributes[, $s_file=""]) Add names to the list displayed by the list box (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): $s_Attributes is an comma-delimited string
    ; valid values are any of the following:
    ; A,D,H,RO,RW,S,E,Drives,NB
    ; A = ARCHIVE
    ; Includes archived files.
    ; D = DIRECTORY
    ; Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]).
    ; H = HIDDEN
    ; Includes hidden files.
    ; RO = READONLY
    ; Includes read-only files.
    ; RW = READWRITE
    ; Includes read-write files with no additional attributes. This is the default setting.
    ; S = SYSTEM
    ; Includes system files.
    ; E = EXCLUSIVE
    ; Includes only files with the specified attributes. By default, read-write files are listed even if READWRITE is not specified.
    ; DRIVES
    ; All mapped drives are added to the list. Drives are listed in the form [-x-], where x is the drive letter.
    ; NB = No Brackets
    ; Drives are liste in the form x:, where x is the drive letter (used with Drives attribute)
    ;
    ;===============================================================================
    Func _GUICtrlListAddDir($h_listbox, $s_Attributes, $s_file = "")
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $i, $v_Attributes = "", $i_drives = 0, $no_brackets = 0, $v_ret
    Local $a_Attributes = StringSplit($s_Attributes, ",")
    For $i = 1 To $a_Attributes[0]
    Select
    Case StringUpper($a_Attributes[$i]) = "A"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_ARCHIVE
    Else
    $v_Attributes = $DDL_ARCHIVE
    EndIf
    Case StringUpper($a_Attributes[$i]) = "D"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_DIRECTORY
    Else
    $v_Attributes = $DDL_DIRECTORY
    EndIf
    Case StringUpper($a_Attributes[$i]) = "H"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_HIDDEN
    Else
    $v_Attributes = $DDL_HIDDEN
    EndIf
    Case StringUpper($a_Attributes[$i]) = "RO"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_READONLY
    Else
    $v_Attributes = $DDL_READONLY
    EndIf
    Case StringUpper($a_Attributes[$i]) = "RW"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_READWRITE
    Else
    $v_Attributes = $DDL_READWRITE
    EndIf
    Case StringUpper($a_Attributes[$i]) = "S"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_SYSTEM
    Else
    $v_Attributes = $DDL_SYSTEM
    EndIf
    Case StringUpper($a_Attributes[$i]) = "DRIVES"
    $i_drives = 1
    $s_file = ""
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_DRIVES
    Else
    $v_Attributes = $DDL_DRIVES
    EndIf
    Case StringUpper($a_Attributes[$i]) = "E"
    If (StringLen($v_Attributes) > 0) Then
    $v_Attributes = $v_Attributes + $DDL_EXCLUSIVE
    Else
    $v_Attributes = $DDL_EXCLUSIVE
    EndIf

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

    Case StringUpper($a_Attributes[$i]) = "NB"
    If (StringLen($v_Attributes) > 0) And StringInStr($s_Attributes, "DRIVES") Then
    $no_brackets = 1
    Else
    $no_brackets = 0
    EndIf
    Case Else
    ; invalid attribute
    Return $LB_ERRATTRIBUTE
    EndSelect
    Next
    If (Not $i_drives And StringLen($s_file) == 0) Then
    Return $LB_ERRREQUIRED
    EndIf
    If $i_drives And $no_brackets Then
    Local $s_text
    Local $gui_no_brackets = GUICreate("no brackets")
    Local $list_no_brackets = GUICtrlCreateList("", 240, 40, 120, 120)
    $v_ret = GUICtrlSendMsg($list_no_brackets, $LB_DIR, $v_Attributes, $s_file)
    For $i = 0 To _GUICtrlListCount($list_no_brackets) - 1
    $s_text = _GUICtrlListGetText($list_no_brackets, $i)
    $s_text = StringReplace(StringReplace(StringReplace($s_text, "[", ""), "]", ":"), "-", "")
    _GUICtrlListInsertItem($h_listbox, $s_text)
    Next
    GUIDelete($gui_no_brackets)
    Return $v_ret
    Else
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_DIR, $v_Attributes, $s_file, 0, "int", "str")
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_DIR, $v_Attributes, $s_file)
    EndIf
    EndIf
    EndFunc ;==>_GUICtrlListAddDir

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListAddItem
    ; Parameter(s): $h_listbox - controlID
    ; $s_text - string to add
    ; Requirement: None
    ; Return Value(s): The return value is the zero-based index of the string in
    ; the list box. If an error occurs, the return value is $LB_ERR.
    ; If there is insufficient space to store the new string,
    ; the return value is $LB_ERRSPACE.
    ; User CallTip: _GUICtrlListAddItem($h_listbox, $s_text) Add an item to the List (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): If the list box does not have the LBS_SORT style, the string is added to the
    ; end of the list. Otherwise, the string is inserted into the list and the list
    ; is sorted.
    ;
    ;===============================================================================
    Func _GUICtrlListAddItem($h_listbox, $s_text)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_ADDSTRING, 0, $s_text, 0, "int", "str")
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_ADDSTRING, 0, String($s_text))
    EndIf
    EndFunc ;==>_GUICtrlListAddItem

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListClear
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): None
    ; User CallTip: _GUICtrlListClear($h_listbox) remove all items from the list box (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListClear($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, 0)
    If IsHWnd($h_listbox) Then
    _SendMessage($h_listbox, $LB_RESETCONTENT)
    Else
    GUICtrlSendMsg($h_listbox, $LB_RESETCONTENT, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListClear

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListCount
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): The return value is the number of items in the list box
    ; or $LB_ERR if an error occurs
    ; User CallTip: _GUICtrlListCount($h_listbox) return the number of items in the list box (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListCount($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETCOUNT)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETCOUNT, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListCount

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListDeleteItem
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - index of item to delete
    ; Requirement: None
    ; Return Value(s): The return value is a count of the strings remaining in the list.
    ; The return value is $LB_ERR if the $i_index parameter specifies an
    ; index greater than the number of items in the list.
    ; User CallTip: _GUICtrlListDeleteItem($h_listbox, $i_index) Delete an Item from the List (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListDeleteItem($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_DELETESTRING, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_DELETESTRING, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListDeleteItem

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListFindString
    ; Parameter(s): $h_listbox - controlID
    ; $s_search - string to search for
    ; $i_exact - exact match or not
    ; Requirement: None
    ; Return Value(s): The return value is the index of the matching item,
    ; or $LB_ERR if the search was unsuccessful.
    ; User CallTip: _GUICtrlListFind($h_listbox, $s_search[, $i_exact=0]) return the index of matching item (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): find the first string in a list box that begins with the specified string.
    ; if exact is specified find the first list box string that exactly matches
    ; the specified string, except that the search is not case sensitive
    ;===============================================================================
    Func _GUICtrlListFindString($h_listbox, $s_search, $i_exact = 0)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    If ($i_exact) Then
    Return _SendMessage($h_listbox, $LB_FINDSTRINGEXACT, -1, $s_search, 0, "int", "str")
    Else
    Return _SendMessage($h_listbox, $LB_FINDSTRING, -1, $s_search, 0, "int", "str")
    EndIf
    Else
    If ($i_exact) Then
    Return GUICtrlSendMsg($h_listbox, $LB_FINDSTRINGEXACT, -1, String($s_search))
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_FINDSTRING, -1, String($s_search))
    EndIf
    EndIf
    EndFunc ;==>_GUICtrlListFindString

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetAnchorIndex
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: multi-select style
    ; Return Value(s): The return value is the index of the anchor item.
    ; If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListGetAnchorIndex($h_listbox) Get the Anchor Idex (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ; This might not always be the first selected item--especially
    ; if you select every other item via Ctrl+Click...
    ;
    ;===============================================================================
    Func _GUICtrlListGetAnchorIndex($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETANCHORINDEX)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETANCHORINDEX, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetAnchorIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetCaretIndex
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: multi-select style
    ; Return Value(s): The return value is the zero-based index of the selected list box item.
    ; If nothing is selected $LB_ERR can be returned.
    ; User CallTip: _GUICtrlListGetCaretIndex($h_listbox) Return index of item that has the focus rectangle (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): To determine the index of the item that has the focus rectangle in a
    ; multiple-selection list box. The item may or may not be selected
    ;
    ;===============================================================================
    Func _GUICtrlListGetCaretIndex($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETCARETINDEX)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETCARETINDEX, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetCaretIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetHorizontalExtent
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None.
    ; Return Value(s): The return value is the scrollable width, in pixels, of the list box.
    ; User CallTip: _GUICtrlListGetHorizontalExtent($h_listbox) Retrieve from a list box the the scrollable width (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): To respond to the $LB_GETHORIZONTALEXTENT message,
    ; the list box must have been defined with the $WS_HSCROLL style.
    ;
    ;===============================================================================
    Func _GUICtrlListGetHorizontalExtent($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETHORIZONTALEXTENT)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETHORIZONTALEXTENT, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetHorizontalExtent

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetInfo
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None.
    ; Return Value(s): The return value is the number of items per column.
    ; User CallTip: _GUICtrlListGetInfo($h_listbox) Retrieve the number of items per column in a specified list box. (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s):
    ;
    ;===============================================================================
    Func _GUICtrlListGetInfo($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETLISTBOXINFO)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETLISTBOXINFO, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetInfo

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetItemRect
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the item.
    ; Requirement: Array containing the RECT, first element ($array[0]) contains the number of elements
    ; If an error occurs, the return value is $LB_ERR.
    ; Return Value(s): The return value is the number of items per column.
    ; User CallTip: _GUICtrlListGetItemRect($h_listbox, $i_index) Retrieve the dimensions of the rectangle that bounds a list box item. (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): $array[1] - left
    ; $array[2] - top
    ; $array[3] - right
    ; $array[4] - bottom
    ;
    ;===============================================================================
    Func _GUICtrlListGetItemRect($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    #cs
    typedef struct _RECT {
    LONG left;
    LONG top;
    LONG right;
    LONG bottom;
    } RECT, *PRECT;
    #ce
    Local $RECT = "int;int;int;int"
    Local $left = 1, $top = 2, $right = 3, $bottom = 4
    Local $p = DllStructCreate($RECT)
    If @error Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    If _SendMessage($h_listbox, $LB_GETITEMRECT, $i_index, DllStructGetPtr($p), 0, "int", "ptr") == $LB_ERR Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Else
    If GUICtrlSendMsg($h_listbox, $LB_GETITEMRECT, $i_index, DllStructGetPtr($p)) == $LB_ERR Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndIf
    Return StringSplit(DllStructGetData($p, $left) & "," & DllStructGetData($p, $top) & "," & DllStructGetData($p, $right) & "," & DllStructGetData($p, $bottom), ",")
    EndFunc ;==>_GUICtrlListGetItemRect

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetLocale
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): Returns the current Local of the listbox
    ; same as @OSLang unless changed
    ; User CallTip: _GUICtrlListGetLocale($h_listbox) current Local of the listbox (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): "0409" for U.S. English
    ;
    ;===============================================================================
    Func _GUICtrlListGetLocale($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return Hex(_SendMessage($h_listbox, $LB_GETLOCALE), 4)
    Else
    Return Hex(GUICtrlSendMsg($h_listbox, $LB_GETLOCALE, 0, 0), 4)
    EndIf
    EndFunc ;==>_GUICtrlListGetLocale

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetSelCount
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: multiple-selection list box
    ; Return Value(s): The return value is the count of selected items in the list box.
    ; If the list box is a single-selection list box, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListGetSelCount($h_listbox) Get the number of items selected (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): Retrieve the total number of selected items in a multiple-selection list box.
    ; Number of selected items (for a control with multi-select style)
    ;
    ;===============================================================================
    Func _GUICtrlListGetSelCount($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETSELCOUNT)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETSELCOUNT, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetSelCount

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetSelItems
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: multi-select style
    ; Return Value(s): Array of selected items indices, first element ($array[0]) contains the number indices returned
    ; If the list box is a single-selection list box, the return value is $LB_ERR.
    ; If no items are selected, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListGetSelItems($h_listbox) Get item indices of selected items (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s):
    ;
    ;===============================================================================
    Func _GUICtrlListGetSelItems($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $num = _GUICtrlListGetSelCount($h_listbox)
    Local $i, $struct, $i_ret
    For $i = 1 To $num
    $struct &= "int;"
    Next
    $struct = StringTrimRight($struct, 1)
    Local $p = DllStructCreate($struct)
    If @error Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    $i_ret = _SendMessage($h_listbox, $LB_GETSELITEMS, $num, DllStructGetPtr($p), 0, "int", "ptr")
    Else
    $i_ret = GUICtrlSendMsg($h_listbox, $LB_GETSELITEMS, $num, DllStructGetPtr($p))
    EndIf
    If ($i_ret == $LB_ERR Or $i_ret == 0) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $array
    For $i = 1 To $num
    $array &= DllStructGetData($p, $i) & ","
    Next
    $array = StringTrimRight($array, 1)
    Local $a_items = StringSplit($array, ",")
    For $i = 1 To $a_items[0]
    $a_items[$i] = Int($a_items[$i])
    Next
    Return $a_items
    EndFunc ;==>_GUICtrlListGetSelItems

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetSelItemsText
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: multi-select style
    ; Return Value(s): array of selected items text, first element ($array[0]) contains the number items returned
    ; If the list box is a single-selection list box, the return value is $LB_ERR.
    ; If no items are selected, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListGetSelItemsText($h_listbox) Get the text of selected items (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s):
    ;
    ;===============================================================================
    Func _GUICtrlListGetSelItemsText($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $i, $i_ret, $a_text
    For $i = 0 To _GUICtrlListCount($h_listbox) - 1
    $i_ret = _GUICtrlListGetSelState($h_listbox, $i)
    If ($i_ret > 0) Then
    If IsArray($a_text) Then
    ReDim $a_text[UBound($a_text) + 1]
    Else
    Local $a_text[2]
    EndIf
    $a_text[0] += 1
    $a_text[UBound($a_text) - 1] = _GUICtrlListGetText($h_listbox, $i)
    ElseIf ($i_ret == $LB_ERR) Then
    Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndIf
    Next
    Return $a_text
    EndFunc ;==>_GUICtrlListGetSelItemsText

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetSelState
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the item
    ; Requirement: None
    ; Return Value(s): If an item is selected, the return value is greater than zero
    ; otherwise, it is zero. If an error occurs, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListGetSelState($h_listbox, $i_index) Get the selection state of item (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListGetSelState($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETSEL, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETSEL, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetSelState

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetText
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the string to retrieve
    ; Requirement: None
    ; Return Value(s): The return value is the item string.
    ; If $i_index does not specify a valid index, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListGetText($h_listbox, $i_index) Returns the item (string) at the specified index (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListGetText($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $v_ret
    Local $struct = DllStructCreate("char[4096]")
    If @error Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)

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

    If Not IsHWnd($h_listbox) Then $h_listbox = GUICtrlGetHandle($h_listbox)
    $v_ret = DllCall("user32.dll", "int", "SendMessageA", "hwnd", $h_listbox, "int", $LB_GETTEXT, "int", $i_index, "ptr", DllStructGetPtr($struct))
    If $v_ret[0] == $LB_ERR Or @error Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Return DllStructGetData($struct, 1)
    EndFunc ;==>_GUICtrlListGetText

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetTextLen
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Zero-based index of item
    ; Requirement: None
    ; Return Value(s): The return value is the length of the string
    ; If the wParam parameter does not specify a valid index, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListGetTextLen($h_listbox, $i_index) alternative to StringLen (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListGetTextLen($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETTEXTLEN, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETTEXTLEN, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetTextLen

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetTopIndex
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): The return value is the index of the first visible item in the list box.
    ; If the list is empty then $LB_ERR is returned.
    ; User CallTip: _GUICtrlListGetTopIndex($h_listbox) retrieve the index of the first visible item in a list (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): Initially the item with index 0 is at the top of the list box, but if
    ; the list box contents have been scrolled another item may be at the top.
    ; Returns index of the first visible item in the list box
    ; useful since contents for a long list will scroll
    ;
    ;===============================================================================
    Func _GUICtrlListGetTopIndex($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (Not _GUICtrlListCount($h_listbox)) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETTOPINDEX)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETTOPINDEX, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListGetTopIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListInsertItem
    ; Parameter(s): $h_listbox - controlID
    ; $s_text - String to insert
    ; $i_index - Optional: index to insert at
    ; Requirement: None
    ; Return Value(s): The return value is the index of the position at which the string was inserted.
    ; If an error occurs, the return value is $LB_ERR. If there is insufficient space
    ; to store the new string, the return value is $LB_ERRSPACE.
    ; User CallTip: _GUICtrlListInsertItem($h_listbox, $s_text[, $i_index=-1]) insert a string into the list (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): If this parameter is –1, the string is added to the end of the list.
    ; Unlike the _GUICtrlListAddItem, this function does not cause a list
    ; with the LBS_SORT style to be sorted.
    ;
    ;===============================================================================
    Func _GUICtrlListInsertItem($h_listbox, $s_text, $i_index = -1)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Local $struct_String = DllStructCreate("char[" & StringLen($s_text) + 1 & "]")
    Local $sBuffer_pointer = DllStructGetPtr($struct_String)
    DllStructSetData($struct_String, 1, $s_text)
    Local $rMemMap
    _MemInit ($h_listbox, StringLen($s_text) + 1, $rMemMap)
    If @error Then
    _MemFree ($rMemMap)
    Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndIf
    _MemWrite ($rMemMap, $sBuffer_pointer)
    If @error Then
    _MemFree ($rMemMap)
    Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndIf
    Local $iResult = _SendMessage($h_listbox, $LB_INSERTSTRING, $i_index, $sBuffer_pointer)
    If @error Then
    _MemFree ($rMemMap)
    Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndIf
    _MemFree ($rMemMap)
    If @error Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Return $iResult
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_INSERTSTRING, $i_index, String($s_text))
    EndIf
    EndFunc ;==>_GUICtrlListInsertItem

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListReplaceString
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Zero-based index of the item to replace
    ; $s_newString - String to replace old string
    ; Requirement: None
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListReplaceString($h_listbox, $i_index, $s_newString) Replaces the text of an item at index (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListReplaceString($h_listbox, $i_index, $s_newString)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListDeleteItem($h_listbox, $i_index) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListInsertItem($h_listbox, $s_newString, $i_index) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndFunc ;==>_GUICtrlListReplaceString

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSelectIndex
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the list box item
    ; Requirement:
    ; Return Value(s): If an error occurs, the return value is $LB_ERR.
    ; If the $i_index parameter is –1, the return value is $LB_ERR even though no error occurred.
    ; User CallTip: _GUICtrlListSelectIndex($h_listbox, $i_index) Select a string and scroll it into view, if necessary (required: <GuiList.au3>)
    ; Author(s): Sokko, Documented and Added To UDFs (Gary Frost (custompcs at charter dot net))
    ; Note(s): Use this message only with single-selection list boxes.
    ; You cannot use it to set or remove a selection in a multiple-selection list box.
    ;
    ;===============================================================================
    Func _GUICtrlListSelectIndex($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SETCURSEL, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETCURSEL, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListSelectIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSelectedIndex
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): In a single-selection list box, the return value is the zero-based
    ; index of the currently selected item. If there is no selection,
    ; the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSelectedIndex($h_listbox) return the index of selected item (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): Do not use this with a multiple-selection list box.
    ;
    ;===============================================================================
    Func _GUICtrlListSelectedIndex($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_GETCURSEL)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_GETCURSEL, 0, 0)
    EndIf
    EndFunc ;==>_GUICtrlListSelectedIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSelectString
    ; Parameter(s): $h_listbox - controlID
    ; $s_text - String to select
    ; $i_index - Optional: Zero-based index of the item before the first item to be searched
    ; Requirement: None
    ; Return Value(s): If the search is successful, the return value is the index of the selected item.
    ; If the search is unsuccessful, the return value is $LB_ERR and the current selection is not changed.
    ; User CallTip: _GUICtrlListSelectString($h_listbox, $s_text[, $i_index=-1]) select item using search string (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): If $i_index is –1, the entire list box is searched from the beginning
    ;
    ;===============================================================================
    Func _GUICtrlListSelectString($h_listbox, $s_search, $i_index = -1)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SELECTSTRING, $i_index, $s_search, 0, "int", "str")
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SELECTSTRING, $i_index, String($s_search))
    EndIf
    EndFunc ;==>_GUICtrlListSelectString

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSelItemRange
    ; Parameter(s): $h_listbox - controlID
    ; $i_flag - Set/Remove select
    ; $i_start - Zero-based index of the first item to select
    ; $i_stop - Zero-based index of the last item to select
    ; Requirement: multi-select style
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSelItemRange($h_listbox, $i_flag, $i_start, $i_stop) Select range by index in a multiple-selection list box (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ; Select items from $i_start to $stop indices (inclusive)
    ; Can select a range only within the first 65,536 items
    ; $i_flag == 1 selects
    ; $i_flag == 0 removes select
    ;
    ;===============================================================================
    Func _GUICtrlListSelItemRange($h_listbox, $i_flag, $i_start, $i_stop)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SELITEMRANGE, $i_flag, $i_stop * 65536 + $i_start)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SELITEMRANGE, $i_flag, $i_stop * 65536 + $i_start)
    EndIf
    EndFunc ;==>_GUICtrlListSelItemRange

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSelItemRangeEx
    ; Parameter(s): $h_listbox - controlID
    ; $i_start - Zero-based index of the first item to select
    ; $i_stop - Zero-based index of the last item to select
    ; Requirement: multi-select style
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSelItemRangeEx($h_listbox, $i_start, $i_stop) Selects items from $i_start to $i_stop (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ; If $i_start > $i_stop Then items are un-selected
    ;
    ;===============================================================================
    Func _GUICtrlListSelItemRangeEx($h_listbox, $i_start, $i_stop)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SELITEMRANGEEX, $i_start, $i_stop)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SELITEMRANGEEX, $i_start, $i_stop)
    EndIf
    EndFunc ;==>_GUICtrlListSelItemRangeEx

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSetAnchorIndex
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the index of the new anchor item.
    ; Requirement: multi-select style
    ; Return Value(s): If the message succeeds, the return value is zero.
    ; If the message fails, the return value is $LB_ERR.
    ; User CallTip: _GUICtrlListSetAnchorIndex($h_listbox, $i_index) Set the Anchor Idex (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ;
    ;===============================================================================
    Func _GUICtrlListSetAnchorIndex($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SETANCHORINDEX, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETANCHORINDEX, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListSetAnchorIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListGetCaretIndex
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the list box item that is to receive the focus rectangle.
    ; $i_bool - Optional: If this value is FALSE, the item is scrolled until it is fully visible; if it is TRUE, the item is scrolled until it is at least partially visible.
    ; Requirement: multi-select style
    ; Return Value(s): The return value is the zero-based index of the selected list box item.
    ; If nothing is selected $LB_ERR can be returned.
    ; User CallTip: _GUICtrlListSetCaretIndex($h_listbox, $i_index[, $i_bool=1]) Set the focus rectangle to the item at the specified index (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ;
    ;===============================================================================
    Func _GUICtrlListSetCaretIndex($h_listbox, $i_index, $i_bool = 1)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SETCARETINDEX, $i_index, $i_bool)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETCARETINDEX, $i_index, $i_bool)
    EndIf
    EndFunc ;==>_GUICtrlListSetCaretIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSetHorizontalExtent
    ; Parameter(s): $h_listbox - controlID
    ; $i_pixels - Specifies the number of pixels by which the list box can be scrolled.
    ; Requirement: None.
    ; Return Value(s): None.
    ; User CallTip: _GUICtrlListSetHorizontalExtent($h_listbox, $i_num) Set the width, in pixels, by which a list box can be scrolled horizontally (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; Note(s): To respond to the $LB_SETHORIZONTALEXTENT message,
    ; the list box must have been defined with the $WS_HSCROLL style.
    ;
    ;===============================================================================
    Func _GUICtrlListSetHorizontalExtent($h_listbox, $i_pixels)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    _SendMessage($h_listbox, $LB_SETHORIZONTALEXTENT, $i_pixels)
    Else
    GUICtrlSendMsg($h_listbox, $LB_SETHORIZONTALEXTENT, $i_pixels, 0)
    EndIf
    EndFunc ;==>_GUICtrlListSetHorizontalExtent

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSetLocale
    ; Parameter(s): $h_listbox - controlID
    ; $s_locale - locale
    ; Requirement: None
    ; Return Value(s): Returns previous locale or $LB_ERR
    ; User CallTip: _GUICtrlListSetLocale($h_listbox, $s_locale) Set the locale (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): "0409" for U.S. English
    ; see @OSLang for string values
    ;
    ;===============================================================================
    Func _GUICtrlListSetLocale($h_listbox, $s_locale)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return Hex(_SendMessage($h_listbox, $LB_SETLOCALE, Dec($s_locale)), 4)
    Else
    Return Hex(GUICtrlSendMsg($h_listbox, $LB_SETLOCALE, Dec($s_locale), 0), 4)
    EndIf
    EndFunc ;==>_GUICtrlListSetLocale

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSetSel
    ; Parameter(s): $h_listbox - controlID
    ; $i_flag - Optional: Select/UnSelect
    ; $i_index - Optional: Specifies the zero-based index of the item
    ; Requirement: multi-select style
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSetSel($h_listbox [, $i_flag] , $i_index]]) Select string(s) in a multiple-selection list box (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): DOES NOT WORK WITH SINGLE-SELECTION LIST BOXES
    ; $i_flag == 0 means unselect
    ; $i_flag == 1 means select
    ; $i_flag == -1 means toggle select/unselect of item
    ; An $i_index of -1 means to toggle select/unselect of all items (ignores the $i_flag).
    ;
    ;===============================================================================
    Func _GUICtrlListSetSel($h_listbox, $i_flag = -1, $i_index = -1)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $i_ret
    If IsHWnd($h_listbox) Then
    If $i_index == -1 Then ; toggle all
    For $i_index = 0 To _GUICtrlListCount($h_listbox) - 1
    $i_ret = _GUICtrlListGetSelState($h_listbox, $i_index)
    If ($i_ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If ($i_ret > 0) Then ;If Selected Then
    $i_ret = _SendMessage($h_listbox, $LB_SETSEL, 0, $i_index)
    Else
    $i_ret = _SendMessage($h_listbox, $LB_SETSEL, 1, $i_index)
    EndIf
    If ($i_ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Next
    ElseIf $i_flag == -1 Then ; toggle state of index
    If _GUICtrlListGetSelState($h_listbox, $i_index) Then ;If Selected Then
    Return _SendMessage($h_listbox, $LB_SETSEL, 0, $i_index)
    Else
    Return _SendMessage($h_listbox, $LB_SETSEL, 1, $i_index)
    EndIf
    Else
    Return _SendMessage($h_listbox, $LB_SETSEL, $i_flag, $i_index)
    EndIf
    Else
    If $i_index == -1 Then ; toggle all
    For $i_index = 0 To _GUICtrlListCount($h_listbox) - 1
    $i_ret = _GUICtrlListGetSelState($h_listbox, $i_index)
    If ($i_ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If ($i_ret > 0) Then ;If Selected Then
    $i_ret = GUICtrlSendMsg($h_listbox, $LB_SETSEL, 0, $i_index)
    Else
    $i_ret = GUICtrlSendMsg($h_listbox, $LB_SETSEL, 1, $i_index)
    EndIf
    If ($i_ret == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Next
    ElseIf $i_flag == -1 Then ; toggle state of index
    If _GUICtrlListGetSelState($h_listbox, $i_index) Then ;If Selected Then
    Return GUICtrlSendMsg($h_listbox, $LB_SETSEL, 0, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETSEL, 1, $i_index)
    EndIf
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETSEL, $i_flag, $i_index)
    EndIf
    EndIf
    EndFunc ;==>_GUICtrlListSetSel

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSetTopIndex
    ; Parameter(s): $h_listbox - controlID
    ; $i_index - Specifies the zero-based index of the item
    ; Requirement: None
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSetTopIndex($h_listbox, $i_index) ensure that a particular item in a list box is visible (required: <GuiList.au3>)
    ; Author(s): CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListSetTopIndex($h_listbox, $i_index)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If IsHWnd($h_listbox) Then
    Return _SendMessage($h_listbox, $LB_SETTOPINDEX, $i_index)
    Else
    Return GUICtrlSendMsg($h_listbox, $LB_SETTOPINDEX, $i_index, 0)
    EndIf
    EndFunc ;==>_GUICtrlListSetTopIndex

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSort
    ; Parameter(s): $h_listbox - controlID
    ; Requirement: None
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSort($h_listbox) Re-sorts list box if it has the LBS_SORT style (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): Re-sorts list box if it has the LBS_SORT style
    ; Might be useful if you use InsertString
    ;
    ;===============================================================================
    Func _GUICtrlListSort($h_listbox)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $bak = _GUICtrlListGetText($h_listbox, 0)
    If ($bak == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListDeleteItem($h_listbox, 0) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Return _GUICtrlListAddItem($h_listbox, $bak)
    EndFunc ;==>_GUICtrlListSort

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

    ;===============================================================================
    ;
    ; Description: _GUICtrlListSwapString
    ; Parameter(s): $h_listbox - controlID
    ; $i_indexA - Zero-based index item to swap
    ; $i_indexB - Zero-based index item to swap
    ; Requirement: None
    ; Return Value(s): If an error occurs, the return value is $LB_ERR
    ; User CallTip: _GUICtrlListSwapString($h_listbox, $i_indexA, $i_indexB) Swaps the text of two items at the specified indices (required: <GuiList.au3>)
    ; Author(s): Gary Frost (custompcs at charter dot net)
    ; CyberSlug
    ; Note(s): None
    ;
    ;===============================================================================
    Func _GUICtrlListSwapString($h_listbox, $i_indexA, $i_indexB)
    If Not _IsClassName ($h_listbox, "ListBox") Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    Local $itemA = _GUICtrlListGetText($h_listbox, $i_indexA)
    Local $itemB = _GUICtrlListGetText($h_listbox, $i_indexB)
    If ($itemA == $LB_ERR Or $itemB == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListDeleteItem($h_listbox, $i_indexA) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListInsertItem($h_listbox, $itemB, $i_indexA) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)

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

    If (_GUICtrlListDeleteItem($h_listbox, $i_indexB) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    If (_GUICtrlListInsertItem($h_listbox, $itemA, $i_indexB) == $LB_ERR) Then Return SetError($LB_ERR, $LB_ERR, $LB_ERR)
    EndFunc ;==>_GUICtrlListSwapString

    [/autoit]

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™