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

Beiträge von BugFix

  • Problem mit VBS Übersetzung in AutoIt

    • BugFix
    • 29. Juni 2009 um 23:04

    Hi,
    dann sollte man vielleicht das ganze Objekt-Gedöns weglassen :D und mit der DLL arbeiten.

    Ich habe mich mal dran versucht und die Objekteigenschaft ProductsEx in den Dll-Funktionsaufruf MsiEnumProductsExW umgesetzt. Sollte (wenn es denn klappt) auch deutlich schneller sein.
    Kleiner Aufruf an progandy: Schau bitte mal drüber, ob das OK ist.
    Habs noch nicht getestet. Und bin im Moment auch zu müde. :P
    Ich hänge mal die OriginalInfo zu dieser Funktion mit an.
    Es werden noch die Werte für einige Konstanten benötigt, aber da kannst du ja selber mal schauen. Nimm es als Arbeitsansatz. ;)

    Func MsiEnumProductsEx
    [autoit]

    Func MsiEnumProductsEx($strProductCode, $strUserSid, $dwContext, $dwIndex)
    Local $szProductCode = DllStructCreate('wchar[' & StringLen($strProductCode)+1 & ']')
    Local $szUserSid = DllStructCreate('wchar[' & StringLen($strUserSid)+1 & ']')
    Local $pdwInstalledContext = DllStructCreate('int')
    Local $szSid = DllStructCreate('wchar[128]')
    Local $pcchSid = DllStructCreate('int')
    DllStructSetData($szProductCode, 1, $strProductCode)
    DllStructSetData($szUserSid, 1, $strUserSid)
    DllStructSetData($pdwInstalledContext, 1, $dwContext)
    Local $ret = DllCall('Msi.dll', 'uint', 'MsiEnumProductsExW', _
    'ptr', DllStructGetPtr($szProductCode), _
    'ptr', DllStructGetPtr($szUserSid), _
    'dword', $dwContext, _
    'dword', $dwIndex, _
    'wchar', 'szInstalledProductCode[40]', _
    'ptr', DllStructGetPtr($pdwInstalledContext), _
    'ptr', DllStructGetPtr($szSid), _
    'ptr', DllStructGetPtr($pcchSid))
    Local $aOut[4]
    $aOut[0] = $ret[5] ; ProductCode GUID
    $aOut[1] = DllStructGetData($pdwInstalledContext, 1); can be MSIINSTALLCONTEXT_USERMANAGED, MSIINSTALLCONTEXT_USERUNMANAGED, MSIINSTALLCONTEXT_MACHINE
    $aOut[2] = DllStructGetData($szSid, 1) ; string SID of the account under which this product instance exists
    $aOut[3] = DllStructGetData($pcchSid, 1) ; number of TCHAR in the szSid buffer
    Return $aOut
    EndFunc

    [/autoit]


    Und hier die Infos aus der Beschreibung zur Dll:

    Spoiler anzeigen
    [autoit]

    #cs

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

    UINT MsiEnumProductsEx(
    __in_opt LPCTSTR szProductCode,
    __in LPCTSTR szUserSid,
    __in DWORD dwContext,
    __in DWORD dwIndex,
    __out_opt TCHAR szInstalledProductCode[39],
    __out_opt MSIINSTALLCONTEXT *pdwInstalledContext,
    __out_opt LPTSTR szSid,
    __inout_opt LPDWORD pcchSid

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

    szProductCode [in, optional]
    ProductCode GUID of the product to be enumerated. Only instances of products within the scope of the context specified by the
    szUserSid and dwContext parameters are enumerated. This parameter can be set to NULL to enumerate all products in the
    specified context.

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

    szUserSid [in]
    Null-terminated string that specifies a security identifier (SID) that restricts the context of enumeration.
    The special SID string s-1-1-0 (Everyone) specifies enumeration across all users in the system.
    A SID value other than s-1-1-0 is considered a user-SID and restricts enumeration to the current user or any user in the system.
    This parameter can be set to null to restrict the enumeration scope to the current user.
    SID Meaning
    type

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

    NULL Specifies the currently logged-on user.

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

    User SID Specifies enumeration for a particular user in the system. An example of user SID is
    "S-1-3-64-2415071341-1358098788-3127455600-2561".

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

    s-1-1-0 Specifies enumeration across all users in the system.

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

    Note:
    The special SID string s-1-5-18 (System) cannot be used to enumerate products or patches installed as per-machine.
    When dwContext is set to MSIINSTALLCONTEXT_MACHINE only, szUserSid must be null.

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

    dwContext [in]
    Restricts the enumeration to a context. This parameter can be any one or a combination of the values shown in the following table.

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

    Context Meaning
    MSIINSTALLCONTEXT_USERMANAGED Enumeration extended to all per–user–managed installations for the users specified by szUserSid.
    An invalid SID returns no items.

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

    MSIINSTALLCONTEXT_USERUNMANAGED Enumeration extended to all per–user–unmanaged installations for the users specified by szUserSid.
    An invalid SID returns no items.

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

    MSIINSTALLCONTEXT_MACHINE Enumeration extended to all per-machine installations. When dwInstallContext is set
    to MSIINSTALLCONTEXT_MACHINE only, the szUserSID parameter must be null.

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

    dwIndex [in]
    Specifies the index of the product to retrieve. This parameter must be zero for the first call to the MsiEnumProductsEx function
    and then incremented for subsequent calls. The index should be incremented, only if the previous call has returned ERROR_SUCCESS.
    Because products are not ordered, any new product has an arbitrary index. This means that the function can return products in any
    order.

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

    szInstalledProductCode [out, optional]
    Null-terminated string of TCHAR that gives the ProductCode GUID of the product instance being enumerated. This parameter can be
    null.

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

    pdwInstalledContext [out, optional]
    Returns the context of the product instance being enumerated. The output value can be MSIINSTALLCONTEXT_USERMANAGED,
    MSIINSTALLCONTEXT_USERUNMANAGED, or MSIINSTALLCONTEXT_MACHINE. This parameter can be null.

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

    szSid [out, optional]
    An output buffer that receives the string SID of the account under which this product instance exists. This buffer returns an
    empty string for an instance installed in a per-machine context.
    This buffer should be large enough to contain the SID. If the buffer is too small, the function returns ERROR_MORE_DATA (0x000000EA)
    and sets *pcchSid to the number of TCHAR in the SID, not including the terminating NULL character.
    If szSid is set to NULL and pcchSid is set to a valid pointer, the function returns ERROR_SUCCESS (0x00000000) and sets
    *pcchSid to the number of TCHAR in the value, not including the terminating NULL. The function can then be called again to
    retrieve the value, with the szSid buffer large enough to contain *pcchSid + 1 characters.
    If szSid and pcchSid are both set to NULL, the function returns ERROR_SUCCESS if the value exists, without retrieving the value.

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

    pcchSid [in, out, optional]
    When calling the function, this parameter should be a pointer to a variable that specifies the number of TCHAR in the
    szSid buffer. When the function returns, this parameter is set to the size of the requested value whether or not the function
    copies the value into the specified buffer. The size is returned as the number of TCHAR in the requested value, not including
    the terminating null character.
    This parameter can be set to NULL only if szSid is also NULL, otherwise the function returns ERROR_INVALID_PARAMETER (0x00000057).
    #ce

    [/autoit]
  • Browserfunktion (Link Klicken detailliert)

    • BugFix
    • 29. Juni 2009 um 20:03

    Ich denke mal, dass eine Automatisierung von Opera nur über Java/Javascript läuft. Aber das ist nicht meine Baustelle. Stilgar ist auf dem Gebiet absolut firm. Er hat, wie du evtl. gesehen hast, die Automatisierung des Firefox geschrieben.

  • Browserfunktion (Link Klicken detailliert)

    • BugFix
    • 29. Juni 2009 um 19:16

    Es handelt sich hierbei um Methoden und Eigenschaften des Objektes: "InternetExplorer.Application"
    Näheres findest du hier: MSDN
    Sinn der UDF ist es ja, dass man sich nicht mit den Objektdetails beschäftigen muß, sondern dies von den Funktionen der UDF machen läßt.

  • 2 PCs mit Winamp - Synchronisation?

    • BugFix
    • 29. Juni 2009 um 18:09

    Fahr auf deinem PC Knoppix-Live CD hoch und streame mit Kaffeine. :D
    Naja, ganz so einfach ist es evtl. nicht, ich weiß nicht ob bei den aktuellen Knoppix-CD alle Codecs bereits bei sind.
    Vor Jahren war das alles inklusive, aber aufgrund geänderter Rechtslage kann es sein, dass die Codecs offiziell nicht dabei sind.
    Auf den andren Maschinen kann ja Windows laufen, der Stream kommt ja per LAN.

  • ÄHNLICHE Dateinamen finden?

    • BugFix
    • 29. Juni 2009 um 12:59
    Zitat von PokerFace

    ich habe sehr viele MP3's (Ca.5.75 Gb) und die möchte ich nach doppelgänger Sortieren.


    Doppelgänger müssen aber nicht titelgleich sein. Um echte Doppelgänger zu finden, müßtest du Dateiinhalte vergleichen. Ich denke, das könnte man mit Hashcode realisieren. Funktioniert dann aber auch nur bei wirklich identischen Dateien. Hast du einen Titel einmal von CD1 und ein andres mal von CD2 gerippt, so sind diese bestenfalls gleich, aber keinesfalls identisch. :D

  • Bots

    • BugFix
    • 29. Juni 2009 um 12:52
    Zitat von Deepred

    Sobald ein Post den Befehl PixelSearch hat wird es als Bot verdächtigt.


    Das liegt aber nur daran, dass viele User leider kaum in der Lage sind ihr Problem in Worte zu fassen.
    Wenn dort von Anbeginn in etwa folgendes steht:
    ..habe eine Anwendung XYZ auf die ich nicht direkt zugreifen kann (Controls können von AutoIt-WindoInfo nicht erkannt werden) und möchte nun versuchen, das Aufpopen einer Meldung durch Auslesen der Farbveränderung festzustellen...

    Dann kommen keine 'Botverdachtsmomente' auf und dem User kann Hilfe geleistet werden.
    Aber leider ist eine präzise Problembeschreibung eher die Ausnahme.

  • Problem mit VBS Übersetzung in AutoIt

    • BugFix
    • 29. Juni 2009 um 11:38

    Probier mal:

    [autoit]


    Local $strProductCode = '{1234ABCD-AAAA-BBBB-CCCC-567890ABCDEF}' ; <== dein Produkt-Code
    Local $oMSI = ObjCreate("WindowsInstaller.Installer")
    Local $oProducts = $oMsi.Products
    Local $IsInstalled = 0
    For $ProductID In $oProducts
    If StringUpper($ProductID) == StringUpper($strProductCode) Then
    $IsInstalled = 1
    ExitLoop
    EndIf
    Next
    If Not $IsInstalled Then Exit MsgBox(0, '', 'Produkt ist nicht installiert')

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

    $oProducts = $oMsi.ProductsEx($strProductCode,"s-1-1-0",1+2+4)
    If $oProducts.Count > 0 Then MsgBox(0, 'WARNING', 'The Product is not installed using ALLUSERS = 1')

    [/autoit]
  • Problem mit VBS Übersetzung in AutoIt

    • BugFix
    • 29. Juni 2009 um 09:08

    Um den VBS-Code in AutoIt nachzustellen fehlt das Wichtigste:
    Die Deklaration des Objektes oMsi.
    Ohne diese Angaben läßt sich da nichts machen. Und ad hoc habe ich auch im Web keinerlei Infos zu einem MSI-Objekt finden können.

  • 2 PCs mit Winamp - Synchronisation?

    • BugFix
    • 28. Juni 2009 um 20:05

    Habe grade eine Anleitung zum Streaming mit Winamp gefunden.
    Guckst du: http://www.winhelpline.info/forum/465843-post6.html

  • 2 PCs mit Winamp - Synchronisation?

    • BugFix
    • 28. Juni 2009 um 19:57

    Ich weiß nicht ob das unter Windows auch geht, aber bei Linux kannst du z.B. mit Kaffeine das, was du wiedergibst auch als Stream bereitstellen und per Netzwerk verbreiten.

  • _MemMsgBox ./. MsgBox

    • BugFix
    • 28. Juni 2009 um 18:36

    "_MemMsgBox
    Zeigt eine Nachrichtenbox mit einem breiteren Rand als das Original an"

    Sagt doch alles - oder? ;)


    Edit: Das war mein Post #4000 !! :D

  • array, zufall, send

    • BugFix
    • 28. Juni 2009 um 18:13

    Darf man fragen, was es werden soll?
    Habe da so einen Verdacht... 8|

    (und schau dir mal die Syntax von Send an)

  • Maschinen GUID mit AutoIt erstellen

    • BugFix
    • 28. Juni 2009 um 18:04

    Ich hatte es auch so verstanden, dass eine dem PC bereits zugeordnete GUID ausgelesen werden soll (auch wenn die Überschrift von Erstellen spricht).
    Hab mal etwas gesucht aber nur sehr widersprüchliche Angaben gefunden. Allem Anschein nach wird standardmäßig auf einem Windows-PC wohl keine Maschinen GUID generiert.

  • GDI+ Kreis mit Mittelpunktkoordinaten zeichnen

    • BugFix
    • 28. Juni 2009 um 16:23

    Hi,
    mich hat es bisher immer genervt, dass zum Zeichnen eines Kreises mit GDI+ die Koordinaten der linken oberen Ecke des (gedachten) umlaufenden Quadrates angegeben werden müssen. Schließlich sind wir es seit Schulzeiten gewohnt einen Kreis über Mittelpunkt und Durchmesser zu definieren. :D
    Auch wenn es nur eine simple Rechenaufgabe ist, so empfinde ich es als angenehmer auf diese Art zu zeichnen:

    [autoit]

    Func _GDIPlus_GraphicsDrawCircleByCentre($hGraphic, $iX, $iY, $iDiameter, $hPen = 0)
    $iX -= $iDiameter/2
    $iY -= $iDiameter/2
    _GDIPlus_GraphicsDrawEllipse($hGraphic, $iX, $iY, $iDiameter, $iDiameter, $hPen)
    EndFunc

    [/autoit]
  • RichEdit - Mehrere Probleme

    • BugFix
    • 28. Juni 2009 um 14:44
    Zitat von NoName

    Ich will aber, dass die RichEdit nur für das erste Tab gilt. Warum wird sie für alle gemacht???


    :D Das Richeditcontrol wird überhaupt nicht auf dem Tab erstellt, sondern direkt auf der GUI.
    Du mußt halt abfragen, welches Tab aktiv ist und nur bei dem gewünschten, das Editcontrol einblenden.

    Das selbe Problem mit einem anderen Ctrl war hier: https://autoit.de/index.php?page…1331#post101331

  • µit - Juli

    • BugFix
    • 28. Juni 2009 um 11:10

    Über den Nutzen der Rückgabe als String (getrennt oder summiert) könnte man sicher streiten. :D
    Aber letztlich soll es dann eukalyptus festlegen. Und danach werden wir uns richten. ;)

  • Arbeitszeit Rechner

    • BugFix
    • 28. Juni 2009 um 10:57

    Hi,
    hier kannst du die zutreffenden Feiertage mit berücksichtigen. Falls diese auf Samstag oder Wochentag fallen, wird das in der Berechnung berücksichtigt.
    Der heutige Tag wird bei der Berechnung nicht berücksichtigt.
    Hab es nicht von Hand nachgerechnet, ob es paßt :D.

    Edit: Noch 'nen Bug gefunden ;)

    Spoiler anzeigen
    [autoit]

    #include <DateTimeConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <Array.au3>
    #include <Date.au3>
    #include <StaticConstants.au3>

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

    Local $ret = _Feiertage(2009, 0)
    _ArraySort($ret, 0, 0, 0, 1)
    Global $aDays[32]
    Local $gui, $date, $style = "yyyy-MM-dd", $DTM_SETFORMAT_ = 0x1032
    $gui = GUICreate('Feiertage (alphabetisch)', 350, 350)
    GUICtrlCreateLabel('Wähle das Enddatum', 10, 10, 330, 17, $SS_CENTER)
    $date = GUICtrlCreateDate('', 115, 30, 120, 20)
    GUICtrlCreateLabel('Wähle die nicht zutreffenden Feiertage ab!', 10, 60, 330, 17, $SS_CENTER)
    Local $x = 10, $y = 85
    For $i = 0 To 31
    If $i = 16 Then
    $x = 170
    $y = 85
    EndIf
    $aDays[$i] = GUICtrlCreateCheckbox($ret[$i][1], $x, $y, 150, 17)
    GUICtrlSetState(-1, $GUI_CHECKED)
    $y += 22
    Next
    GUICtrlSendMsg($date, $DTM_SETFORMAT_, 0, $style)
    GUISetState()

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

    Do
    Until GUIGetMsg() = -3

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

    Global $cntDayDelete = 0, $samstag = 0, $freeSat = 0
    Local $ToDate = StringReplace(GUICtrlRead($date), '-', '/'), $ToYear = StringLeft($ToDate, 4)
    Local $ToM_D = StringRight($ToYear, 6)
    Local $currYear = @YEAR, $currM_D = '/' & @MON & '/' & @MDAY
    Local $cntDays = _DateDiff('D', @YEAR & '/' & @MON & '/' & @MDAY, $ToDate)

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

    For $i = 0 To UBound($aDays) -1
    If BitAND(GUICtrlRead($aDays[$i]), $GUI_CHECKED) Then
    $aDays[$i] = 1
    Else
    $aDays[$i] = 0
    EndIf
    Next

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

    Do
    Select
    Case $currYear < $ToYear
    _check($currYear, $currM_D, '/12/31')
    $currM_D = '/01/01'
    Case $currYear = $ToYear
    _check($currYear, $currM_D, $ToM_D)
    EndSelect
    $currYear += 1
    Until $currYear > $ToYear

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

    Func _check($Year, $start, $end)
    Local $ind, $aFT = _Feiertage($Year, 0, 1), $day = $Year & $start
    _ArraySort($aFT, 0, 0, 0, 1)
    While $day <= $Year & $end
    $ind = _ArraySearch($aFT, $day)
    If Not @error Then
    If $aDays[$ind] And (Not StringInStr('1 7', $aFT[$ind][2])) Then $cntDayDelete += 1
    If $aDays[$ind] And ($aFT[$ind][2] = 7) Then $freeSat += 1
    EndIf
    Switch _DateToDayOfWeek(StringLeft($day,4), StringMid($day,6,2), StringRight($day,2))
    Case 1
    $cntDayDelete += 1
    Case 6
    $samstag += 1
    EndSwitch
    $day = _DateAdd('D', 1, $day)
    WEnd
    EndFunc
    ConsoleWrite('abzuziehende Sonn- u. Feiertage: ' & $cntDayDelete & @CRLF)
    ConsoleWrite('Samstage ges.: ' & $samstag & @CRLF)
    ConsoleWrite('Samstage frei: ' & $freeSat & @CRLF & @CRLF)
    ConsoleWrite('Arbeitszeit:' & @CRLF & ' Wochentage: ' & @TAB & $cntDays & ' x 8h = ' & $cntDays*8 & @CRLF)
    ConsoleWrite('+ Samstage:' & @TAB & $samstag-$freeSat & ' x 4h = ' & ($samstag-$freeSat)*4 & @CRLF)
    ConsoleWrite(@TAB & @TAB & @TAB & ' = ' & $cntDays*8 + ($samstag-$freeSat)*4 & @CRLF)

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

    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ; Funktion _Feiertage($Jahr)
    ;
    ; gibt die Feiertage des übergebenen Jahres
    ; als sortiertes Array[TT.MM.JJJJ od. JJJJ/MM/TT][Feiertag] zurück (gegliedert fix/variabel)
    ; $DateTyp 1 - Datum als TT.MM.JJJJ (Standard)
    ; 0 - Datum als JJJJ/MM/TT
    ; $wDay 0 - keine Rückgabe Wochentag (Standard)
    ; 1 - Rückgabe Wochentag ($array[n][2])
    ; Autor BugFix ([email='bug_fix@web.de'][/email])
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    Func _Feiertage($year, $DateTyp=1, $wDay=0)
    Local $4AdvDat, $3AdvDat, $2AdvDat, $1AdvDat, $TotSoDat, $BuBDat, $MutterDat, $ErnteDat, $tmp
    Local $HDays[32][2], $a, $b, $c, $d, $e, $H1, $H2, $N, $M
    ;fixe Feiertage
    $HDays[0][0] = $year & "/01/01\Neujahr"
    $HDays[1][0] = $year & "/01/06\Heilige Drei Könige"
    $HDays[2][0] = $year & "/02/14\Valentinstag"
    $HDays[3][0] = $year & "/05/01\Maifeiertag"
    $HDays[4][0] = $year & "/10/03\Tag der Deutschen Einheit"
    $HDays[5][0] = $year & "/10/31\Reformationstag"
    $HDays[6][0] = $year & "/11/01\Allerheiligen"
    $HDays[7][0] = $year & "/12/24\Heiligabend"
    $HDays[8][0] = $year & "/12/25\1. Weihnachtsfeiertag"
    $HDays[9][0] = $year & "/12/26\2. Weihnachtsfeiertag"
    $HDays[10][0] = $year & "/12/31\Silvester"
    ;variable Feiertage
    $a = Mod($year, 19)
    $b = Mod($year, 4)
    $c = Mod($year, 7)
    $H1 = Int($year / 100)
    $H2 = Int($year / 400)
    $N = 4 + $H1 - $H2
    $M = 15 + $H1 - $H2 - Floor (Int((8 * $H1 + 13) / 25))
    $d = Mod((19 * $a + $M), 30)
    $e = Mod((2 * $b + 4 * $c + 6 * $d + $N), 7)
    If $d + $e = 35 Then
    $Easter = 50
    Else
    If $d = 28 And $e = 6 And $a > 10 Then
    $Easter = 49
    Else
    $Easter = 22 + $d + $e
    EndIf
    EndIf
    If $Easter < 32 Then
    $EasterDay = $Easter
    $EasterMonth = "03"
    Else
    $EasterDay = $Easter - 31
    $EasterMonth = "04"
    EndIf
    If $EasterDay < 10 Then
    $EasterDay = "0" & $EasterDay
    EndIf
    If $year < 1900 Then ; Datumsoperationen nur mgl. wenn > 1900 , Jahr wird konvertiert
    $RestJahr = Mod($year, 100)
    If _DateIsLeapYear($year) Then
    If $RestJahr < 10 Then
    $RestJahr = "0" & $RestJahr
    EndIf
    $Tempyear = 20 & $RestJahr
    Else
    If $RestJahr < 10 Then
    $RestJahr = "0" & $RestJahr
    EndIf
    $Tempyear = 19 & $RestJahr
    EndIf
    $EasterDate = $Tempyear & "/" & $EasterMonth & "/" & $EasterDay
    Else
    $EasterDate = $year & "/" & $EasterMonth & "/" & $EasterDay
    EndIf
    $WFastDate = _DateAdd( 'd', -52, $EasterDate)
    $RosDat = _DateAdd( 'd', -48, $EasterDate)
    $FastDat = _DateAdd( 'd', -47, $EasterDate)
    $AschDat = _DateAdd( 'd', -46, $EasterDate)
    $GrDoDat = _DateAdd( 'd', -3, $EasterDate)
    $KarDat = _DateAdd( 'd', -2, $EasterDate)
    $OSaDat = _DateAdd( 'd', -1, $EasterDate)
    $OSoDat = $EasterDate
    $OMoDat = _DateAdd( 'd', 1, $EasterDate)
    $HiFaDat = _DateAdd( 'd', 39, $EasterDate)
    $PfSoDat = _DateAdd( 'd', 49, $EasterDate)
    $PfMoDat = _DateAdd( 'd', 50, $EasterDate)
    $FroDat = _DateAdd( 'd', 60, $EasterDate)
    ; Ermitteln nicht von Ostern abhängiger, veränderlicher Feiertage
    ; Muttertag = 2. Sonntag im Mai ABER wenn Pfingsten = 2.Sonntag im Mai dann ist Muttertag am 1. Sonntag
    ; Der 2. Sonntag kann nur zw. dem 8. u. 14.5. liegen
    For $maitag = 8 To 14
    If _DateToDayOfWeek($year, 5, $maitag) = 1 Then
    If $maitag < 10 Then
    $maitag = "0" & $maitag
    EndIf
    $MutterDat = $year & "/05/" & $maitag
    If $MutterDat = $PfSoDat Then
    $MutterDat = _DateAdd( 'd', -7, $year & "/05/" & $maitag)
    EndIf
    ExitLoop
    EndIf
    Next
    ; Erntedankfest 1. Sonntag im Oktober (zw. 1. u. 7.10.)
    For $oktobertag = 1 To 7
    If _DateToDayOfWeek($year, 10, $oktobertag) = 1 Then
    $oktobertag = "0" & $oktobertag
    $ErnteDat = $year & "/10/" & $oktobertag
    ExitLoop
    EndIf
    Next
    ; 4.Advent = Sonntag vor 25.12. (zw. 18. u. 24.12.)
    For $deztag = 18 To 24
    If _DateToDayOfWeek($year, 12, $deztag) = 1 Then
    $4AdvDat = $year & "/12/" & $deztag
    $3AdvDat = _DateAdd( 'd', -7, $4AdvDat)
    $2AdvDat = _DateAdd( 'd', -14, $4AdvDat)
    $1AdvDat = _DateAdd( 'd', -21, $4AdvDat)
    $TotSoDat = _DateAdd( 'd', -28, $4AdvDat)
    $BuBDat = _DateAdd( 'd', -32, $4AdvDat)
    ExitLoop
    EndIf
    Next
    $HDays[11][0] = $WFastDate & "\Weiberfastnacht"
    $HDays[12][0] = $RosDat & "\Rosenmontag"
    $HDays[13][0] = $FastDat & "\Fastnacht"
    $HDays[14][0] = $AschDat & "\Aschermittwoch"
    $HDays[15][0] = $GrDoDat & "\Gründonnerstag"
    $HDays[16][0] = $KarDat & "\Karfreitag"
    $HDays[17][0] = $OSaDat & "\Ostersamstag"
    $HDays[18][0] = $OSoDat & "\Ostersonntag"
    $HDays[19][0] = $OMoDat & "\Ostermontag"
    $HDays[20][0] = $HiFaDat & "\Christi Himmelfahrt"
    $HDays[21][0] = $PfSoDat & "\Pfingstsonntag"
    $HDays[22][0] = $PfMoDat & "\Pfingstmontag"
    $HDays[23][0] = $MutterDat & "\Muttertag"
    $HDays[24][0] = $FroDat & "\Fronleichnam"
    $HDays[25][0] = $ErnteDat & "\Erntedankfest"
    $HDays[26][0] = $BuBDat & "\Buß- und Bettag"
    $HDays[27][0] = $TotSoDat & "\Totensonntag"
    $HDays[28][0] = $1AdvDat & "\1. Advent"
    $HDays[29][0] = $2AdvDat & "\2. Advent"
    $HDays[30][0] = $3AdvDat & "\3. Advent"
    $HDays[31][0] = $4AdvDat & "\4. Advent"
    _ArraySort($HDays, 0, 0, 10)
    _ArraySort($HDays, 0, 11)
    If $wDay Then ReDim $HDays[32][3]
    For $i = 0 To 31
    If $DateTyp Then ; Datum konvertieren zu TT.MM.JJJJ
    $tmp = StringSplit($HDays[$i][0], "\", 2)
    $HDays[$i][0] = StringRight($tmp[0],2) & "." & StringMid($tmp[0],6,2) & "." & StringLeft($tmp[0],4)
    $HDays[$i][1] = $tmp[1]
    If $wDay Then $HDays[$i][2] = _DateToDayOfWeek(StringLeft($tmp[0],4), StringMid($tmp[0],6,2), StringRight($tmp[0],2))
    Else
    $HDays[$i][1] = StringTrimLeft($HDays[$i][0], 11)
    $HDays[$i][0] = StringLeft($HDays[$i][0], 10)
    If $wDay Then $HDays[$i][2] = _DateToDayOfWeek(StringLeft($HDays[$i][0],4), StringMid($HDays[$i][0],6,2), StringRight($HDays[$i][0],2))
    EndIf
    Next
    Return $HDays
    EndFunc ;==>_Feiertage

    [/autoit]
  • _GUICtrlRichEdit_SetFontColor Problem, falsche Farbe

    • BugFix
    • 27. Juni 2009 um 23:48

    Ich habe noch nicht mit Richedit gearbeitet, aber könnte es sein, dass die Farbe im BGR-Format verlangt wird?
    Dann kannst du folgende Funktion nutzen:

    [autoit]

    Func RGB2BGR($iColor)
    Local $sH = Hex($iColor,6)
    Return '0x' & StringRight($sH, 2) & StringMid($sH,3,2) & StringLeft($sH, 2)
    EndFunc ;==>RGB2BGR

    [/autoit]
  • Wortsturz (Spiel für Kinder)

    • BugFix
    • 27. Juni 2009 um 18:27

    Kann man ja mit 'SAPI.SpVoice' und deutscher Stimme automatisch vorlesen lassen.

  • TCPSend Problem

    • BugFix
    • 27. Juni 2009 um 14:23

    @nektus:
    Was hast du vor? Dich zum unbeliebtesten Poster zu machen?

    Nach 8 min schon bumpen ist gelinde gesagt eine Frechheit. Wir sitzen hier nicht und warten auf deine Probleme.

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™