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. misterspeed

Beiträge von misterspeed

  • MouseHover bei Checkboxen wider Willen

    • misterspeed
    • 14. Juli 2011 um 00:51

    Ich hab das ehrlich gesagt nicht ganz durchblickt wie du die Versionsnummern aus der Registry ausliest. Soweit ich das richtig verstanden hab ist das aber doch immer gleich und wird nur durch die Variable $uRunSuch beeinflusst. Wenn das seither funktioniert hat muss das ja eigentlich auch mit der Zusammenfassung noch funktionieren, sofern du daran gedacht hast diese Variable umzubenennen wie in meinem Beispiel. Wenn du natürlich da noch $uRunSuch1 drin stehen hast liefert dir die funktion auch immer die Versionsnummer des ersten Programms.

  • MouseHover bei Checkboxen wider Willen

    • misterspeed
    • 13. Juli 2011 um 19:07

    Ok dann hier noch die Ergänzung zum Beispiel mit den Icons. Da das Programm Icon sich nicht zur Laufzeit ändern muss brauchste da wie gehabt keine Variable. Beim Status Icon brauchst du hingegen eine. Du gibst erstmal allen Status Icons das selbe Bild beim erstellen. In deiner runtime Funktion tauscht du das bild je nach Status dann aus. Das machst du dann so:

    Spoiler anzeigen
    [autoit]


    ; Main.au3
    ;...
    $CheckRun1=guictrlcreatecheckbox(...)
    guictrlcreateicon(...) ; das unwichtige Programmicon, bleibt immer gleich, muss also wohl auch nicht in der status funktion erneuert werden, daher nicht notwendig die controlid zu speichern
    $StatusIconRun1=guictrlcreateicon(...) ; hier dann z.B. standardmässig erstmal ein rotes X... oder was auch immer du im Angebot hast in der dll
    ;...

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

    ; UDF:

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

    Func alleRuntimesChecken()
    _Runtime($uRunSuch1,$uRunAktVer1,$CheckRun1, $StatusIconRun1) ; icon control id muss nun auch übergeben werden
    _Runtime($uRunSuch2,$uRunAktVer2,$CheckRun2, $StatusIconRun2)
    ;...
    endfunc

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

    Func _Runtime($uRunSuch,$uRunAktVer,$CheckRun,$StatusIconRun) ; icon control id wird nun benötigt
    ;...
    ;hier hattest du ja deine if konstruktion, da setzt du nun je nach statusfall das Icon neu
    GUICtrlSetImage ( $iconStatusRun, $uFileIconLib, 9)
    ;...
    endfunc

    [/autoit]

    EDIT:
    Ahja so wie ich das grad sehe brauchst du in der runtime Funktion dann auch noch die ctrlid des Labels um es mit setstate du deaktivieren, also die Funktion noch um einen 5. Parameter ergänzen, so wie ich es gerade für das Status Icon gemacht habe.
    Die Funktion alleRuntimesChecken könnte man btw in einer 3 zeiligen For Schleife unterbringen wenn alle Controlids, Namen und Versionsnummern in einem Array gespeichert wären, so wie im ersten Verbesserungsvorschlag von mir umrissen, aber denke mit der Funktionszusammenfassung hast du schonmal einiges erreicht und deine Quellcode locker auf ein drittel geschrumpft. ;)

  • Brauche gleich dreifache Hilfe

    • misterspeed
    • 13. Juli 2011 um 17:48

    Ein minimiertes Fenster stellt man btw mit "$SW_Restore" wieder her nicht mit "$SW_Maximize". Dein Hauptprogramm reagiert wohl deswegen nicht mehr, weil es in der "do until" Schleife hängen bleibt. Verwende statt winexists hier doch einfach "$pid=run(...)" und als Abbruchbedingung dann "Not procesexists($pid)".

    EDIT:

    Oder noch einfacher gleich ohne do until Schleife und stattdessen mit runwait(..)

    [autoit]


    ; fenster minimieren
    runwait(...)
    ; fenster wiederherstellen

    [/autoit]
  • Alle Controls auf einmal löschen

    • misterspeed
    • 13. Juli 2011 um 16:32

    Hmm interessante Variante mit den dummys. Das kann man auch prima zum aus und einblenden von controls verwenden wenn man diese nicht in ein array speichern will um sie ggf durch einen besser identifizierbaren variablenamen ansprechen zu können. Gefällt mir, hätte ich auch schon das ein oder andere mal brauchen können.

  • MouseHover bei Checkboxen wider Willen

    • misterspeed
    • 13. Juli 2011 um 16:17

    Ich hab auch mal so angefangen, doch gerade bei derart umfangreichen GUI's stösst man eben schnell an die Grenzen. und es kostet unmengen an Zeit sowas dann nachträglich wieder zu ändern. Ich würde heute kein umfangreiches Projekt mehr anfangen ohne mir vorher Gedanken über eine optimalen Funktionsaufbau zu machen, man benötigt da zwar Zeit dafür letzten Endes hat man aber ein flexibleres und einfacheres Ergebnis und spart sich zukünftig die Zeit bei Änderungen / Erweiterungen.

    Unabhängig von meine vorschlägen zur dynamischen GUI Erstellung hast du aber in deiner UDF schon durch simple Zusammenfassung der reduntanten Funktionen erhebliches Optimierungspotential. So wie ich das überflogen habe unterscheiden sich die Funktionen sogut wie garnicht, lediglich durch die ControlID und die Suchbegriffe / Versionsnummern. Ich hab dir mal anhand von runtimes1-14 ein Beispiel erstellt wie du alle 14 Funktionen durch eine einzige ersetzen kannst, ganz ohne Arrays und komplett an deinen bisherigen Code angelehnt:

    Spoiler anzeigen
    [autoit]


    #cs
    $checkrun 1-14 erstellst du in du in der haupt au3 ganz oben da wo du auch die restlichen gui elemente erstellst, also hier:
    ; Abfrage 1. Anwendungen
    ;
    _NET_1()
    _NET_2()
    _NET_3()
    _NET_4()
    _NET_5()
    _Runtime_1() ; statt dem funktionsaufruf machst du hier die ganzen ctrlcreates und setdata, setcolor usw, eben das was ich dir unten aus der neuen runtime entfernt habe....
    _Runtime_2()
    _Runtime_3()
    _Runtime_4()
    _Runtime_5()
    _Runtime_6()
    _Runtime_7()
    _Runtime_8()
    _Runtime_9()
    _Runtime_10()
    _Runtime_11()
    _Runtime_12()
    _Runtime_13()
    _Runtime_14()
    _Anwendung_1()
    _Anwendung_4()
    _Anwendung_5()
    _Anwendung_7()
    _Anwendung_8()
    _Office_6()

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

    ;
    ; ********************************************************************************************************************************************************************************************************************************
    ; Ende Anwendungen

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

    ACHTUNG: hier dann einmalig gleich die Funktion alleRuntimesChecken aufrufen, damit bei Programmstart nach Controlerstellung alle Checkboxen gesetzt werden...

    alleruntimeschecken()

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

    #ce

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

    Func alleRuntimesChecken() ; das rufst du dann z.b. beim button druck refresh auf, bzw auch einmalig nachdem du die controls oben in der haupt au3 erstellt hast
    _Runtime($uRunSuch1,$uRunAktVer1,$CheckRun1) ; du übergibst der Funktion alle Daten die sie braucht, somit kann die selbe Funktion für alle Controls verwendet werden
    _Runtime($uRunSuch2,$uRunAktVer2,$CheckRun2)
    _Runtime($uRunSuch3,$uRunAktVer3,$CheckRun3)
    _Runtime($uRunSuch4,$uRunAktVer4,$CheckRun4)
    _Runtime($uRunSuch5,$uRunAktVer5,$CheckRun5)
    _Runtime($uRunSuch6,$uRunAktVer6,$CheckRun6)
    _Runtime($uRunSuch7,$uRunAktVer7,$CheckRun7)
    _Runtime($uRunSuch8,$uRunAktVer8,$CheckRun8)
    _Runtime($uRunSuch9,$uRunAktVer9,$CheckRun9)
    _Runtime($uRunSuch10,$uRunAktVer10,$CheckRun10)
    _Runtime($uRunSuch11,$uRunAktVer11,$CheckRun11)
    _Runtime($uRunSuch12,$uRunAktVer12,$CheckRun12)
    _Runtime($uRunSuch13,$uRunAktVer13,$CheckRun13)
    _Runtime($uRunSuch14,$uRunAktVer14,$CheckRun14)
    EndFunc

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

    Func _Runtime($uRunSuch,$uRunAktVer,$CheckRun) ; Für alle runtimes bzw falls die funktion auch zu net ud dem anderen kram identishc ist kannste das für alles benutzen hab mir die funktionen nicht im detail angesehen...
    $iEval = 1
    $iSearch = 0
    $sVersion = ""
    $sDisplay = ""

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

    While 1
    $sCurrent = RegEnumKey($uRegUninst, $iEval)
    If @error Then ExitLoop
    $sKey = $uRegUninst & $sCurrent
    $sDisplay = RegRead($sKey, "DisplayName")

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

    If StringRegExp($sDisplay, ".*" & $uRunSuch & ".*") Then ; $uRunSuch1 durch $uRunSuch ersetzt, welches beiom Funktionsaufruf übergeben wird
    $sVersion = RegRead($sKey, "DisplayVersion")
    $iSearch = 1
    If $iSearch = 1 Then
    If _VersionCompare($uRunAktVer, $sVersion)=-1 or _VersionCompare($uRunAktVer, $sVersion)=1 Then ; $uRunAktVer1 durch $uRunAktVer ersetzt, wird beim Aufruf übergeben
    GUICtrlSetState($checkRun, $GUI_ENABLE) ; $checkRun1 durch $checkRun ersetzt, die kontrollerstellung hier komplett entfernt, das machste in der main au3
    Else
    GUICtrlSetState($checkRun, $GUI_DISABLE) ; $checkRun1 durch $checkRun ersetzt, die kontrollerstellung hier komplett entfernt, das machste in der main au3
    EndIf
    ExitLoop
    ElseIf $iSearch = 0 Then
    ExitLoop
    EndIf
    EndIf
    $iEval += 1
    WEnd
    If $iSearch = 0 Then
    GUICtrlSetState($CheckRun, $GUI_CHECKED)
    EndIf
    EndFunc

    [/autoit]

    Das ganze ist nicht getestet und ich weiss gerade auch nicht wie du die Icons setzt, ich glaube du brauchst zusätzlich zum setstate für die checkboxen auch noch ein setdata oder so für die statusicons, sofern die sich je nach suche unterscheiden sollten, aber dein Code ist mir zu umfangreich um mich durch sämtliche Funktionen zu wühlen um 100% zu verstehen wo du was und vorallem wie du das machst. Denke mit dieser Beispielzusammenfassung kannst du das auch selbst umsetzen. Sollte danach noch Wunsch zur Optimierung bestehen, z.B. über , ini Files, Arrays und zugehöroge Schleifen kannst du ja deinen optimierten und von redundanz bereinigten Code nochmal posten. Doppelte Funktionen braucht man nicht! Immer wenn du große Passagen per C&P übernimmst ist das ein Zeichen, dass du das auch mit einer einzigen Funktion hättest realisieren können. Das ist denke ich eine sehr einfach Aufgabe die du jetzt ohne großes Einarbeiten in dir noch fremde Themenbereiche erledigen kannst. Viel Spass und Erfolg beim kürzen deines Quellcodes ;)

  • Function klappt nicht so!

    • misterspeed
    • 13. Juli 2011 um 13:48

    Nein Admin Rechte werden soweit ich weiss nicht benötigt, denn er schreibt in den Schlüssel HKCU, für die eigenen Registry Schlüssel hat man immer die Berechtigung. Sinnvoller wäre es aber diese Änderung als Administrator vorzunehmen und zwar für jeden Benutzer Account seperat (HKEY_USERS\"userid"\...). Ich bin mir auch nicht sicher was passiert wenn man für den Current User "DisableRegistryTools" setzt. Ist davon dann nur der Windows Registry Editor betroffen oder ggf. auch Autoit? Das würde dann bedeuten, dass man es nicht mehr selbst rückgängig machen kann.

    Edit: Laut google ist davon nur der Win Registry Editor betroffen, somit keinerlei Auswirkungen auf externe Editoren wie Autoit... macht es ja eigtl total unsinnig. Wirklich verhindern kann man den Zugriff also nur per User Berechtigungen die man für einzelne Registry Schlüssel mit Admin Rechten festlegt. Die Schlüssel selbst sind total wirkungslos sofern man weiss wie man sie ändert. Nix weiter als eine umgehbare Kindersicherung sozusagen.

  • Function klappt nicht so!

    • misterspeed
    • 13. Juli 2011 um 13:34

    Zeile 26 von Schnitzel sollte wohl eher so lauten:

    [autoit]


    If $bTaskmgr Then

    [/autoit]
  • exe in gui einbinden und übermalen

    • misterspeed
    • 13. Juli 2011 um 02:37

    Vernünftige Sätze bilden, dein Script posten und die Fehler so beschreiben, dass sie jeder nachvollziehen kann wäre schonmal ein Anfang. :pinch:

    Mit so Dingen wie "woanders hindrücken" oder "gdi+ erdrückt irgendwas" kann kein Mensch was anfangen. Wir wissen weder wie dein Script aussieht noch was du da eigentlich machst oder vorhast, also erwarte nicht dass wir dir folgen können bei deinen sehr dürftigen Ausführungen.

  • exe in gui einbinden und übermalen

    • misterspeed
    • 12. Juli 2011 um 22:12

    Den WS_POPUP Stil müsste man mit dieser Funktion für fremde/externe Fenster setzen können:

    [autoit]

    _WinAPI_SetWindowLong()

    [/autoit]
  • MouseHover bei Checkboxen wider Willen

    • misterspeed
    • 12. Juli 2011 um 21:40

    Hier mal noch einige Verbesserungsvorschläge um deinen Code radikal zu vereinfachen und besser erweiterbar zumachen:

    1. Benutze eine ini Datei um zu bestimmen welche Programme in der GUI vorhanden sein sollen, wie diese heissen und wo sich die Installdatei befindet, dadurch kannst du später einfach neue Software hinzufügen oder die Version ändern ohne den GUI Aufbau im Quellcode anzupassen.

    Code
    [Runtimes]
    Adobe Flash Player 10 Active X=Pfad zur Installdatei|ggf. auch noch id des icons, falls dieses nicht aus der installdatei eingelesen wird
    Adobe Flash Player 10 Plugin=...
    ....
    [Tools+Apps]
    Adobe Reader X=...
    ...
    [...]

    2. Benutze ein 2D Array zum speichern aller GUI Relevanten Dinge, dazu zählen Sachen wie der Labeltext den du aus der ini ausliest, als auch die Controlid des Labels, die Controlid der zugehörigen Checkbox usw.
    Beispiel Array könnte so aufgebaut sein

    Code
    ...........Spalte0|Spalte1|Spalte2|Spalte3...
    Zeile 0: -------------------------------------------------
    Zeile 1: Runtimes|Adobe Flash Player 10 Active X|Pfad exe|Pfad Icon|Controlid Label|Control ID Checkbox
    Zeile 2: Runtimes|Adobe Flash Player 10 Plugin|Pfad exe|Pfad Icon|Controlid Label|Control ID Checkbox
    Zeile 3: Tools+Apps|Adobe Reader X|Pfad exe|Pfad Icon|Controlid Label|Control ID Checkbox

    3. Arbeite mit Schleifen um die Controls zu erstellen und speichere die ID's im dafür gedachten Array. Das hat den Vorteil, dass du unmengen an nichtssageneden Variablen einsparst und ausserdem nur wenige Zeilen Code für hunderte Controls benötigst.

    [autoit]


    global $aControls[$AnzahlGefundenerIniSchluessel][$AnzahlDerSpaltenDieDugerneHabenWillst]

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

    for $i=1 to ubound($aControls)-1
    if $aControls[$i][0]="Runtimes" then $left = 50
    if $aControls[$i][0]="Tools+Apps" then $left = 250
    if $aControls[$i][0]=".NET" then $left = 450
    ;usw

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

    $aControls[$i][4]=guictrlcreatelabel($acontrols[$i][1],$left,$i*30,100,20) ; hier erstellst du ein Label mit dem Namen den du zuvor aus der ini Datei ausgelesen und in [$i][1] gespeichert hast, dabei musst du die Koordinaten des Controls durch $i bestimmen lassen, so dass die controls je nach $i Wert eben um soundsoviel Pixel nach unten verschoben werden
    $aControls[$i][5]=guictrlcreatecheckbox("",$left+120,$i*30)
    next

    [/autoit]

    Wenn du da etwas Hirnschmalz reinstecks kannst du die GUI Erstellung schön vereinfachen. Mein Beispiel ist hier noch fehlerhaft/unvollständig, aber es geht ja nur darum zu zeigen wie man sowas machen kann.

    Gut aber ich will dir das nicht aufdrängen, denn es wäre sicher erhebliche Arbeit um deinen bestehenden Code daraufhin zu verändern. Über soetwas hätte man sich besser vorher Gedanken gemacht. Vielleicht hast du ja mal Lust und Zeit dich in dynamische GUI Erstellung reinzuarbeiten und kannst das dann irgendwann mal anpassen. Für zukünftige Änderungen/Erweiterungen fährst du mit den hier erklärten Methoden jedenfalls besser.

  • MouseHover bei Checkboxen wider Willen

    • misterspeed
    • 12. Juli 2011 um 20:48

    Hi Prickel,

    so wie ich das beim überfliegen dieses umfangreichen Quellcodes gesehen habe machst du einen entscheidenden Fehler. Der Refreshbutton ruft die Funktionen aus der UDF auf, ich nehm nun mal _Runtime_1 zum Beispiel. Dort und auch in allen anderen der Funktionen erstellst du unter anderem die Checkbox, sowie zig andere GUI Elemente. Das Problem ist hierbei jedoch, dass diese ja bereits existieren. du erstellst mit jedem mal den du diesen Button betätigst die selben Controls erneut. Das hat zur Folge, dass die neuen Controls über den alten liegen, aber beide noch da sind. Das führt dann ggf. zu Anzeigefehlern.

    Du solltest das also ändern und jedes Control nur einmalig beim initialisieren der GUI erstellen. In den UDF Funktionen prüfst du dann nur noch ob die Elemente benötigt werden oder nicht und machst diese dann unsichtbar, deaktiviert , unchecked, anderer label text oder was auch immer du gerne hättest. Damit du den Zustand von bestehenden Elementen nachträglich verändern kannst ist es zwingend notwendig die zugehöriigen ControlIDs in Variablen oder in deinem Fall besser in Arrays zu speichern. Statt GUICtrlSetState(-1, $GUI_DISABLE) verwendest du dann eben GUICtrlSetState($CheckRun1, $GUI_DISABLE)

  • Daten aus DataGrid auslesen

    • misterspeed
    • 12. Juli 2011 um 20:12

    Also ich bin mir nicht sicher was du nun eigentlich erreichen willst. Sollen die Daten in der Tabelle rechts ausgelesen werden? Wenn ja dann würde ich mal an deiner Stelle diese Funktion testen:

    [autoit]

    ControlListView()

    [/autoit]

    Das ganze schaut jedenfalls nach einen Listview Control aus und somit solltest du mit der genannten Funktion auch an alle Daten der Tabelle kommen.

  • Ini abfragen, ggf erstellen und weitermachen

    • misterspeed
    • 12. Juli 2011 um 18:06

    Da du ja scheinbar Probleme mit mehreren GUI's hast hab ich dir mal eine Lösung gebastelt und diese kommentiert. Vielleicht hilft es dir ja das ganze besser zu verstehen.

    Spoiler anzeigen
    [autoit]


    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <IE.au3>
    #include <Array.au3>
    #include <Date.au3>
    #include <INet.au3>
    #include <file.au3>
    #include <Timers.au3>
    #include <GuiButton.au3>

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

    Global $GUI_config
    Global $config_input1
    Global $config_input2
    Global $config_ini = "pv_cgi_csv.ini"
    Global $needconfig = True
    Global $Pfad
    Global $webPfad

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

    Opt("GUIonEventMode", 1)
    If Not FileExists($config_ini) Then
    $auswahl = MsgBox(4132, "Konfigurationsfehler!", "Konfigurationsdatei existiert noch nicht. Möchten Sie sie jetzt anlegen?")

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

    If $auswahl = 7 Then Exit
    If $auswahl = 6 Then create_config_gui()
    Else
    $needconfig = False ; übergeht die warteschleife und liest dann die ini aus, welche ja schon existiert
    EndIf

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

    While $needconfig = True ; hier wartet deine gui solange bis im config Fenster speichern geklickt wird, events der configgui werden erkannt
    Sleep(10)
    WEnd

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

    read_my_ini()

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

    ; main gui erstellen:

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

    $GUI_main = GUICreate("Main",600,400)
    $main_label_Pfad = GUICtrlCreateLabel($Pfad,40,40,300)
    $main_label_WebPfad = GUICtrlCreateLabel($webPfad,40,80,300)
    $main_Exit_btn = GUICtrlCreateButton("Beenden",220,200)
    GUICtrlSetOnEvent(-1,"_exit")
    GUISetState()

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

    While 1 ; hier die Hauptschleife deiner GUI
    Sleep(10)
    WEnd

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

    Func create_config_gui()
    $GUI_config = GUICreate("config",300,300)
    $config_input1 = GUICtrlCreateInput("Pfad",20,20,260)
    $config_input2 = GUICtrlCreateInput("Webpath",20,60,260)
    $config_save_btn = GUICtrlCreateButton("Speichern",120,200)
    GUICtrlSetOnEvent(-1,"create_ini_file") ; klickt man den speichern button wird die ini create funktion aufgerufen
    $config_abort_btn = GUICtrlCreateButton("Abbrechen",200,200)
    GUICtrlSetOnEvent(-1,"_exit")
    GUISetState()
    ; hinweis: im onevet mode muss sich das script immer ausserhalb einer Funktion befinden damit events erkannt werden
    ; daher darf hier keinesfalls eine Schleife verwendet werden, dies würde dafür sorgen, dass klicks auf den Button
    ; nichts bewirken...
    EndFunc

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

    Func create_ini_file()
    $checkresult = check_user_input()
    if $checkresult = -1 then return MsgBox(0,"Fehler","Deine Angaben waren ungültig!") ; verlässt die Funktion ohne die config gui zu löschen und eine ini zu erzeugen

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

    _FileCreate("pv_cgi_csv.ini")
    IniWrite($config_ini,"Pfad","tool1",GUICtrlRead($config_input1))
    IniWrite($config_ini,"Webpath","webtool1",GUICtrlRead($config_input2))
    $needconfig = False
    GUIDelete($GUI_config) ;config gui wieder löschen, alternativ könnte man sie auch mit guisetstate($GUI_HIDE,$GUI_config) unsichtbar machen
    EndFunc

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

    Func check_user_input()
    if GUICtrlRead($config_input1) = "TEST" Then return -1 ; Fehler
    if GUICtrlRead($config_input2) = "Falsch" Then return -1 ; Fehler
    Return 1 ; keine der if bedingungen hat Fehler festgestellt, also war die Prüfung okay
    EndFunc

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

    Func read_my_ini()
    ;------(jetzt) Vorhandene INI-Datei lesen und Werte initialisieren
    $pathin = IniReadSection($config_ini, "Pfad")
    $Pfad = $pathin[1][1]

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

    $webpathin = IniReadSection($config_ini, "Webpath")
    $webPfad = $webpathin[1][1]
    EndFunc

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

    Func _exit()
    Exit
    EndFunc

    [/autoit]

    EDIT: Noch eine Funktion zur Prüfung der Usereingaben hinzugefügt
    EDIT2: Noch einen Abbrechen/Beenden Button in der config GUI hinzugefügt

  • Brauche gleich dreifache Hilfe

    • misterspeed
    • 12. Juli 2011 um 12:13

    Zu 1:

    Spoiler anzeigen
    [autoit]


    ; ...auszug while schleife...
    Case $FrageButton
    rechnen() ; gesamt ergebnis
    Case $Plus
    rechnen(2) ; plus 1
    rechnen() ; gesamt ergebnis
    Case $Minus
    rechnen(3) ; minus 1
    rechnen() ; gesamt ergbnis
    ; ...auszug while schleife...

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

    Func rechnen($aufgabe=1) ; 1=gesamt ergebnis berechnen , 2=addition+1 ; 3=subtraktion-1
    if $aufgabe=1 Then
    GUICtrlSetData($h_l1, $aDaten[$iCurNum][1] & $aDaten[$iCurNum][2] * GUICtrlRead($FrageInput))
    GUICtrlSetData($h_l2, $aDaten[$iCurNum][3] & $aDaten[$iCurNum][4] * GUICtrlRead($FrageInput))
    GUICtrlSetData($h_l3, $aDaten[$iCurNum][5] & $aDaten[$iCurNum][6] * GUICtrlRead($FrageInput))
    EndIf
    if $aufgabe = 2 Then GUICtrlSetData($FrageInput,GUICtrlRead($FrageInput)+1)
    if $aufgabe = 3 Then GUICtrlSetData($FrageInput,GUICtrlRead($FrageInput)-1)
    EndFunc

    [/autoit]

    Zu 2:

    Beispiel für Tabs ist in der Hilfe zufinden

    Zu 3:

    Enter im Inputfeld funktioniert ohne Änderungen an deinem Script, funktioniert nur nicht wenn einer der Butons plus/minus gedrückt wird, da eben der Focus dann auf diesem Button und nicht mehr auf dem Berechnen Button ist. Durch meine Einbindung des Plus und Minus Buttons hat sich das aber wohl nun auch erledigt.

  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 10. Juli 2011 um 04:25

    Keine Ahnung was du genau meinst, aber da waren noch etliche Fehler drin. Eventuell lag es bei dir an der Auflösung, denn die Höhe der GUI war ja fix eingestellt. In der jetzigen Version wird immer die komplette verfügabre Bildhöhe verwendet. also ebenfalls dynamisch. Was noch stört ist dieser GDI redraw Kram, dadurch wird die Schrift unscharf und fett, werde wohl doch noch Name's Methode einbauen um den Text vor dem Neuzeichnen mit einem Rechteck zu übermalen. Ausserdem noch nicht berücksichtigt sind einklappendene Taskleisten, da dürfte evtl die dll Methode von i2c helfen.

    Hier mal ein Update:

    Change:
    - multiple Ordner via ini Datei öffnen und dynamisch bei wechselnden Auflösungen anordnen und resizen
    - Winsettitle für geöffnete Ordner (funktioniert nicht immer, ggf. wird größeres Sleep benötigt)
    - Diverse Bugfixes bei der dynamischen Sidebar Anpassung
    - GUI Höhe nun dynamisch auf Maximalhöhe

    Spoiler anzeigen
    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>
    #include <winapi.au3>
    #include <array.au3>
    #include <file.au3>
    AutoItSetOption ( "TrayIconHide" , 1 )

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

    Global Const $iPI = 3.1415926535897932384626433832795
    Global $Mouse_X_Pos = 0 , $visible = True , $i=1
    Global $folderhandles[1]
    Global $iniFile = @ScriptDir & "\sidebar.ini"
    Global $aPaths[1]
    Global $LastFolderRefresh=-1

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

    readsettings()

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

    $orientation = "rechts"
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $taskbar = 0
    Else
    $taskbar = $aTaskbar_Pos[3]
    EndIf

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

    if $orientation = "rechts" Then
    $guiWith = 200
    $guiHight = @DesktopHeight-$taskbar;600
    $posLeft = @DesktopWidth-$guiWith
    $posTop = (@DesktopHeight-$taskbar-$guiHight)/2
    EndIf

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

    $hParent = GUICreate("parent")
    GUISetState(@SW_HIDE,$hParent)
    $gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, $WS_POPUP , $WS_EX_TOPMOST, $hParent) ;;; BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS)
    GUISetBkColor(0xA6CAF0)
    WinSetTrans($gui, "", 222)
    $LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUICtrlSetState($LabelLeft,$GUI_DISABLE)
    $LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $btnFolderOpen = GUICtrlCreateButton("Ordner öffnen", 30, 20, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $btnFolderClose = GUICtrlCreateButton("Ordner schliessen", 30, 55, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUICtrlSetState($btnFolderClose,$GUI_DISABLE)
    $btnDebug = GUICtrlCreateButton("Debug", 30, 90, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUISetState(@SW_SHOW)

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

    $con_menu = GUICtrlCreateContextMenu()
    $con_menu_beenden = GUICtrlCreateMenuItem("Beenden", $con_menu)

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

    _GDIPlus_Startup()
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
    _ReDrawAngledText("Desktop Sidebar BETA")

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

    GUIRegisterMsg($WM_MOVE, '_WM_MOVE')

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE , $con_menu_beenden
    _GDIPlus_GraphicsDispose ($hGraphics)
    _GDIPlus_ShutDown ()
    Exit
    Case $btnFolderOpen
    GUICtrlSetState($btnFolderClose,$GUI_ENABLE)
    GUICtrlSetState($btnFolderOpen,$GUI_DISABLE)
    calcFensterPos()
    Case $btnFolderClose
    GUICtrlSetState($btnFolderOpen,$GUI_ENABLE)
    GUICtrlSetState($btnFolderClose,$GUI_DISABLE)
    closeFolders()
    Case $btnDebug
    _ArrayDisplay($aPaths)
    _ArrayDisplay($folderhandles)
    EndSwitch
    checkresolution()
    checkmousepos()
    WEnd

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

    Func readsettings()
    if Not FileExists($iniFile) Then
    _FileCreate($iniFile)
    IniWrite($iniFile,"Ordner","example",@TempDir)
    EndIf
    $aPaths = IniReadSection($iniFile,"Ordner")
    EndFunc

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

    Func calcFensterPos()
    Local $x=0 , $y=0 , $w=(@DesktopWidth-20)/2 , $h=(@DesktopHeight-$taskbar)/2

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

    if UBound($aPaths) > 1 then
    for $i=1 to UBound($aPaths)-1
    openfolder($aPaths[$i][1],$aPaths[$i][0],$x,$y,$w,$h)
    if $x=0 Then
    if $y=$h Then
    $y=0
    ContinueLoop
    EndIf
    $x=$w
    Else
    if $y=0 Then
    $y=$h
    ContinueLoop
    EndIf
    $x=0
    EndIf
    Next
    Else
    ConsoleWrite(@CRLF & "Fehler: Keine Pfade im Array...")
    EndIf
    EndFunc

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

    func openfolder($path,$folderT=-1,$folderX=0,$folderY=0,$folderW=200,$folderH=200)
    Local $vorher=WinList("[CLASS:CabinetWClass]")
    Local $size=UBound($vorher)
    Local $search, $nachher, $handle

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

    ;Run('explorer.exe "' & $path & '"')
    ShellExecute($path)
    Local $timeout = TimerInit()
    do
    $nachher=WinList("[CLASS:CabinetWClass]")
    if TimerDiff($timeout)>2000 then return -1
    Until UBound($nachher)>$size

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

    for $i=1 to $nachher[0][0]
    $search = _ArraySearch($vorher,$nachher[$i][1],1,0,1,0,1,1)
    if $search = -1 then
    $handle = $nachher[$i][1]
    ExitLoop
    Else
    $handle = -1
    EndIf
    Next

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

    if $handle <> -1 then
    _ArrayAdd($folderhandles,$handle)
    WinMove($handle,"",$folderX,$folderY,$folderW,$folderH)
    if $folderT <> -1 then
    Sleep(300)
    WinSetTitle($handle,"",$folderT)
    EndIf
    Else
    ConsoleWrite(@CRLF & "Fehler: Fensterhandle konnte nicht ermittelt werden")
    EndIf
    EndFunc

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

    Func closeFolders()
    if UBound($folderhandles) <= 1 Then Return -1
    for $i = 1 to UBound($folderhandles)-1
    WinClose($folderhandles[$i])
    Next
    ReDim $folderhandles[1]
    EndFunc

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

    Func checkresolution()
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $newtaskbar = 0
    Else
    $newtaskbar = $aTaskbar_Pos[3]
    EndIf

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

    if $newtaskbar <> $taskbar then
    Sleep(1000)
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $newtaskbar = 0
    Else
    $newtaskbar = $aTaskbar_Pos[3]
    EndIf
    EndIf

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

    $newGuiHight = @DesktopHeight-$newtaskbar
    $newPosLeft = @DesktopWidth - $guiWith
    $newPosTop = (@DesktopHeight-$newtaskbar-$newGuiHight)/2
    if $newPosLeft <> $posLeft or $newPosTop <> $posTop or $newtaskbar <> $taskbar or $newGuiHight <> $guiHight Then
    $posLeft = $newPosLeft
    $posTop = $newPosTop
    $taskbar = $newtaskbar
    $guiHight = $newGuiHight
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,2)
    _ReDrawAngledText("Desktop Sidebar BETA")
    $visible = True
    GUICtrlSetState($btnFolderClose,$GUI_DISABLE)
    GUICtrlSetState($btnFolderOpen,$GUI_DISABLE)
    closeFolders()
    calcFensterPos()
    GUICtrlSetState($btnFolderClose,$GUI_ENABLE)
    EndIf
    EndFunc

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

    Func checkmousepos()
    $curMouse_X_Pos = MouseGetPos(0)
    if $curMouse_X_Pos <> $Mouse_X_Pos Then
    $Mouse_X_Pos = $curMouse_X_Pos
    if $Mouse_X_Pos < $posLeft And $visible = True Then
    ConsoleWrite( @CRLF & "hide: " & $Mouse_X_Pos )
    WinMove($gui,"",$posLeft+$guiWith-20,$posTop,$guiWith,$guiHight,2)
    _ReDrawAngledText("Desktop Sidebar BETA")
    $visible = False
    EndIf
    if $Mouse_X_Pos >= @DesktopWidth-20 And $visible = False then
    ConsoleWrite( @CRLF & "show: " & $Mouse_X_Pos )

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

    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,2)
    _ReDrawAngledText("Desktop Sidebar BETA")
    $visible = True
    EndIf
    EndIf
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

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

    Func _ReDrawAngledText($labelLefttext)
    GDIPlus_SetAngledText($hGraphics, $labelLefttext, 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
    EndFunc

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

    Func _WM_MOVE($handle)
    If $handle = $gui Then
    ;_ReDrawAngledText()
    $redraw = _WinAPI_UpdateWindow($gui) ; notwendig damit Buttons beim ein/ausblenden gezeichnet werden
    ConsoleWrite(@CRLF & "Redraw: " & $redraw)
    ConsoleWrite(@CRLF & "counter: " & $i)
    $i+=1
    EndIf
    EndFunc

    [/autoit]
  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 9. Juli 2011 um 21:22

    Hab mir bei dir mal noch die Transparenz und das Kontextmenu abgeschaut. Die Lösung von Name22 funktioniert soweit auch, hab mich aber nun entschieden den Text doch nicht zu verändern, sah irgendwo seltsam aus.
    Da mir gerade nix mehr einfällt was man noch ändern könnte betrachte ich den Thread einfach mal als gelöst. Der Vollständigkeit wegen hier noch die fertige Fassung:

    Changes:
    - kein Tray Icon mehr
    - kein Taskbar Eintrag mehr
    - Transparenz
    - Kontextmenu

    Spoiler anzeigen
    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>
    #include <winapi.au3>

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

    AutoItSetOption ( "TrayIconHide" , 1 )

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

    Global Const $iPI = 3.1415926535897932384626433832795
    Global $Mouse_X_Pos = 0 , $visible = True , $i=1

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

    $orientation = "rechts"
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $taskbar = 0
    Else
    $taskbar = $aTaskbar_Pos[3]
    EndIf

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

    if $orientation = "rechts" Then
    $guiWith = 200
    $guiHight = 600
    $posLeft = @DesktopWidth-$guiWith
    $posTop = (@DesktopHeight-$taskbar-$guiHight)/2
    EndIf

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

    $hParent = GUICreate("parent")
    GUISetState(@SW_HIDE,$hParent)
    $gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, $WS_POPUP , $WS_EX_TOPMOST, $hParent) ;;; BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS)
    GUISetBkColor(0xA6CAF0)
    WinSetTrans($gui, "", 222)
    $LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUICtrlSetState($LabelLeft,$GUI_DISABLE)
    $LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Tool 1", 30, 20, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button2 = GUICtrlCreateButton("Tool 2", 30, 55, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUISetState(@SW_SHOW)

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

    $con_menu = GUICtrlCreateContextMenu()
    $con_menu_beenden = GUICtrlCreateMenuItem("Beenden", $con_menu)

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

    _GDIPlus_Startup()
    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
    _ReDrawAngledText("My Sidebar")

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

    GUIRegisterMsg($WM_MOVE, '_WM_MOVE')

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE , $con_menu_beenden
    _GDIPlus_GraphicsDispose ($hGraphics)
    _GDIPlus_ShutDown ()
    Exit
    EndSwitch
    checkresolution()
    checkmousepos()
    WEnd

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

    Func checkresolution()
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $newtaskbar = 0
    Else
    $newtaskbar = $aTaskbar_Pos[3]
    EndIf
    $newPosLeft = @DesktopWidth - $guiWith
    $newPosTop = (@DesktopHeight-$newtaskbar-$guiHight)/2
    if $newPosLeft <> $posLeft or $newPosTop <> $posTop or $newtaskbar <> $taskbar Then
    ConsoleWrite( @CRLF & "reschange: " & $visible )
    $posLeft = $newPosLeft
    $posTop = $newPosTop
    $taskbar = $newtaskbar
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
    _ReDrawAngledText("My Sidebar")
    $visible = True
    EndIf
    EndFunc

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

    Func checkmousepos()
    $curMouse_X_Pos = MouseGetPos(0)
    if $curMouse_X_Pos <> $Mouse_X_Pos Then
    $Mouse_X_Pos = $curMouse_X_Pos
    if $Mouse_X_Pos < $posLeft And $visible = True Then
    ConsoleWrite( @CRLF & "hide: " & $Mouse_X_Pos )
    WinMove($gui,"",$posLeft+$guiWith-20,$posTop,$guiWith,$guiHight,5)
    ;_ReDrawAngledText("My Sidebar")
    $visible = False
    EndIf
    if $Mouse_X_Pos >= @DesktopWidth-20 And $visible = False then
    ConsoleWrite( @CRLF & "show: " & $Mouse_X_Pos )

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

    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
    ;_ReDrawAngledText("My Sidebar")
    $visible = True
    EndIf
    EndIf
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

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

    Func _ReDrawAngledText($labelLefttext)
    GDIPlus_SetAngledText($hGraphics, $labelLefttext, 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
    EndFunc

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

    Func _WM_MOVE($handle)
    If $handle = $gui Then
    ;_ReDrawAngledText()
    $redraw = _WinAPI_UpdateWindow($gui) ; notwendig damit Buttons beim ein/ausblenden gezeichnet werden
    ConsoleWrite(@CRLF & "Redraw: " & $redraw)
    ConsoleWrite(@CRLF & "counter: " & $i)
    $i+=1
    EndIf
    EndFunc

    [/autoit]
  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 9. Juli 2011 um 18:50

    So neuester Stand, Mouseover ist soweit eingebaut, jedoch gibt es mit GDI Plus und der Neuzeichnerei Probleme. Derzeit wird der alte Text nicht gelöscht und der neue einfach drüber gezeichnet... kann mir das jemand beheben?

    Spoiler anzeigen
    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>
    #include <winapi.au3>

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

    Global $Mouse_X_Pos = 0 , $visible = True , $i=1
    $orientation = "rechts"
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $taskbar = 0
    Else
    $taskbar = $aTaskbar_Pos[3]
    EndIf

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

    if $orientation = "rechts" Then
    $guiWith = 200
    $guiHight = 600
    $posLeft = @DesktopWidth - $guiWith
    $posTop = (@DesktopHeight-$taskbar-$guiHight)/2
    EndIf

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

    _GDIPlus_Startup()
    Global Const $iPI = 3.1415926535897932384626433832795

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

    $gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, $WS_POPUP , $WS_EX_TOPMOST) ;;; BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS)
    GUISetBkColor(0xA6CAF0)
    $LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUICtrlSetState($LabelLeft,$GUI_DISABLE)
    $LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Tool 1", 30, 20, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button2 = GUICtrlCreateButton("Tool 2", 30, 55, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUISetState(@SW_SHOW)

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
    GUIRegisterMsg($WM_MOVE, '_WM_MOVE')
    _ReDrawAngledText("Ausblenden")

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _GDIPlus_GraphicsDispose ($hGraphics)
    _GDIPlus_ShutDown ()
    Exit
    EndSwitch
    checkresolution()
    checkmousepos()
    WEnd

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

    Func checkresolution()
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $newtaskbar = 0
    Else
    $newtaskbar = $aTaskbar_Pos[3]
    EndIf
    $newPosLeft = @DesktopWidth - $guiWith
    $newPosTop = (@DesktopHeight-$newtaskbar-$guiHight)/2
    if $newPosLeft <> $posLeft or $newPosTop <> $posTop or $newtaskbar <> $taskbar Then
    ConsoleWrite( @CRLF & "reschange: " & $visible )
    $posLeft = $newPosLeft
    $posTop = $newPosTop
    $taskbar = $newtaskbar
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
    _ReDrawAngledText("Ausblenden")
    $visible = True
    EndIf
    EndFunc

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

    Func checkmousepos()
    $curMouse_X_Pos = MouseGetPos(0)
    if $curMouse_X_Pos <> $Mouse_X_Pos Then
    $Mouse_X_Pos = $curMouse_X_Pos
    if $Mouse_X_Pos < $posLeft And $visible = True Then
    ConsoleWrite( @CRLF & "hide: " & $Mouse_X_Pos )
    WinMove($gui,"",$posLeft+$guiWith-20,$posTop,$guiWith,$guiHight,5)
    _ReDrawAngledText("Einblenden")
    $visible = False
    EndIf
    if $Mouse_X_Pos >= @DesktopWidth-20 And $visible = False then
    ConsoleWrite( @CRLF & "show: " & $Mouse_X_Pos )
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,5)
    _ReDrawAngledText("Ausblenden")
    $visible = True
    EndIf
    EndIf
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

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

    Func _ReDrawAngledText($labelLefttext)
    GDIPlus_SetAngledText($hGraphics, $labelLefttext, 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
    EndFunc

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

    Func _WM_MOVE($handle)
    If $handle = $gui Then
    ;_ReDrawAngledText()
    $redraw = _WinAPI_UpdateWindow($gui) ; notwendig damit Buttons beim ein/ausblenden gezeichnet werden
    ConsoleWrite(@CRLF & "Redraw: " & $redraw)
    ConsoleWrite(@CRLF & "counter: " & $i)
    $i+=1
    EndIf
    EndFunc

    [/autoit]
  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 9. Juli 2011 um 16:49

    Danke I2C, hatte das vorhin bei msdn gesehen, wusste aber nicht so recht wie der dll call ausschaun muss, da fehlt es mir etwas an Wissen. Hab es daher dann anders realisiert, hier mal der aktuelle Quellcode:

    Spoiler anzeigen
    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>
    #include <array.au3>

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

    $orientation = "rechts"
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $taskbar = 0
    Else
    $taskbar = $aTaskbar_Pos[3]
    EndIf

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

    if $orientation = "rechts" Then
    $guiWith = 200
    $guiHight = 600
    $posLeft = @DesktopWidth - $guiWith
    $posTop = (@DesktopHeight-$taskbar-$guiHight)/2
    EndIf

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

    _GDIPlus_Startup()
    Global Const $iPI = 3.1415926535897932384626433832795

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

    $gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, $WS_POPUP , $WS_EX_TOPMOST) ;;; BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS)
    GUISetBkColor(0xA6CAF0)
    $LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUICtrlSetState($LabelLeft,$GUI_DISABLE)
    $LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Tool 1", 30, 20, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button2 = GUICtrlCreateButton("Tool 2", 30, 55, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUISetState(@SW_SHOW)

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
    GUIRegisterMsg($WM_MOVE, '_WM_MOVE')
    _ReDrawAngledText()

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    ConsoleWrite(@CRLF & "exitcall")
    _GDIPlus_GraphicsDispose ($hGraphics)
    _GDIPlus_ShutDown ()
    Exit
    EndSwitch
    checkresolution()
    WEnd

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

    Func checkresolution()
    $aTaskbar_Pos = WinGetPos( "[Class:Shell_TrayWnd]")
    if $aTaskbar_Pos = 0 Then
    $newtaskbar = 0
    Else
    $newtaskbar = $aTaskbar_Pos[3]
    EndIf
    $newPosLeft = @DesktopWidth - $guiWith
    $newPosTop = (@DesktopHeight-$newtaskbar-$guiHight)/2
    if $newPosLeft <> $posLeft or $newPosTop <> $posTop or $newtaskbar <> $taskbar Then
    $posLeft = $newPosLeft
    $posTop = $newPosTop
    $taskbar = $newtaskbar
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight);,100)
    EndIf
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

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

    Func _ReDrawAngledText()
    GDIPlus_SetAngledText($hGraphics, 'Ausblenden', 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
    EndFunc

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

    Func _WM_MOVE($hWnd)
    If $hWnd = $gui Then _ReDrawAngledText()
    EndFunc

    [/autoit]

    Das Problem mit dem verschwindenden Text besteht allerdings noch wenn man die Auflösung in X Richtung verringert und Y gleich bleibt, ansonsten scheint das nun recht zuverlässig zu klappen. Testen kann man das am besten mit Virtualbox, da hier die Auflösung dynamisch in alle Richtungen verändert werden kann.

  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 9. Juli 2011 um 15:34

    So erstmal danke an Bugfix für die GDIplus Geschichte für das "gedrehte" Label. Leider klappt das bei mir nur beim Start. Wird das Fenster verschoben sieht man zwar wie die Schrift durch _wm_move erneut gezeichnet wird, doch sobald das Fenster an seiner Zielposition ist scheint die Schrift hinter dem Label zu verschwinden. Kannst du dir das mal ansehen? Ausserdem Suche ich noch nach einer Möglichkeit die Desktophöhe abzüglich der Taskbar auszulesen. Slide Funktion (ich denke ich schiebe einfach nur das Fenster nach rechts in den unsichtbaren Raum) mit Mouseover wäre dann das nächste was ich noch gerne umsetzen würde. Da wäre die Frage wie man ein Mousover erkennen kann.

    Spoiler anzeigen
    [autoit]


    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_UseX64=n
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include <GDIPlus.au3>

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

    ; gui kann derzeit nur mit ESC beendet werden...

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

    $orientation = "rechts"
    $taskbar = 60 ; wie kann man hier den exakten wert auslesen?

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

    if $orientation = "rechts" Then
    $guiWith = 200
    $guiHight = 600
    $posLeft = @DesktopWidth - $guiWith
    $posTop = ( (@DesktopHeight-$taskbar) / 2) - ($guiHight / 2)
    EndIf

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

    _GDIPlus_Startup()
    Global Const $iPI = 3.1415926535897932384626433832795

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

    $gui = GUICreate("sidebar", $guiWith, $guiHight, $posLeft, $posTop, BitOR($WS_DLGFRAME,$WS_POPUP,$WS_CLIPSIBLINGS), $WS_EX_TOPMOST)
    GUISetBkColor(0xA6CAF0)
    $LabelLeft = GUICtrlCreateLabel("", 0, 0, 20, $guiHight)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelTop = GUICtrlCreateLabel("", 20, 0, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $LabelBottom = GUICtrlCreateLabel("", 20, $guiHight-10, $guiWith-20, 10)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button1 = GUICtrlCreateButton("Tool 1", 30, 20, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    $Button2 = GUICtrlCreateButton("Tool 2", 30, 55, $guiWith-40, 25, 0)
    GUICtrlSetBkColor(-1, 0x3399FF)
    GUISetState(@SW_SHOW)

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

    $hGraphics = _GDIPlus_GraphicsCreateFromHWND($gui)
    GUIRegisterMsg($WM_MOVE, '_WM_MOVE')
    _ReDrawAngledText()

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    _GDIPlus_GraphicsDispose ($hGraphics)
    _GDIPlus_ShutDown ()
    Exit
    EndSwitch
    checkresolution()
    WEnd

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

    Func checkresolution()
    $newPosLeft = @DesktopWidth - $guiWith
    $newPosTop = ( (@DesktopHeight-$taskbar) / 2) - ($guiHight / 2)
    if $newPosLeft <> $posLeft or $newPosTop <> $posTop Then
    $posLeft = $newPosLeft
    $posTop = $newPosTop
    WinMove($gui,"",$posLeft,$posTop,$guiWith,$guiHight,100)
    EndIf
    EndFunc

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

    ; #FUNCTION# ================================================================
    ; Name...........: GDIPlus_SetAngledText
    ; Description ...: Adds text to a graphic object at any angle.
    ; Syntax.........: GDIPlus_SetAngledText($hGraphic, $nText, [$iCentreX, [$iCentreY, [$iAngle , [$nFontName , _
    ; [$nFontSize, [$iARGB, [$iAnchor]]]]]]] )
    ; Parameters ....: $hGraphic - The Graphics object to receive the added text.
    ; $nText - Text string to be displayed
    ; $iCentreX - Horizontal coordinate of horixontal centre of the text rectangle (default = 0 )
    ; $iCentreY - Vertical coordinate of vertical centre of the text rectangle (default = 0 )
    ; $iAngle - The angle which the text will be place in degrees. (default = "" or blank = 0 )
    ; $nFontName - The name of the font to be used (default = "" or Blank = "Arial" )
    ; $nFontSize - The font size to be used (default = "" or Blank = 12 )
    ; $iARGB - Alpha(Transparency), Red, Green and Blue color (0xAARRGGBB) (Default= "" = random color
    ; or Default = Blank = 0xFFFF00FF )
    ; $iAnchor - If zero (default) positioning $iCentreX, $iCentreY values refer to centre of text string.
    ; If not zero positioning $iCentreX, $iCentreY values refer to top left corner of text string.
    ; Return values .: 1
    ; Author ........: Malkey
    ; Modified.......:
    ; Remarks .......: Call _GDIPlus_Startup() before starting this function, and call _GDIPlus_Shutdown()after function ends.
    ; Can enter calculation for Angle Eg. For incline, -ATan($iVDist / $iHDist) * 180 / $iPI , where
    ; $iVDist is Vertical Distance, $iHDist is Horizontal Distance, and, $iPI is Pi, (an added Global Const).
    ; When used with other graphics, call this function last. The MatrixRotate() may affect following graphics.
    ; Related .......: _GDIPlus_Startup(), _GDIPlus_Shutdown(), _GDIPlus_GraphicsDispose($hGraphic)
    ; Link ..........;
    ; Example .......; Yes
    ; ========================================================================================
    Func GDIPlus_SetAngledText($hGraphic, $nText, $iCentreX = 0, $iCentreY = 0, $iAngle = 0, $nFontName = "Arial", _
    $nFontSize = 12, $iARGB = 0xFFFF00FF, $iAnchor = 0)
    Local $x, $y, $iX, $iY, $iWidth, $iHeight
    Local $hMatrix, $iXt, $iYt, $hBrush, $hFormat, $hFamily, $hFont, $tLayout

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

    ; Default values
    If $iAngle = "" Then $iAngle = 0
    If $nFontName = "" Or $nFontName = -1 Then $nFontName = "Arial" ; "Microsoft Sans Serif"
    If $nFontSize = "" Then $nFontSize = 12
    If $iARGB = "" Then ; Randomize ARGB color
    $iARGB = "0xFF" & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2) & Hex(Random(0, 255, 1), 2)
    EndIf

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

    $hFormat = _GDIPlus_StringFormatCreate(0)
    $hFamily = _GDIPlus_FontFamilyCreate($nFontName)
    $hFont = _GDIPlus_FontCreate($hFamily, $nFontSize, 1, 3)
    $tLayout = _GDIPlus_RectFCreate($iCentreX, $iCentreY, 0, 0)
    $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $nText, $hFont, $tLayout, $hFormat)
    $iWidth = Ceiling(DllStructGetData($aInfo[0], "Width"))
    $iHeight = Ceiling(DllStructGetData($aInfo[0], "Height"))

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

    ;Later calculations based on centre of Text rectangle.
    If $iAnchor = 0 Then ; Reference to middle of Text rectangle
    $iX = $iCentreX
    $iY = $iCentreY
    Else ; Referenced centre point moved to top left corner of text string.
    $iX = $iCentreX + (($iWidth - Abs($iHeight * Sin($iAngle * $iPI / 180))) / 2)
    $iY = $iCentreY + (($iHeight + Abs($iWidth * Sin($iAngle * $iPI / 180))) / 2)
    EndIf

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

    ;Rotation Matrix
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix, $iAngle, 1)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)

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

    ;x, y are display coordinates of center of width and height of the rectanglular text box.
    ;Top left corner coordinates rotate in a circular path with radius = (width of text box)/2.
    ;Parametric equations for a circle, and adjustments for centre of text box
    $x = ($iWidth / 2) * Cos($iAngle * $iPI / 180) - ($iHeight / 2) * Sin($iAngle * $iPI / 180)
    $y = ($iWidth / 2) * Sin($iAngle * $iPI / 180) + ($iHeight / 2) * Cos($iAngle * $iPI / 180)

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

    ;Rotation of Coordinate Axes formulae - To display at x and y after rotation, we need to enter the
    ;x an y position values of where they rotated from. This is done by rotating the coordinate axes.
    ;Use $iXt, $iYt in _GDIPlus_RectFCreate. These x, y values is the position of the rectangular
    ;text box point before rotation. (before translation of the matrix)
    $iXt = ($iX - $x) * Cos($iAngle * $iPI / 180) + ($iY - $y) * Sin($iAngle * $iPI / 180)
    $iYt = -($iX - $x) * Sin($iAngle * $iPI / 180) + ($iY - $y) * Cos($iAngle * $iPI / 180)

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

    $hBrush = _GDIPlus_BrushCreateSolid($iARGB)
    $tLayout = _GDIPlus_RectFCreate($iXt, $iYt, $iWidth, $iHeight)
    _GDIPlus_GraphicsDrawStringEx($hGraphic, $nText, $hFont, $tLayout, $hFormat, $hBrush)

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

    ; Clean up resources
    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)
    $tLayout = ""
    Return 1
    EndFunc ;==>GDIPlus_SetAngledText

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

    Func _ReDrawAngledText()
    GDIPlus_SetAngledText($hGraphics, 'Ausblenden', 10, $guiHight/2, 270, "", 12, 0xFF0000FF)
    EndFunc

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

    Func _WM_MOVE($hWnd)
    If $hWnd = $gui Then _ReDrawAngledText()
    EndFunc

    [/autoit]

    EDIT: Testweise habe ich $labelleft mit gui_disable deaktiviert und die window styles auf ws_popup und ws_ex_topmost beshränkt, jedoch tritt das Problem mit der verschwindenen Schrift immernoch auf, seltsamerweise überwiegend wenn man die auflösung in x Richtung verringert, aber auch beim erhöhen des x-wertes kommt es sporadisch zum unsichtbar werden der Schrift.

  • Selbstanpassende GUI / Sidebar

    • misterspeed
    • 9. Juli 2011 um 13:08

    Aso das hatte ich ganz vergessen zu erwähnen. Das ganze soll primär unter win2k8R2 laufen, also Win7 Basis. Hintergrund der dynamischen Anpassung an die Auflösung zur Laufzeit ist hier, dass sich die unterschiedlichsten User mit dem selben Benutzer Account via RDP Verbindung verbinden und es dann zu verschiedenen Auflösungen kommt, wenn man dies nicht serverseitig auf einen fixen Wert einstellen möchte. Werde mir dein Script aber nachher mal ansehen.

    @ meistertogo:

    Das Problem mit @Desktopheight war soweit ich das noch weiss, dass die Taskbar hier nicht korrekt berücksichtigt wird (evtl. auch Windowsversions und Einstellungs abhängig [2-Zeilige Taskbar]), sollte ich also statt einer fixen GUI höhe doch eine dynamisch füllende Höhe haben wollen könnte das auch problematisch werden. Muss ich aber nachher mal rumtesten.

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™