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

Beiträge von Xenobiologist

  • Probleme mit Includes

    • Xenobiologist
    • 18. Juni 2010 um 11:09

    OI ist noch kein Bestandteil von Scite4Autoit3. (sprich extra Download!)
    Wenn ich mal wieder Zeit habe, dann muss ich an OI noch ein paar Änderungen vornehmen.

    Falls du Fragen oder Probleme mit OI hast, kannst du mich gern per PN/ICQ etc. kontaktieren.

    Mega

  • Test schreibeen

    • Xenobiologist
    • 17. Juni 2010 um 21:58

    Na was denn jetzt? Wenn es ein Bot wird, dann bitte etwas geschickter Fragen oder besser gleich bleiben lassen.
    Wenn nict, dann bitte mehr Info!

  • ListView und Filter, nur wie am besten?

    • Xenobiologist
    • 17. Juni 2010 um 19:34

    Hi,

    gehen würden beide Lösungen. Bei der IE Lösung müsstest du natürlich ein bißchen mehr Zeit investieren.
    Nein sorry, mehr als Farbe fällt mir nicht ein. Kannst eine Checkbox machen und den Halken setzen :D

    Mega

  • aus einer logdatein(txt) den letzten eintrag mit suchbefriff finden!

    • Xenobiologist
    • 17. Juni 2010 um 18:09

    Ah, also sowas

    [autoit]

    Local $sText = ClipGet()
    StringReplace(StringMid($sText, 1, StringInStr($sText, 'pos:', 2, -1)), @CRLF, @CRLF)
    MsgBox(0, "", "Gefunden in Zeile " & @extended + 1 & @CRLF)

    [/autoit]
  • Laptop Aufgeklappt oder Zugeklappt?

    • Xenobiologist
    • 17. Juni 2010 um 17:51

    Und dies?

    Spoiler anzeigen
    [autoit]

    Dim $strComputer = "localhost", $message_title, $message_content
    $oBJ = ObjGet ("winmgmts:\\" & $strComputer & "\root\cimv2")
    $event = $oBJ.ExecNotificationQuery("Select * from Win32_PowerManagementEvent")
    $ret = $event.NextEvent.EventType
    Switch $ret
    Case 4
    $message_title = "Entering Suspend"
    $message_content = "Indicates that the computer is about to enter the suspended state."
    Case 7
    $message_title = "Resume from Suspend"
    $message_content = "Indicates that a ResumeSuspend message has been sent, enabling the computer to return to its regular power state."
    Case 10
    $message_title = "Power Status Change"
    $message_content = "Indicates a change in the power status of the computer, such as a switch from battery power to AC, or from AC to an uninterruptible power supply"
    Case 11
    $message_title = "OEM Event"
    $message_content = "Indicates that an Advanced Power Management (APM) BIOS has sent an OEM event"
    Case 18
    $message_title = "Resume Automatic"
    $message_content = "Indicates that the computer has awakened in response to an event"
    EndSwitch

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

    MsgBox (0, $message_title, $message_content)

    [/autoit]

    Mega

  • aus einer logdatein(txt) den letzten eintrag mit suchbefriff finden!

    • Xenobiologist
    • 17. Juni 2010 um 17:47

    Würde das nicht reichen?

    [autoit]

    Local $sText = ClipGet()
    MsgBox(0, "", "Gefunden in Zeile " & StringMid($sText, StringInStr($sText, 'mp_', 2, -1) + 3, 2))

    [/autoit]
  • Laptop Aufgeklappt oder Zugeklappt?

    • Xenobiologist
    • 17. Juni 2010 um 17:41

    Teste mal sowas

    Spoiler anzeigen
    [autoit]

    $strComputer = "."
    $objWMIService = ObjGet("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2")
    $colMonitoredEvents = $objWMIService.ExecNotificationQuery _
    ("Select * from Win32_PowerManagementEvent")

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

    While 1
    $strLatestEvent = $colMonitoredEvents.NextEvent
    ConsoleWrite($strLatestEvent.EventType)
    WEnd

    [/autoit]
  • aus einer logdatein(txt) den letzten eintrag mit suchbefriff finden!

    • Xenobiologist
    • 17. Juni 2010 um 17:28

    Mit StringFunktionen geht es natürlich auch.

  • Laptop Aufgeklappt oder Zugeklappt?

    • Xenobiologist
    • 17. Juni 2010 um 17:26

    Dann würde ich sagen hast du keine Chance, weil die Gelenke des Displays keine elektrik beeinflusst.

  • Laptop Aufgeklappt oder Zugeklappt?

    • Xenobiologist
    • 17. Juni 2010 um 17:24

    in einer Dockingstation, wenn zugeklappt?
    Ansonsten würde ich sagen nein.

  • Email senden

    • Xenobiologist
    • 17. Juni 2010 um 17:22

    Mehr kann ich nicht tun.
    Du musst nur hier das richtige eintragen

    Spoiler anzeigen

    $s_SmtpServer = "mail.gmx.net"
    $s_FromName = "Chef"
    $s_FromAddress = "xxx@gmx.de"
    $s_ToAddress = "xxx@gmx.de"
    $s_Subject = "My Test UDF"
    $s_UName = "xxx@gmx.de"
    $s_PWD = "xxx"


    Mega

  • Email senden

    • Xenobiologist
    • 17. Juni 2010 um 17:13

    Das Skript funktioniert!
    Du musst nur die richtigen Parameter übergeben!

  • aus einer logdatein(txt) den letzten eintrag mit suchbefriff finden!

    • Xenobiologist
    • 17. Juni 2010 um 17:12

    Regex mit pattern pos: mp_\d+ und dann einfach den letzten EIntrag des Arrays nehmen.

  • Email senden

    • Xenobiologist
    • 17. Juni 2010 um 16:32
    Spoiler anzeigen
    [autoit][/autoit] [autoit][/autoit] [autoit]

    #include <INet.au3>
    $s_SmtpServer = "mail.gmx.net"
    $s_FromName = "Chef"
    $s_FromAddress = "xxx@gmx.de"
    $s_ToAddress = "xxx@gmx.de"
    $s_Subject = "My Test UDF"
    $s_UName = "xxx@gmx.de"
    $s_PWD = "xxx"
    #cs
    $arIniRead = IniReadSection(@ScriptDir & '\mails.ini', "mail")
    $s_SmtpServer = $arIniRead[1][1]
    $s_FromName = $arIniRead[2][1]
    $s_FromAddress = $arIniRead[3][1]
    $s_ToAddress = $arIniRead[4][1]
    $s_Subject = $arIniRead[5][1]
    $s_UName = $arIniRead[6][1]
    $s_PWD = $arIniRead[7][1]
    MsgBox(0, "", $s_SmtpServer & ' ' & $s_FromName & ' ' & $s_FromAddress & ' ' & $s_ToAddress & ' ' & $s_Subject & ' ' & $s_UName & ' ' & $s_PWD)
    #ce

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

    Dim $as_Body[2]
    $as_Body[0] = "Testing the new email udf"
    $as_Body[1] = "Second Line"
    $Response = _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_UName, $s_PWD, $s_Subject, $as_Body)
    ;~ $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, "", "", 1)
    $err = @error
    If $Response = 1 Then
    MsgBox(0, "Success!", "Mail sent")
    Else
    MsgBox(0, "Error!", "Mail failed with error code " & $err)
    EndIf

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

    ;===============================================================================
    ;
    ; Function Name: _INetSmtpMailAuth()
    ; Description: Sends an email using SMTP over TCP IP.
    ; Parameter(s): $s_SmtpServer - SMTP server to be used for sending email
    ; $s_FromName - Name of sender
    ; $s_FromAddress - eMail address of sender
    ; $s_ToAddress - Address that email is to be sent to
    ; $s_Username - Username for Authentication (bernd670)
    ; $s_Passwd - Password for Authentication (bernd670)
    ; $s_Subject - Subject of eMail
    ; $as_Body - Single dimension array containing the body of eMail as strings
    ; $s_helo - Helo identifier (default @COMPUTERNAME) sometime needed by smtp server
    ; $s_first - send before Helo identifier (default @CRLF) sometime needed by smtp server
    ; $b_trace - trace on a splash window (default 0 = no trace)
    ; Requirement(s): None
    ; Return Value(s): On Success - Returns 1
    ; On Failure - 0 and sets
    ; @ERROR = 1 - Invalid Parameters
    ; @ERROR = 2 - Unable to start TCP
    ; @ERROR = 3 - Unable to resolve IP
    ; @ERROR = 4 - Unable to create socket
    ; @ERROR = 5x - Cannot open SMTP session
    ; @ERROR = 50x - Cannot send body
    ; @ERROR = 5000 - Cannot close SMTP session
    ; Authors: Original function to send email via TCP - Asimzameer
    ; Conversion to UDF - Walkabout
    ; Correction Helo, timeout, trace - Jpm
    ; Correction send before Helo - Jpm
    ; Include Authentication - bernd670
    ;
    ;===============================================================================
    Func _INetSmtpMailAuth($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Username, $s_Passwd, $s_Subject = "", $as_Body = "", $s_helo = "", $s_first = "-1", $b_trace = 0)

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

    Local $v_Socket
    Local $s_IPAddress
    Local $i_Count
    Local $s_Send[9]
    Local $s_ReplyCode[9];Return code from SMTP server indicating success

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

    If $s_SmtpServer = "" Or $s_FromAddress = "" Or $s_ToAddress = "" Or $s_Username = "" Or $s_Passwd = "" Or $s_FromName = "" Or StringLen($s_FromName) > 256 Then
    SetError(1)
    Return 0
    EndIf
    If $s_helo = "" Then $s_helo = @ComputerName
    If TCPStartup() = 0 Then
    SetError(2)
    Return 0
    EndIf
    StringRegExp($s_SmtpServer, "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)")
    If @extended Then
    $s_IPAddress = $s_SmtpServer
    Else
    $s_IPAddress = TCPNameToIP($s_SmtpServer)
    EndIf
    If $s_IPAddress = "" Then
    TCPShutdown()
    SetError(3)
    Return 0
    EndIf
    $v_Socket = TCPConnect($s_IPAddress, 25)
    If $v_Socket = -1 Then
    TCPShutdown()
    SetError(4)
    Return (0)
    EndIf

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

    $s_Send[0] = "EHLO " & $s_helo & @CRLF
    ;~ If StringLeft($s_helo,5) <> "EHLO " Then $s_Send[0] = "EHLO " & $s_helo & @CRLF
    $s_ReplyCode[0] = "250"

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

    $s_Send[1] = "AUTH LOGIN" & @CRLF
    $s_ReplyCode[1] = "334"
    $s_Send[2] = _Base64Encoding($s_Username) & @CRLF
    $s_ReplyCode[2] = "334"
    $s_Send[3] = _Base64Encoding($s_Passwd) & @CRLF
    $s_ReplyCode[3] = "235"
    $s_Send[4] = "MAIL FROM: <" & $s_FromAddress & ">" & @CRLF
    $s_ReplyCode[4] = "250"
    $s_Send[5] = "RCPT TO: <" & $s_ToAddress & ">" & @CRLF
    $s_ReplyCode[5] = "250"
    $s_Send[6] = "DATA" & @CRLF
    $s_ReplyCode[6] = "354"

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

    $s_Send[7] = "From: " & $s_FromName & " <" & $s_FromAddress & ">" & @CRLF & _
    "To: " & "<" & $s_ToAddress & ">" & @CRLF & _
    "Subject: " & $s_Subject & @CRLF & _
    "Mime-Version: 1.0" & @CRLF & _
    "Content-Type: text/plain; charset=US-ASCII" & @CRLF & _
    @CRLF
    $s_ReplyCode[7] = ""

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

    $s_Send[8] = @CRLF & "." & @CRLF
    $s_ReplyCode[8] = "250"

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

    ; open stmp session
    If __SmtpSend($v_Socket, $s_Send[0], $s_ReplyCode[0], $b_trace, "220", $s_first) Then
    SetError(50)
    Return 0
    EndIf

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

    ; send header
    For $i_Count = 0 To UBound($s_Send) - 2
    If __SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
    SetError(50 + $i_Count)
    Return 0
    EndIf
    Next

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

    ; send body records (a record can be multiline : take care of a subline beginning with a dot should be ..)
    For $i_Count = 0 To UBound($as_Body) - 1
    ; correct line beginning with a dot
    If StringLeft($as_Body[$i_Count], 1) = "." Then $as_Body[$i_Count] = "." & $as_Body[$i_Count]

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

    If __SmtpSend($v_Socket, $as_Body[$i_Count] & @CRLF, "", $b_trace) Then
    SetError(500 + $i_Count)
    Return 0
    EndIf
    Next

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

    ; close the smtp session
    $i_Count = UBound($s_Send) - 1
    If __SmtpSend($v_Socket, $s_Send[$i_Count], $s_ReplyCode[$i_Count], $b_trace) Then
    SetError(5000)
    Return 0
    EndIf

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

    TCPCloseSocket($v_Socket)
    TCPShutdown()
    Return 1
    EndFunc ;==>_INetSmtpMailAuth

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

    ;===============================================================================
    ;
    ; Function Name: _Base64Encoding()
    ; Description: Kodiert eine Zeichenfolge mit dem Base64-Verfahren
    ; (http://de.wikipedia.org/wiki/Base64)
    ; Parameter(s): $String - Zeichenfolge die kodiert werden soll
    ; Requirement(s): None
    ; Return Value(s): Kodierte Zeichenfolge
    ; Authors: bernd670
    ;
    ;===============================================================================
    Func _Base64Encoding($String)

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

    $strUmsetzung = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
    $strRetValue = ""

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

    For $i = 1 To StringLen($String) Step 3
    $strTok = StringMid($String, $i, 3)
    Switch StringLen($strTok)
    Case 3
    $iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
    Asc(StringMid($strTok, 2, 1))) * 256 + _
    Asc(StringMid($strTok, 3, 1))
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt

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

    Case 2
    $iTokVal = (Asc(StringMid($strTok, 1, 1)) * 256 + _
    Asc(StringMid($strTok, 2, 1))) * 256
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt & "="

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

    Case 1
    $iTokVal = Asc(StringMid($strTok, 1, 1)) * 65536
    $iTokVal = BitShift($iTokVal, 12)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1)
    $iTokVal = BitShift($iTokVal, 6)
    $strTokCryt = StringMid($strUmsetzung, (BitAND($iTokVal, 63)) + 1, 1) & $strTokCryt
    $strRetValue &= $strTokCryt & "=="

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

    EndSwitch
    Next

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

    Return $strRetValue
    EndFunc ;==>_Base64Encoding

    [/autoit]
  • ListView und Filter, nur wie am besten?

    • Xenobiologist
    • 17. Juni 2010 um 16:08

    Hi,

    andersrum ist denke ich schneller.
    Beide Listviews erstellen gleiche Koordinaten
    AlleAnzeigenLV und TrefferLV

    AlleAnzeigenLV show
    TrefferLV hide
    nach dem Suchen die TrefferLV im Hintergrund füllen und anschließend die Sichtbarkeit switchen.

    Was du noch machen könntest, wäre ein _IECreateEmbedded in die GUI übernehmen und einfach die Suchliste als html anzeigen. Dann kannst du sie Suche des IE nutzen bzw sämtliche Darstellungsmöglichkeiten von HTML etc. nutzen. (und das sehr sehr schnell!)

    Mega

  • ListView und Filter, nur wie am besten?

    • Xenobiologist
    • 17. Juni 2010 um 15:25

    Hallo R@iner,

    die Frage ist, wie viele Treffer werden es? Muss der User immer alle Treffer sehen? Kann man die Visualisierung der Treffer irgendwo anders machen (statusbar)?

    In meinen Augen gibt es nur 3 Möglichkeiten:
    - Ich blende in der aktuellen Liste die nicht benötigten Zeilen aus (wie ginge das?)
    = da wäre sich das GuiCtrlSetState und dann hide und die Trefferliste neu aufbauen und an derselben Stelle anzeigen am schnellsten.
    - Ich markiere die Trefferzeilen deutlicher (nur wie?)
    = Hintergrundfarbe (ist aber wahrscheinlich zeitintensiv)
    - Ich tausche die alte Liste gegen die Trefferliste aus (wie ginge das am einfachsten?)
    Siehe Antwort a :)

    Mega

  • ListView und Filter, nur wie am besten?

    • Xenobiologist
    • 17. Juni 2010 um 14:48

    Hi,

    wie wäre es, wenn du die Treffer in einer neuen Listview darunter anzeigst?

    Mega

  • AVG FREE Homepage auswerten

    • Xenobiologist
    • 17. Juni 2010 um 14:38
    [autoit]

    \((avg\w+\.exe)\).*?>([\d\.]+).*?>(\d+\.\s+\w+\s\d+).*?(\d+ MB)

    [/autoit]
  • Controls mit variabler Größe

    • Xenobiologist
    • 17. Juni 2010 um 14:29

    Kannst du deine Frage noch konkretisieren?

  • AVG FREE Homepage auswerten

    • Xenobiologist
    • 17. Juni 2010 um 14:28

    Kein Problem.

    Viel Spaß mit Regex. Mach einfach mal das Tutorial. Die ersten pattern kannst du sicher nach 10-15 min ohne Probleme bauen.

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™