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

  • MailVersand

    • Xenobiologist
    • 13. Mai 2007 um 18:07

    Hi,

    versuch es mal hiermit und füll die Dinge entsprechend aus:

    Spoiler anzeigen
    [autoit]

    #include <INet.au3>

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

    $s_SmtpServer = "mail.gmx.net"
    $s_FromName = "Mega"
    $s_FromAddress = "XXX"
    $s_ToAddress = "XXX"
    $s_Subject = "My Test UDF"
    $s_UName = "XXX"
    $s_PWD = "XXX"
    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)
    $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)

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

    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

    $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"

    $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] = ""

    $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

    ; 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]

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

    ; 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

    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]

    So long,

    Mega

  • Fun-Thread

    • Xenobiologist
    • 12. Mai 2007 um 18:40

    HI,

    Spoiler anzeigen

    Mitternacht am Friedhof. Zwei Geister verlassen Ihre Grabstätte. Sie gehen ein Stückchen spazieren. Nach einer Weile kommen sie zu
    einem Baum an dem zwei Motorräder stehen. Sagt der eine: "Komm lass uns eine Spritztour machen!" Meint der andere: "Ja, wart hier.
    Ich komm gleich wieder." Nach etwa einer halben Stunde kommt der eine mit seinem Grabstein wieder zurück. Der andere fragt: "Was
    machst du mit deinem Grabstein?" Antwort des anderen: "Na bist du doof, glaubst du wirklich, ich fahre ohne Papiere?!"


    Zwei Männer müssen ein Klavier in den 12. Stock tragen.
    Da sagt der eine zu dem anderen: "Ich habe eine gute und eine schlechte Nachricht für Dich. Die gute ist, dass wir schon im 7. Stock
    sind. Und die schlechte: wir sind im falschen Haus!"


    Es klingelt an der Tür, Klaus macht die Tür auf. Er ruft zu seinem Vater: "Papa, hier vor der Tür steht ein Mann, der sagt er
    sammelt für das neue Schwimmbad!" Antwortet ihm der Vater: "Ist gut, gib ihm drei Eimer Wasser mit!"

    So long,

    Mega

  • Key-Überprüfung über Inet?

    • Xenobiologist
    • 12. Mai 2007 um 18:36

    HI,

    hast du dir dies mal angeguckt? http://www.autoitscript.com/forum/index.php?showtopic=43945&hl=xpro*

    So long,

    Mega

  • Key-Überprüfung über Inet?

    • Xenobiologist
    • 12. Mai 2007 um 17:58

    Hi,

    XproTec pro Valuater macht sowas.

    So long,

    Mega

  • Wird die Schleife nur einmal durchlaufen?

    • Xenobiologist
    • 12. Mai 2007 um 00:58

    Hi,

    habe es mir noch nicht genau angeguckt, aber ich vermute mal, dass du in deiner anderen Schleife versteckst.

    Bau doch mal ConsoleWrites ein, um zu sehen, wo du bist.

    So long,

    Mega

  • Sonntag ist Muttertag..

    • Xenobiologist
    • 11. Mai 2007 um 22:39

    Hi,

    ich werde wie immer Gutscheine verschenken. :) Mit der Zeit wird man immer bequemer.

    So long,

    Mega

  • OrganizeIncludes

    • Xenobiologist
    • 11. Mai 2007 um 22:36

    Hi,

    viel Spaß und wenn du Wünsche etc. hast, dann sag Bescheid.

    So long,

    Mega

  • OrganizeIncludes

    • Xenobiologist
    • 11. Mai 2007 um 22:21

    Hi,

    ist Version 1.0 :D

    Bisher ist es so, dass der SourceCode geparst wird und dann alle includes die benötigt werden aus dem Standard-Autoit-Beta-Umfang gefunden werden.

    Diese werden enweder je nach Auswahl:

    a) Ganz oben im Skript eigebunden oder
    b) in die Zwischenablage kopiert.

    So long,

    Mega

  • OrganizeIncludes

    • Xenobiologist
    • 11. Mai 2007 um 20:56

    Hi,

    Organize Includes - setzt die benötigten Includes in Scite.

    Diese liegt unter @UserProfileDir (meistens c:\ Dokumente und Einstellungen\DEIN USER\ ...

    Sollte die Datei nicht zu finden sein in Scite mal die Config öffnen und schließen - mit STRG+1.

    Code
    # 36 OrganizeIncludes
    #command.36.*.au3="$(autoit3dir)\beta\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)"
    command.36.*.au3="$(autoit3dir)\autoit3.exe" "$(SciteDefaultHome)\OrganizeIncludes\OI_1.0.0.50.au3" "$(FilePath)"
    command.name.36.*.au3=OrganizeIncludes
    command.save.before.36.*.au3=1
    command.is.filter.36.*.au3=1
    command.shortcut.36.*.au3=Ctrl+Shift+Alt+I

    [/Spoiler]

    Source Code --> entfernt

    So long,

    Mega

    Download : Download THREAD
    Download

  • TextFarbe

    • Xenobiologist
    • 11. Mai 2007 um 16:35

    Hi,

    er meint, dass es bei der Schriftart die Option es für die gesamte GUI einzustellen gibt, aber bei Farbe halt nicht.

    So long,

    Mega

  • iniwrite und iniread für mehrzeilige msgbox

    • Xenobiologist
    • 11. Mai 2007 um 13:56

    Hi,

    wieso geht das nicht? Die Taktik ist genau richtig.

    So long,

    Mega

  • Ein nicht nachvollziehbares Problem

    • Xenobiologist
    • 11. Mai 2007 um 13:42

    Hi,

    wenn das Fenster das den Send Befehl bekommen soll nicht aktiv ist, dann geht der Send ins Leere!

    So long,

    Mega

  • Ein nicht nachvollziehbares Problem

    • Xenobiologist
    • 11. Mai 2007 um 13:06

    Hi,

    vielleicht verliert das Fenster den Foucs. Versuch mal auf ControlSend umzustellen.

    So long,

    Mega

  • Belastungstest / Benchmark

    • Xenobiologist
    • 11. Mai 2007 um 12:41

    Hi,

    ich würde ein fertiges Tool nehmen.

    Außerdem solltest du überlegen, was du mit den Ergnissem überhaupt anfangen willst. Was nützt dir ein Autoit-Tool, dass dir nach z.B. 43 Sekunden deinen Rechner einfriert?

    Du brauchst ja Vergleichsparameter.

    Und jetzt, selbst wenn du dies alles hast, dann würde ich nie einen Rechner anisch "lasttesten", sondern immer nur den Rechner im Zusammenhang mit der Funktion die er ausfüllen soll. Also mit der Zielanwendung.

    So long,

    Mega

  • GUIMENU variable weiter..k.a. wie man das sagt^^

    • Xenobiologist
    • 10. Mai 2007 um 22:34

    Hi,

    da ist aber einiges im Argen. Mach es bitte erstmal fehlerfrei.

    So long,

    Mega

  • TextFarbe

    • Xenobiologist
    • 10. Mai 2007 um 22:08

    Hi,

    na so:

    [autoit]

    #include <GUIConstants.au3>

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

    Global $label[10]

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

    GUICreate("My GUI")
    For $i = 0 To 9
    $label[$i] = GUICtrlCreateLabel("text", 10, 10 + $i * 20, 100, 20)
    GUICtrlSetColor(-1, 0xF32345)
    Next
    GUISetState(@SW_SHOW)

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

    ; Run the GUI until the dialog is closed
    While 1
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

    [/autoit]

    So long,

    Mega

  • Belastungstest / Benchmark

    • Xenobiologist
    • 10. Mai 2007 um 21:41

    Hi,

    das klingt eher nach einem Spaß-ärger-meinen-Kollegen-Skript, oder?

    So long,

    Mega

  • TextFarbe

    • Xenobiologist
    • 10. Mai 2007 um 21:16

    Hi,

    mach es doch in einer Schleife.

    So long,

    Mega

  • Puhh.... Passwort wieder gefunden / Keine e-Mail bei Passwortanfrage?

    • Xenobiologist
    • 10. Mai 2007 um 17:45
    Zitat

    Original von Alina
    Ja, die leiben Passwörter.

    Für Männer gibt es ja Uhren mit Minidatenbanken, aber leider nicht für Frauen. Mit so einer Minidatenbank könnte man die Passworter immer schön am Handgelenk tragen.

    Manno, wieso sind die Männer bevorteilt? :rofl:

    HI,

    :D dafür gibt es doch USB-Sticks am Schlüsselbund.

    So long,

    Mega

  • vom englischen Forum

    • Xenobiologist
    • 10. Mai 2007 um 17:42

    Hi,

    ja könnte ich, aber wozu?

    So long,

    Mega

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™