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

Beiträge von chip

  • Anfänger hilfe

    • chip
    • 7. August 2010 um 20:11

    Du solltest dir erstmal das hier anschauen: http://wiki.autoit.de/wiki/index.php/Tutorial

  • Browsergame + Forum

    • chip
    • 7. August 2010 um 18:26

    Wusste ich es doch das es nix anderes ist als der verbuggte Code des Open Source BGs XNova: http://www.xnova-reloaded.eu/

  • Sprachsteuerung

    • chip
    • 7. August 2010 um 17:41

    Ich hatte so etwas einmal zur Steuerung des Windows MCE umgesetzt. Allerdings rein mit Autoit wird das nicht.

    Kann dir aber mal kurz erklären wie ich es gemacht hatte. Vorraussetzung ist allerdings die Windows Spracherkennung. Ich habe ein Script geschrieben das Parameter entgegennimmt und entsprechend den übergebene Werten dann eine Aktion ausführt. Dann habe ich mit dem Tool "Windows Speech Recognition Macros" einen bestimmten Sprachbefehl an die Option "Run a Programm" gekopellt und über diese Option dann das Script+entsprechdenem Parameterwert aufgerufen.

  • Prüfen ob Maustate gedrückt

    • chip
    • 7. August 2010 um 17:32
    Zitat von Skilkor

    Könntest du Uns evt noch sagen wofür du das benötigst???

    Ja kann ich dir sagen. Möcht ein weiteres Applet für die G19 schreiben die entsprechende Infos zu einem markierten Autoitbefehl liefert. Hierzu bin ich gerade dabei verschiedene wege zu testen um dies zu realisieren.

  • Browsergame + Forum

    • chip
    • 7. August 2010 um 17:25
    Zitat von sl4y3r

    Hätte den Source Code von "die Stämme" und "oGame", weiß nur nicht ob ichs hier posten darf ;)

    Ja genau *lach*. xnova ist nicht Ogame.

  • Prüfen ob Maustate gedrückt

    • chip
    • 7. August 2010 um 00:29

    Danke. Gibt es auch eine Möglichkeit zu Prüfen ob eine Taste wieder losgelassen wurde?

  • Prüfen ob Maustate gedrückt

    • chip
    • 7. August 2010 um 00:24

    Hi,

    kann man irgendwie prüfen ob eine Maustaste gedrückt bzw. losgelassen wurde?

  • G19 Wetteranzeige

    • chip
    • 6. August 2010 um 23:58

    Hi,

    hier habe ich nun ein weiteres Applet für die G19. Es zeigt das aktuelle Wetter sowie die Prognose für die nächsten drei Tage an. Mit einem druck auf die "Menu"-Taste der G19 erscheint ein Input indem man den Ort angeben kann der angezeigt werden soll.

    Die folgenden Komponenten werden benötigt

    Zum einen natürliche die UDF von Carsten 8: AdvanceLcd

    Dann noch die entsprechende DLL aus AdvanceLcd. Im herruntergladenen Archiv unter Binary und dann entsprechend dem Betriebsystem x64 oder x86 zu finden.

    Und hier nun das eigentliche Script (die vier Funktionen oben sind drin weil diese in der UDF fehlen) mit der bitte um Feadback:

    Spoiler anzeigen
    [autoit]

    #include <String.au3>
    #include <AdvanceLCD.au3>
    #include <Array.au3>
    OnAutoItExitRegister("killfunc")
    Global $count

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

    Func LcdSetPriority($hApplet, $nPriority = "LCD_PRIORITY_NORMAL", $bForeground = 0)
    Local $ret = DllCall($dll, "int", "LcdSetPriority", "ptr", $hApplet, "int", $nPriority, "int", $bForeground)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetPriority

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

    Func LcdDrawText($hApplet, $pString, $iX = 0, $iY = 0)
    Local $ret = DllCall($dll, "int", "LcdDrawTextA", "ptr", $hApplet, "str", $pString, "int", $iX, "int", $iY)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawText

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

    Func LcdSetFont($hApplet, $hFont)
    Local $ret = DllCall($dll, "int", "LcdSetFont", "ptr", $hApplet, "ptr", $hFont)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetFont

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

    Func LcdLoadFont($sFamily, $iHeight, $iFlags, $sFile)
    Local $ret = DllCall($dll, "ptr", "LcdLoadFontW", "wstr", $sFamily, "int", $iHeight, "int", $iFlags, "wstr", $sFile)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdLoadFont

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

    LcdInitialize()
    $hApplet = LcdCreateApplet("Wetteranzeige", 2, 1, 1)
    LcdSetTarget($hApplet, 0)
    LcdWaitActivation($hApplet)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)

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

    _wetter()

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

    Func _wetter()
    $count = 0

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

    $ort = IniRead(@ScriptDir & "/config.ini", "Wetter", "Ort", "Frankfurt")

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

    LcdClear($hApplet, 0x000000)

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

    $wetter = BinaryToString(InetRead("http://www.google.com/ig/api?weather=" & $ort & "&hl=de", 16))
    $currentdate = _StringBetween($wetter, "<current_conditions>", "</current_conditions>")

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

    $Font = LcdLoadFont("Arial", 30, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $Font)
    LcdDrawText($hApplet, $ort, 0, 0)

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

    $currentcondition = _StringBetween($currentdate[0], '<condition data="', '"/>')
    LcdDrawText($hApplet, $currentcondition[0], 0, 30)

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

    $currenttempc = _StringBetween($currentdate[0], '<temp_c data="', '"/>')
    LcdDrawText($hApplet, $currenttempc[0] & "°", 0, 60)

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

    $currenthumidity = _StringBetween($currentdate[0], '<humidity data="', '"/>')
    LcdDrawText($hApplet, $currenthumidity[0], 0, 90)

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

    $currenticon = _StringBetween($currentdate[0], '<icon data="', '"/>')
    $curreniconname = StringSplit($currenticon[0], "/")
    If $curreniconname[0] = 5 Then
    InetGet("http://www.google.com" & $currenticon[0], @TempDir & "/" & $curreniconname[5], 16)
    $currentimage = LcdLoadPixmap(@TempDir & "/" & $curreniconname[5])
    LcdDrawPixmap($hApplet, $currentimage, 250, 15)
    EndIf

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

    $forecastdate = _StringBetween($wetter, "<forecast_conditions>", "</forecast_conditions>")

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

    $dayonename = _StringBetween($forecastdate[0], '<day_of_week data="', '"/>')
    $daytwoname = _StringBetween($forecastdate[1], '<day_of_week data="', '"/>')
    $daythreename = _StringBetween($forecastdate[2], '<day_of_week data="', '"/>')
    $dayfourname = _StringBetween($forecastdate[3], '<day_of_week data="', '"/>')

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

    $Font = LcdLoadFont("Arial", 15, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $Font)
    LcdDrawText($hApplet, $dayonename[0], 15, 175)
    LcdDrawText($hApplet, $daytwoname[0], 95, 175)
    LcdDrawText($hApplet, $daythreename[0], 175, 175)
    LcdDrawText($hApplet, $dayfourname[0], 255, 175)

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

    $dayoneicon = _StringBetween($forecastdate[0], '<icon data="', '"/>')
    $daytwoicon = _StringBetween($forecastdate[1], '<icon data="', '"/>')
    $daythreeicon = _StringBetween($forecastdate[2], '<icon data="', '"/>')
    $dayfouricon = _StringBetween($forecastdate[3], '<icon data="', '"/>')

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

    $dayoneiconname = StringSplit($dayoneicon[0], "/")
    $daytwoiconname = StringSplit($daytwoicon[0], "/")
    $daythreeiconname = StringSplit($daythreeicon[0], "/")
    $dayfouriconname = StringSplit($dayfouricon[0], "/")

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

    InetGet("http://www.google.com" & $dayoneicon[0], @TempDir & "/" & $dayoneiconname[5], 16)
    InetGet("http://www.google.com" & $daytwoicon[0], @TempDir & "/" & $daytwoiconname[5], 16)
    InetGet("http://www.google.com" & $daythreeicon[0], @TempDir & "/" & $daythreeiconname[5], 16)
    InetGet("http://www.google.com" & $dayfouricon[0], @TempDir & "/" & $dayfouriconname[5], 16)

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

    $dayoneimage = LcdLoadPixmap(@TempDir & "/" & $dayoneiconname[5])
    LcdDrawPixmap($hApplet, $dayoneimage, 15, 195)
    $daytwoimage = LcdLoadPixmap(@TempDir & "/" & $daytwoiconname[5])
    LcdDrawPixmap($hApplet, $daytwoimage, 95, 195)
    $daythreeimage = LcdLoadPixmap(@TempDir & "/" & $daythreeiconname[5])
    LcdDrawPixmap($hApplet, $daythreeimage, 175, 195)
    $dayfourimage = LcdLoadPixmap(@TempDir & "/" & $dayfouriconname[5])
    LcdDrawPixmap($hApplet, $dayfourimage, 255, 195)

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

    $dayonelow = _StringBetween($forecastdate[0], '<low data="', '"/>')
    $daytwolow = _StringBetween($forecastdate[1], '<low data="', '"/>')
    $daythreelow = _StringBetween($forecastdate[2], '<low data="', '"/>')
    $dayfourlow = _StringBetween($forecastdate[3], '<low data="', '"/>')

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

    LcdDrawText($hApplet, $dayonelow[0] & "°", 56, 220)
    LcdDrawText($hApplet, $daytwolow[0] & "°", 136, 220)
    LcdDrawText($hApplet, $daythreelow[0] & "°", 216, 220)
    LcdDrawText($hApplet, $dayfourlow[0] & "°", 296, 220)

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

    $dayonehigh = _StringBetween($forecastdate[0], '<high data="', '"/>')
    $daytwohigh = _StringBetween($forecastdate[1], '<high data="', '"/>')
    $daythreehigh = _StringBetween($forecastdate[2], '<high data="', '"/>')
    $dayfourhigh = _StringBetween($forecastdate[3], '<high data="', '"/>')

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

    LcdDrawText($hApplet, $dayonehigh[0] & "°", 56, 195)
    LcdDrawText($hApplet, $daytwohigh[0] & "°", 136, 195)
    LcdDrawText($hApplet, $daythreehigh[0] & "°", 215, 195)
    LcdDrawText($hApplet, $dayfourhigh[0] & "°", 296, 195)

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

    LcdUpdate($hApplet, 0)
    EndFunc ;==>_wetter

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

    While 1
    Sleep(100)
    If LcdButtonState($hApplet, $LCD_BUTTON_MENU) = True Then
    $ort = InputBox("Ort eingeben", "Bitte den Ort angeben, dessen Wetter angezeigt werden soll.")
    $ort = StringReplace($ort, "ä", "ae")
    $ort = StringReplace($ort, "ö", "oe")
    $ort = StringReplace($ort, "ü", "ue")
    IniWrite(@ScriptDir & "/config.ini", "Wetter", "Ort", $ort)
    _wetter()
    EndIf

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

    If $count > 36000 Then
    _wetter()
    Else
    $count = $count + 1
    EndIf
    WEnd

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

    Func killfunc()
    LcdDeleteApplet($hApplet)
    LcdDeInitialize()
    EndFunc ;==>killfunc

    [/autoit]

    Bilder

    • bild.JPG
      • 28,04 kB
      • 227 × 171
  • Habt ihr eine G19?

    • chip
    • 5. August 2010 um 14:47
    Zitat von Oscar

    Ich besitze zwar ebenfalls eine Tastatur von Logitech, weil mir das Tastaturlayout gefällt (vor allem: grosse Return- und grosse Backspacetaste) und ich den Tastenanschlag mag, aber 180 € würde ich für eine G19 nie ausgeben.
    Mir gefällt daran allerdings das Display. Auf die "tausend" Zusatztasten und die Beleuchtung könnte ich hingegen verzichten.

    G19 kostet keine 180€ sondern 112€.

  • Return gibt 0 statt 1 zurück

    • chip
    • 4. August 2010 um 23:20

    Ah thx.

  • Return gibt 0 statt 1 zurück

    • chip
    • 4. August 2010 um 23:07

    Hi,

    ich habe folgende Funktion geschrieben:

    [autoit]

    Func test($a, $b)
    If $b == 0 Then
    Return $a
    Else
    test($b, Mod($a, $b))
    EndIf
    EndFunc

    [/autoit]


    Wenn ich diese Funktion nun so aufrufe

    [autoit]

    test(37, 16)

    [/autoit]

    kommt also Ergebniss 0 herraus.

    Wenn man in der Funktion nun eine Msgbox so einbaut sieht man allerdings das die Variable $a die mit Return zurückgegeben wird die Zahl 1 hat.

    [autoit]

    Func test($a, $b)
    If $b == 0 Then
    MsgBox(0,"",$a)
    Return $a
    Else
    test($b, Mod($a, $b))
    EndIf
    EndFunc

    [/autoit]

    Kann mir jemand sagen wo hier nun der Fehler ist.

  • [abgeschlossen] µitLight August '10

    • chip
    • 4. August 2010 um 21:54

    Und noch eine frage. Darf es nur ein Algorithmuss sein oder dürfen intern auch mehrer Algorithmen kombiniert sein?

  • [abgeschlossen] µitLight August '10

    • chip
    • 4. August 2010 um 21:46

    Darf man zum Generieren von Primzahlen auch ein Script aus dem März-µitLight verwenden?

  • verschlüsslung selbst schreiben

    • chip
    • 4. August 2010 um 20:43

    Und nun das ganze nochmal auf Deutsch.

  • G19 JDownloader

    • chip
    • 4. August 2010 um 20:29

    Ok stimmt das ist richtig. Wurde behoben.

  • G19 JDownloader

    • chip
    • 4. August 2010 um 20:09
    Zitat von Skilkor

    allso mit der G15 Läufts schonmal Nicht :( Schade
    Bekomme bei Zeile 59 den Error

    muss ichn download aktiv haben oder nicht?

    Hab es mal angepasst. Jetzt kommt kein Fehler mehr, da aber die Abmessungen des G15 Displays um einiges kleiner ist, wird es trotzdem nicht richtig funktionieren. Allerdings gibt es auf der Homepage von JDownloader bereits ein Plugin für die G15: klick mich

    Zitat von progandy


    chip "LCD_DEFAULT_FONT" als String ist falsch. Das muss $LCD_DEFAULT_FONT sein. Den Wert bekommst du aus den c-headern. Außerdem solltest du auch die Pause-Schrift nur 1x am Anfang laden, sonst hast du einen MemoryLeak (oder du muss DeleteFont aufrufen, das solltest du zum Skripende sowieso tun).

    Ist komplett egal geht beides.

  • Nach E-Mail Adresse in LDAP suchen

    • chip
    • 4. August 2010 um 11:53

    Evtl. kann dir diese UDF helfen: http://www.autoitscript.com/forum/index.php?showtopic=106163

  • InetRead und post

    • chip
    • 4. August 2010 um 11:33

    Ging mir darum den Inhalt einer Variable als Post an eine Internetseite zu senden. Werde es dann wohl doch über TCP direkt machen.

  • G19 JDownloader

    • chip
    • 4. August 2010 um 11:29
    Zitat von Fabian


    Ich muss mir ernsthaft überlegen eine G19 Tastatur zu kaufen :thumbup:

    Dann wird es zeit ;).

    Zitat von Fabian


    Hast du eine gute Doku gefunden wie du JDownloader ansprechen kannst über den Remoteport?

    Wenn man den Remoteport aufruft erhält man direkt eine Liste der Möglichen Parameter.

  • G19 JDownloader

    • chip
    • 3. August 2010 um 23:57

    HI,

    dank der UDF von Carsten8, da Carsten8 inaktiv ist und scheinbar nur ich noch die aktuelle Version von AdcanceLCD habe hier diese nochmal

    Spoiler anzeigen
    [autoit]

    ; Logitech G19 UDF
    ; Autor: Carsten Schneider aka Carsten8
    ; Datum: 24.07.2010
    ; Veröffentlichung: 31.07.2010

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

    ; Diese UDF benötigt die AdvanceLcd (http://www.blitzforum.de/forum/viewtopic.php?p=362484) DLL
    ; sowie installierte Gerätetreiber. Das Copyright von AdvanceLcd besitzt ChristianK von blitzforum.de.

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

    #region Variablen
    ; #CONSTANTS# ===================================================================================================================
    Global Const $LCD_OK = 0
    Global Const $LCD_ERROR = 1
    Global Const $LCD_ERROR_NOT_INITIALIZED = 2
    Global Const $LCD_ERROR_INVALID_PARAMETER = 3
    Global Const $LCD_ERROR_NOT_FOUND = 4

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

    Global Const $LCD_DEVICE_INVALID = -1
    Global Const $LCD_DEVICE_MONO = 1
    Global Const $LCD_DEVICE_COLOR = 2

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

    Global Const $LCD_EVENT_CONFIGURE = 1
    Global Const $LCD_EVENT_BUTTON = 2

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

    Global Const $LCD_BUTTON_1 = 0x0001
    Global Const $LCD_BUTTON_2 = 0x0002
    Global Const $LCD_BUTTON_3 = 0x0004
    Global Const $LCD_BUTTON_4 = 0x0008

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

    Global Const $LCD_BUTTON_LEFT = 0x0100
    Global Const $LCD_BUTTON_RIGHT = 0x0200
    Global Const $LCD_BUTTON_OK = 0x0400
    Global Const $LCD_BUTTON_CANCEL = 0x0800
    Global Const $LCD_BUTTON_UP = 0x1000
    Global Const $LCD_BUTTON_DOWN = 0x2000
    Global Const $LCD_BUTTON_MENU = 0x4000

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

    Global Const $LCD_PRIORITY_LOW = 1
    Global Const $LCD_PRIORITY_NORMAL = 2
    Global Const $LCD_PRIORITY_HIGH = 3

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

    Global Const $LCD_COLOR_VISIBLE = 0xFFFFFF
    Global Const $LCD_COLOR_INVISIBLE = 0

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

    Global Const $LCD_FONT_DEFAULT = 0
    Global Const $LCD_FONT_BOLD = 1
    Global Const $LCD_FONT_ITALIC = 2
    Global Const $LCD_FONT_UNDERLINE = 4
    ; ===============================================================================================================================

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

    ; #VARIABLEN# ===================================================================================================================
    Global $dll = 0
    Global $callback = -1
    ; ===============================================================================================================================
    #endregion Variablen

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

    ; #FUNKTIONEN# ==================================================================================================================
    ; LcdDeInitialize
    ; LcdInitialize
    ; LcdLastError
    ; LcdAppletActive
    ; LcdAppletEnabled
    ; LcdAppledOpened
    ; LcdButtonState
    ; LcdConfigState
    ; LcdCreateApplet
    ; LcdDeleteApplet
    ; LcdSelectDevice
    ; LcdSetEventHandler [INSTABIL]
    ; LcdSetPriority
    ; LcdUpdate
    ; LcdWaitActivation
    ; LcdClear
    ; LcdDrawLine
    ; LcdDrawOval
    ; LcdDrawRect
    ; LcdEnableAntiAlias
    ; LcdSetColor
    ; LcdSetLineWidth
    ; LcdSetRotation
    ; LcdSetTarget
    ; LcdCreatePixmap
    ; LcdDeletePixamp
    ; LcdDrawPixmap
    ; LcdDrawPixmapRect
    ; LcdLoadAnimPixmap
    ; LcdLoadPixmap
    ; LcdPixmapHeight
    ; LcdPixmapWidth
    ; LcdDeleteFont
    ; LcdDrawText
    ; LcdLoadFont
    ; LcdSetFont
    ; LcdStringHeight
    ; LcdStringWidth
    ; ===============================================================================================================================

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

    #region Library
    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdInitialize
    ; Beschreibung ..: Initialisiert AdvanceLcd
    ; Syntax ........: LcdInitialize([$sDLLPath = "advlcd.dll"])
    ; Parameter .....: $sDLLPath - Pfad zur advlcd.dll
    ; Rückgabewerte .: Erfolg - $LCD_OK
    ; Fehler - $LCD_ERROR
    ; Bemerkungen ...:
    ; Verwandt ......: LcdDeInitialize
    ; ===============================================================================================================================
    Func LcdInitialize($sDLLPath = "advlcd.dll")
    $dll = DllOpen($sDLLPath)
    Local $ret = DllCall($dll, "int", "LcdInitialize")
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdInitialize

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdDeInitialize
    ; Beschreibung ..: Deinitialisiert AdvanceLcd
    ; Syntax ........: LcdDeInitialize()
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...: Vorher sollten alle Applets, Pixmaps etc. gelöscht werden.
    ; Verwandt ......: LcdInitialize
    ; ===============================================================================================================================
    Func LcdDeInitialize()
    If $callback <> -1 Then DllCallbackFree($callback)
    Local $ret = DllCall($dll, "int", "LcdDeInitialize")
    If @error Then Return SetError(1, @error, 0)
    DllClose($dll)
    Return $ret[0]
    EndFunc ;==>LcdDeInitialize

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdLastError
    ; Beschreibung ..: Gibt den letzten aufgetretenen Fehler zurück.
    ; Syntax ........: LcdLastError()
    ; Parameter .....:
    ; Rückgabewerte .: $LCD_OK, $LCD_ERROR, $LCD_ERROR_NOT_INITIALIZED, $LCD_ERROR_INVALID_PARAMETER oder $LCD_ERROR_NOT_FOUND
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdLastError()
    Local $ret = DllCall($dll, "int", "LcdLastError")
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdLastError
    #endregion Library

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

    #region Applet
    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdAppletActive
    ; Beschreibung ..: Mischung aus LcdAppletEnabled und LcdAppletOpened (siehe Bemerkungen)
    ; Syntax ........: LcdAppletActive($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .: Aktiviert - True
    ; Deaktiviert - False
    ; Bemerkungen ...: Gibt nur True zurück, wenn sowohl LcdAppletEnabled als auch LcdAppletOpened True zurück gibt.
    ; Verwandt ......: LcdWaitActivation LcdAppletEnabled LcdAppletOpened
    ; ===============================================================================================================================
    Func LcdAppletActive($hApplet)
    Local $ret = DllCall($dll, "int", "LcdAppletActive", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdAppletActive

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdAppletEnabled
    ; Beschreibung ..: Prüft, ob ein Applet aktiviert ist.
    ; Syntax ........: LcdAppletEnabled($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .: Aktiviert - True
    ; Deaktiviert - False
    ; Bemerkungen ...:
    ; Verwandt ......: LcdAppletOpened LcdAppletActive
    ; ===============================================================================================================================
    Func LcdAppletEnabled($hApplet)
    Local $ret = DllCall($dll, "int", "LcdAppletEnabled", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdAppletEnabled

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdAppletOpened
    ; Beschreibung ..: Prüft, ob das Applet auf dem LCD angezeigt werden darf oder nicht.
    ; Syntax ........: LcdAppletOpened($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .: Aktiviert - True
    ; Deaktiviert - False
    ; Bemerkungen ...:
    ; Verwandt ......: LcdAppletEnabled LcdAppletActive
    ; ===============================================================================================================================
    Func LcdAppletOpened($hApplet)
    Local $ret = DllCall($dll, "int", "LcdAppletOpened", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdAppletOpened

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdButtonState
    ; Beschreibung ..: Ermittelt den Status eines Knopfes des LCDs.
    ; Syntax ........: LcdButtonState($hApplet, $iButton)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $iButton - Die ID des Knopfes
    ; Rückgabewerte .:
    ; Bemerkungen ...: $iButton kann, je nach Gerätetyp, eine der folgenden Variablen sein:
    ; $LCD_BUTTON_1
    ; $LCD_BUTTON_2
    ; $LCD_BUTTON_3
    ; $LCD_BUTTON_4
    ;
    ; $LCD_BUTTON_LEFT
    ; $LCD_BUTTON_RIGHT
    ; $LCD_BUTTON_OK
    ; $LCD_BUTTON_CANCEL
    ; $LCD_BUTTON_UP
    ; $LCD_BUTTON_DOWN
    ; $LCD_BUTTON_MENU
    ; Verwandt ......: LcdConfigState
    ; ===============================================================================================================================
    Func LcdButtonState($hApplet, $iButton)
    Local $ret = DllCall($dll, "int", "LcdButtonState", "ptr", $hApplet, "int", $iButton)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdButtonState

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdConfigState
    ; Beschreibung ..: Prüft, ob der "Konfigurieren"-Button im LCD Manager gedrückt wurde.
    ; Syntax ........: LcdConfigState($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .: True, wenn der Button angeklickt wurde, ansonsten False.
    ; Bemerkungen ...:
    ; Verwandt ......: LcdButtonState
    ; ===============================================================================================================================
    Func LcdConfigState($hApplet)
    Local $ret = DllCall($dll, "int", "LcdConfigState", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdConfigState

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdCreateApplet
    ; Beschreibung ..: Erstellt ein Applet.
    ; Syntax ........: LcdCreateApplet($sName, [$iDevices = $LCD_DEVICE_COLOR, [$bConfigurable = 0, [$bAutostart = 0]]])
    ; Parameter .....: $sName - Der Name des Applets. Er wird später auf dem LCD und im LCD Manager angezeigt.
    ; $iDevices - Der Gerätetyp, der verwendet werden soll. Siehe Bemerkungen.
    ; $bConfigurable - Gibt an, ob der "Konfigurieren"-Button im LCD Manager anklickbar sein soll.
    ; $bAutostart - Gibt an, ob der LCD Manager das Applet automatisch starten kann.
    ; Rückgabewerte .: Erfolg - Ein Handle des Applets
    ; Bemerkungen ...: $iDevices kann entweder $LCD_DEVICE_MONO oder $LCD_DEVICE_COLOR sein. Wird beides verwendet, so muss
    ; bei späteren Aktionen das Gerät per LcdSelectDevice ausgewählt werden.
    ; Verwandt ......: LcdSelectDevice LcdDeleteApplet
    ; ===============================================================================================================================
    Func LcdCreateApplet($sName, $iDevices = $LCD_DEVICE_COLOR, $bConfigurable = 0, $bAutostart = 0)
    Local $ret = DllCall($dll, "ptr", "LcdCreateAppletW", "wstr", $sName, "int", $iDevices, "int", $bConfigurable, "int", $bAutostart)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdCreateApplet

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdDeleteApplet
    ; Beschreibung ..: Löscht ein Applet.
    ; Syntax ........: LcdDeleteApplet($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .:
    ; Bemerkungen ...: Sollte vor LcdDeInitialize aufgerufen werden.
    ; Verwandt ......: LcdCreateApplet LcdDeInitialize
    ; ===============================================================================================================================
    Func LcdDeleteApplet($hApplet)
    Local $ret = DllCall($dll, "int", "LcdDeleteApplet", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDeleteApplet

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdSelectDevice
    ; Beschreibung ..: Setzt ein Gerät als Ziel zukünftiger Aktionen.
    ; Syntax ........: LcdSelectDevice($hApplet, $iDevice)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $iDevice - Der Gerätetyp des Geräts
    ; Rückgabewerte .:
    ; Bemerkungen ...: Nur benötigt für Funktionen, die Gerätespezifisch sind.
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSelectDevice($hApplet, $iDevice)
    Local $ret = DllCall($dll, "int", "LcdSelectDevice", "ptr", $hApplet, "int", $iDevice)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSelectDevice

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdSetEventHandler
    ; Beschreibung ..: Legt eine Funktion als Eventhandler für ein Applet fest.
    ; Syntax ........: LcdSetEventHandler($hApplet, $EventHandler, [$hContext = 0])
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $EventHandler - Name der Funktion, die als Eventhandler dienen soll.
    ; $hContect -
    ; Rückgabewerte .:
    ; Bemerkungen ...: Die Funktion ist sehr instabil und kann zu Abstürzen des Scripts führen.
    ; Die Funktion muss immer folgende Parameter besitzen:
    ; _BeispielCallback($iEvent, $hContext, $iData)
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetEventHandler($hApplet, $EventHandler, $hContext = 0)
    If $callback <> -1 Then DllCallbackFree($callback)
    $callback = DllCallbackRegister($EventHandler, "int", "int;ptr;int")
    Local $ret = DllCall($dll, "int", "LcdSetEventHandler", "ptr", $hApplet, "ptr", DllCallbackGetPtr($callback), "ptr", $hContext)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetEventHandler

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdSetPriority
    ; Beschreibung ..: Setzt die Anzeigepriorität und den Vordergrundstatus eines Applets.
    ; Syntax ........: LcdSetPriority($hApplet, $iPriority, $bForeground)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $iPriority - Die zu setzende Priorität
    ; $bForeground - Der zu setzende Vordergrundstatus
    ; Rückgabewerte .:
    ; Bemerkungen ...: $iPriority kann eine der folgenden Variablen sein: $LCD_PRIORITY_LOW, $LCD_PRIORITY_NORMAL, $LCD_PRIORITY_HIGH
    ; Wenn $bForeground True ist, wird das Applet in den Vordergrund gerufen und ein eventuelles automatisches
    ; Durchwechseln der Applets wird deaktiviert. Wird $bForeground auf False gesetzt, wird das eventuelle
    ; automatische Durchwechseln fortgeführt.
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetPriority($hApplet, $iPriority, $bForeground)
    Local $ret = DllCall($dll, "int", "LcdSetPriority", "ptr", $hApplet, "int", $iPriority, "int", $bForeground)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetPriority

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdUpdate
    ; Beschreibung ..: Aktualisiert das LCD und zeigt den aktuellen Buffer des Applets an.
    ; Syntax ........: LcdUpdate($hApplet, [$bSync = 0])
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $bSync - Gibt an, ob gewartet werden soll, bis der Buffer angezeigt wird, oder nicht.
    ; Rückgabewerte .:
    ; Bemerkungen ...: Wenn $bSync True ist, läuft das Script weiter, sobald der Inhalt des Buffers an den LCD Manger gesendet wurde.
    ; Wenn $bSync False ist, läuft das Script erst weiter, wenn der Inhalt des Buffers auf dem LCD angezeigt wird (ca. 30ms langsamer)
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdUpdate($hApplet, $bSync = 0)
    Local $ret = DllCall($dll, "int", "LcdUpdate", "ptr", $hApplet, "int", $bSync)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdUpdate

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdWaitActivation
    ; Beschreibung ..: Wartet, bis das Applet aktiviert wird.
    ; Syntax ........: LcdWaitActivation($hApplet)
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; Rückgabewerte .:
    ; Bemerkungen ...: Siehe LcdAppletActive
    ; Verwandt ......: LcdAppletActive
    ; ===============================================================================================================================
    Func LcdWaitActivation($hApplet)
    Local $ret = DllCall($dll, "int", "LcdWaitActivation", "ptr", $hApplet)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdWaitActivation
    #endregion Applet

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

    #region Graphics
    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdClear
    ; Beschreibung ..: Leert den Buffer des LCDs.
    ; Syntax ........: LcdClear($hApplet, [$iColor = 0x000000])
    ; Parameter .....: $hApplet - Das Handle des Applets
    ; $iColor - Die Farbe, mit der der Buffer überschrieben werden soll.
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdClear($hApplet, $iColor = 0x000000)
    Local $ret = DllCall($dll, "int", "LcdClear", "ptr", $hApplet, "int", $iColor)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdClear

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdDrawLine
    ; Beschreibung ..:
    ; Syntax ........: LcdDrawLine($hApplet, $iX1, $iY1, $iX2, $iY2)
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDrawLine($hApplet, $iX1, $iY1, $iX2, $iY2)
    Local $ret = DllCall($dll, "int", "LcdDrawLine", "ptr", $hApplet, "int", $iX1, "int", $iY1, "int", $iX2, "int", $iY2)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawLine

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDrawOval($hApplet, $iX, $iY, $iWidth, $iHeight, $bFill)
    Local $ret = DllCall($dll, "int", "LcdDrawOval", "ptr", $hApplet, "int", $iX, "int", $iY, "int", $iWidth, "int", $iHeight, "int", $bFill)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawOval

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDrawRect($hApplet, $iX, $iY, $iWidth, $iHeight, $bFill)
    Local $ret = DllCall($dll, "int", "LcdDrawRect", "ptr", $hApplet, "int", $iX, "int", $iY, "int", $iWidth, "int", $iHeight, "int", $bFill)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawRect

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdEnableAntiAlias($hApplet, $bEnable)
    Local $ret = DllCall($dll, "int", "LcdEnableAntiAlias", "ptr", $hApplet, "int", $bEnable)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdEnableAntiAlias

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetColor($iColor)
    Local $ret = DllCall($dll, "int", "LcdSetColor", "int", $iColor)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetColor

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetLineWidth($hApplet, $fWidth)
    Local $ret = DllCall($dll, "int", "LcdSetLineWidth", "ptr", $hApplet, "float", $fWidth)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetLineWidth

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetRotation($hApplet, $fRotation, $iCenterX, $iCenterY)
    Local $ret = DllCall($dll, "int", "LcdSetRotation", "ptr", $hApplet, "float", $fRotation, "int", $iCenterX, "int", $iCenterY)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetRotation

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdSetTarget
    ; Beschreibung ..: Setzt das aktuelle Renderziel.
    ; Syntax ........: LcdSetTarget($hApplet, $hPixmap)
    ; Parameter .....: $hApplet - Das Handle des Applets, dessen Renderziel gesetzt werden soll.
    ; $hPixmap - Ein Handle zu einer Pixmap, welche das Renderziel sein soll. Bemerkungen beachten!
    ; Rückgabewerte .:
    ; Bemerkungen ...: $hPixmap kann nur eine Pixmap sein, die mit LcdCreatePixmap erstellt wurde.
    ; 0 verwenden, um das Renderziel zurückzusetzen.
    ; Verwandt ......: LcdCreatePixmap
    ; ===============================================================================================================================
    Func LcdSetTarget($hApplet, $hPixmap)
    Local $ret = DllCall($dll, "int", "LcdSetTarget", "ptr", $hApplet, "ptr", $hPixmap)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetTarget
    #endregion Graphics

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

    #region Pixmap
    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdCreatePixmap
    ; Beschreibung ..: Erstellt eine neue leere Pixmap
    ; Syntax ........: LcdCreatePixmap([$iWidth = 320, [$iHeight = 240, [$iDevice = $LCD_DEVICE_COLOR]]])
    ; Parameter .....: $iWidth - Breite der Pixmap
    ; $iHeight - Höhe der Pixmap
    ; $iDevice - Typ des Geräts, für das die Pixmap erstellt werden soll.
    ; Rückgabewerte .: Erfolg - Das Handle der Pixmap
    ; Bemerkungen ...:
    ; Verwandt ......: Lcd
    ; ===============================================================================================================================
    Func LcdCreatePixmap($iWidth = 320, $iHeight = 240, $iDevice = $LCD_DEVICE_COLOR)
    Local $ret = DllCall($dll, "ptr", "LcdCreatePixmap", "int", $iWidth, "int", $iHeight, "int", $iDevice)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdCreatePixmap

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdDeletePixmap
    ; Beschreibung ..: Löscht eine Pixmap
    ; Syntax ........: LcdDeletePixmap($hPixmap)
    ; Parameter .....: $hPixmap - Das Handle der Pixmap, die gelöscht werden soll.
    ; Rückgabewerte .:
    ; Bemerkungen ...: Sollte vor LcdDeInitialize aufgerufen werden.
    ; Verwandt ......: LcdCreatePixmap LcdLoadPixmap LcdDeInitialize
    ; ===============================================================================================================================
    Func LcdDeletePixmap($hPixmap)
    Local $ret = DllCall($dll, "int", "LcdDeletePixmap", "ptr", $hPixmap)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDeletePixmap

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdDrawPixmap
    ; Beschreibung ..: Zeichnet eine Pixmap in den Buffer eines Applets.
    ; Syntax ........: LcdDrawPixmap($hApplet, [$hPixmap, [$iX = 0, [$iY = 0, [$iFrame = 0]]]])
    ; Parameter .....: $hApplet - Das Applet, in dessen Buffer die Pixmap gezeichnet werden soll.
    ; $hPixmap - Die Pixmap, die gezeichnet werden soll.
    ; $iX - Die X-Koordinate, der oberen linken Ecke der Pixmap
    ; $iY - Die Y-Koordinate, der oberen linken Ecke der Pixmap
    ; $iFrame - Die Framezahl, sollte die Pixmap mit LcdLoadAnimPixmap erstellt worden sein.
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......: LcdLoadAnimPixmap
    ; ===============================================================================================================================
    Func LcdDrawPixmap($hApplet, $hPixmap, $iX = 0, $iY = 0, $iFrame = 0)
    Local $ret = DllCall($dll, "int", "LcdDrawPixmap", "ptr", $hApplet, "ptr", $hPixmap, "int", $iX, "int", $iY, "int", $iFrame)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawPixmap

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDrawPixmapRect($hApplet, $hPixmap, $iX, $iY, $iSX, $iSY, $iWidth, $iHeight, $iFrame)
    Local $ret = DllCall($dll, "int", "LcdDrawPixmap", "ptr", $hApplet, "ptr", $hPixmap, "int", $iX, "int", $iY, "int", $iSX, "int", $iSY, "int", $iWidth, "int", $iHeight, "int", $iFrame)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawPixmapRect

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdLoadAnimPixmap($sFile, $iFrameWidth, $iFrameHeight, $iFrames)
    Local $ret = DllCall($dll, "ptr", "LcdLoadAnimPixmapW", "wstr", $sFile, "int", $iFrameWidth, "int", $iFrameHeight, "int", $iFrames)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdLoadAnimPixmap

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........: LcdLoadPixmap
    ; Beschreibung ..:
    ; Syntax ........: LcdLoadPixmap($sFile)
    ; Parameter .....: $sFile - Der Pfad zu der Bilddatei, die geladen werden soll.
    ; Rückgabewerte .: Erfolg - Das Handle der Pixmap
    ; Bemerkungen ...: Unterstützte Formate: JPG, PNG, BMP, TIFF und GIF
    ; Verwandt ......: LcdCreatePixmap LcdDeletePixmap
    ; ===============================================================================================================================
    Func LcdLoadPixmap($sFile)
    Local $ret = DllCall($dll, "ptr", "LcdLoadPixmapW", "wstr", $sFile)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdLoadPixmap

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdPixmapWidth($hPixmap)
    Local $ret = DllCall($dll, "int", "LcdPixmapWidth", "ptr", $hPixmap)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdPixmapWidth

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdPixmapHeight($hPixmap)
    Local $ret = DllCall($dll, "int", "LcdPixmapHeight", "ptr", $hPixmap)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdPixmapHeight
    #endregion Pixmap

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

    #region Font
    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDeleteFont($hFont)
    Local $ret = DllCall($dll, "int", "LcdDeleteFont", "ptr", $hFont)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDeleteFont

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdDrawText($hApplet, $sString, $iX, $iY)
    Local $ret = DllCall($dll, "int", "LcdDrawTextW", "ptr", $hApplet, "wstr", $sString, "int", $iX, "int", $iY)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdDrawText

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdLoadFont($sFamily, $iHeight, $iFlags, $sFile)
    Local $ret = DllCall($dll, "ptr", "LcdLoadFontW", "wstr", $sFamily, "int", $iHeight, "int", $iFlags, "wstr", $sFile)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdLoadFont

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdSetFont($hApplet, $hFont)
    Local $ret = DllCall($dll, "int", "LcdSetFont", "ptr", $hApplet, "ptr", $hFont)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdSetFont

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdStringHeight($hApplet, $sString)
    Local $ret = DllCall($dll, "int", "LcdStringHeightW", "ptr", $hApplet, "wstr", $sString)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdStringHeight

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

    ; #FUNKTION# ====================================================================================================================
    ; Name ..........:
    ; Beschreibung ..:
    ; Syntax ........:
    ; Parameter .....:
    ; Rückgabewerte .:
    ; Bemerkungen ...:
    ; Verwandt ......:
    ; ===============================================================================================================================
    Func LcdStringWidth($hApplet, $sString)
    Local $ret = DllCall($dll, "int", "LcdStringWidthW", "ptr", $hApplet, "wstr", $sString)
    If @error Then Return SetError(1, @error, 0)
    Return $ret[0]
    EndFunc ;==>LcdStringWidth
    #endregion Font

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

    , habe ich eine Script für das G19 geschrieben, welches den Downloadstatus des aktuellen Downloads anzeigt.

    Die einzige Einstellung die am JDownloader gemacht werden muss, ist die Erweiterung "Remote Control" mit dem Standartport "10025" zu aktivieren.

    Hier nun die benötigten Komponenten für das Script.

    Dann noch die entsprechende DLL aus AdvanceLcd. Im herruntergladenen Archiv unter Binary und dann entsprechend dem Betriebsystem x64 oder x86 zu finden.

    Und hier nun das eigentliche Script (die fünf Funktionen oben sind drin weil diese in der UDF fehlen) mit der bitte um Feadback:

    Spoiler anzeigen
    [autoit]


    #include <String.au3>
    #include <AdvanceLCD.au3>
    #include <Array.au3>

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

    LcdInitialize()
    $hApplet = LcdCreateApplet("JDownloader", 2, 1, 1)
    LcdSetTarget($hApplet, 0)
    LcdWaitActivation($hApplet)
    $hFont = LcdLoadFont("Arial", 23, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $hFont)
    LcdSetPriority($hApplet, $LCD_PRIORITY_NORMAL, 1)

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

    $pause = 0

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

    While 1
    Sleep(100)

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

    If BinaryToString(InetRead("http://localhost:10025/get/downloadstatus", 17)) == "RUNNING" Then
    If LcdButtonState($hApplet, $LCD_BUTTON_OK) = 1 Then
    InetRead("http://localhost:10025/action/pause", 17)
    If $pause = 0 Then
    $pause = 1
    Else
    $pause = 0
    EndIf
    EndIf

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

    LcdClear($hApplet, 0x000000)

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

    $downliste = BinaryToString(InetRead("http://localhost:10025/get/downloads/currentlist", 17))
    $download = _StringBetween($downliste, "<file ", "/>")

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

    $filename = _StringBetween($download[0], 'file_name="', '"')
    $filepercent = _StringBetween($download[0], 'file_percent="', '"')
    $fileeta = _StringBetween($download[0], 'file_status="', '"')
    $filepackage = _StringBetween($download[0], 'file_package="', '"')

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

    LcdDrawText($hApplet, $filename[0], 0, 0)
    $prozent = $filepercent[0] & "%"
    $prozentlaenge = 319 - (LcdStringWidth($hApplet, $prozent))
    LcdDrawText($hApplet, $prozent, $prozentlaenge, 25)
    $progressprozent = Round($filepercent[0])
    $progressanzahl = Round((40 / 100) * $progressprozent)
    $progresstext = ""
    For $i = 1 To $progressanzahl Step 1
    $progresstext = $progresstext & "|"
    Next
    LcdDrawText($hApplet, $progresstext, 0, 25)
    LcdDrawText($hApplet, $fileeta[0], 0, 50)
    LcdDrawText($hApplet, $filepackage[0], 0, 75)

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

    If $pause = 1 Then
    $pause = 1

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

    $pauseFont = LcdLoadFont("Arial", 40, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $pauseFont)
    $xwert = 160 - (LcdStringWidth($hApplet, "Pause") / 2)
    LcdDrawText($hApplet, "Pause", $xwert, 125)
    LcdSetFont($hApplet, $hFont)
    EndIf

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

    $laufendedownloads = BinaryToString(InetRead("http://localhost:10025/get/downloads/currentcount", 17))
    LcdDrawText($hApplet, "Laufende Downloads: " & $laufendedownloads, 0, 190)
    $fertigedownloads = BinaryToString(InetRead("http://localhost:10025/get/downloads/finishedcount", 17))
    $gesamtedownloads = BinaryToString(InetRead("http://localhost:10025/get/downloads/allcount", 17))
    LcdDrawText($hApplet, "Gesamt fertig: " & $fertigedownloads & "/" & $gesamtedownloads, 0, 215)
    LcdUpdate($hApplet, 0)
    Else
    $keindownloadFont = LcdLoadFont("Arial", 40, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $keindownloadFont)
    $keindownloadtext = "kein Download aktiv"
    $keindownloadlaenge = 160 - (LcdStringWidth($hApplet, $keindownloadtext) / 2)
    $keindownloadhoehe = 120 - (LcdStringHeight($hApplet, $keindownloadtext) / 2)
    LcdDrawText($hApplet, $keindownloadtext, $keindownloadlaenge, $keindownloadhoehe)
    LcdUpdate($hApplet, 0)
    $hFont = LcdLoadFont("Arial", 23, $LCD_FONT_DEFAULT, "arial.ttf")
    LcdSetFont($hApplet, $hFont)
    EndIf
    WEnd

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

    Func killfunc()
    LcdDeleteApplet($hApplet)
    LcdDeInitialize()
    EndFunc ;==>killfunc

    [/autoit]

    Wenn man auf "OK" auf der G19 drück kann man den Download pausieren und mit einem erneuten betätigen der Taste "OK" wieder fortsetzen.

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™