Datei mit Array aufbereiten

  • Hallo zusammen,

    ich bin neu hier und habe erst 2 - 3 kleine sachen mit AutoIt dank der ausgezeichneten Unterstützung hier im Forum gemacht.
    Ich habe hier schon so einiges gefunden was mir weitergeholfen hat,
    dafür schonmal ein riesen dankeschön.


    Und jetzt komme ich doch nicht mehr weiter und denke mir kann recht
    schnell geholfen werden.

    ich habe eine Datei mit ganz vielen eMail-Adressen, jede eMail steht in einer
    neuen Zeilen, es gibt auch Leerzeilen zwischendrin oder eMails sind
    mehrfach vorhanden.

    aber alle Versuche die doppelt und dreifachen Einträge oder die Leeren
    Einträge zu löschen will mir einfach nicht gelingen.

    Ich lese die Datei in ein Array und lasse das durch eine Schleife laufen,
    einmal mit:

    $x = 0
    for $element in $aFileArray
    if $element = ""
    _ArrayDelete($aFileArray,$x)
    usw.
    oder mit
    For $x = 0 to $aFileArray[0]
    if $aFileArray[$x] = ""
    _ArrayDelete($aFileArray,$x)
    usw.

    mir ist klar, das wenn Array[0] gelöscht wird, Array[1] zu Array[0] wird
    und das bleibt dann stehen weil mit next ja das nächste genommen wird.
    Das gleiche Problem hab ich natürlich mit den mehrfach vorhanden Einträge.
    Ich könnte mir vorstellen, das wenn ein Element im Array gelöscht wurde
    ich die die Schleife wieder von vorne beginnen lassen muß.

    Ich hoffe ihr könnt aus dem wirrwar was ich hier zurechtgetippt habe erkennen wo mein Problem liegt.

  • Eine zugegebenermaßen nicht sehr elegante aber dafür vielleicht einfachere Variante:

    [autoit]

    #include <File.au3>

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

    Global $Input

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

    _FileReadToArray("Mails.txt", $Input)

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

    If Not @error Then
    For $i = 1 To UBound($Input) - 1
    If StringRegExp($Input[$i], "^\S+@\S+\.[a-z|A-Z]{2,4}$",0) Then
    IniWrite(@TempDir & "\mailstemp.ini", "mails", $Input[$i], '')
    EndIf
    Next

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

    $iniinput = IniReadSection(@TempDir & "\mailstemp.ini", "mails")

    If Not @error Then

    $File = FileOpen("Mails.txt", 2)

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

    For $r = 1 To UBound($iniinput,1) - 1
    FileWriteLine($File, $iniinput[$r][0])
    Next

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

    FileClose($File)
    EndIf
    FileDelete(@TempDir & "\mailstemp.ini")
    EndIf

    [/autoit]

    Was wird gemacht?:

    Die Ausgangsdatei wird in ein Array eingelesen (_FileReadToArray()).
    Dann wird Zeilenweise vorgegangen (For $i = 1 To UBound($Input) - 1).
    Es wird jedesmal gecheckt ob die Zeile in der Form einer Mail-Adresse entspricht (mit StringRegExp()) - damit bleiben die Leerzeilen draußen.
    Wenn die Zeile einer gültigen Mail-Addi-Form entspricht wird diese Mailadresse als Schlüsselname in eine temporäre ini Datei geschrieben (IniWrite()).
    Warum?
    In einer Ini-Sektion kann ein Schlüsselname nur einmal vorkommen - somit kicken wir die mehrfachen Einträge raus.
    Wenn alles überprüft wurde werden die Schlüsselnamen (unsere Mail-Adressen) wieder in ein Array eingelesen und nacheinander dann in die vorher gelöschte (FileOpen("Mails.txt", 2)) Ausgangsdatei eingetragen (FileWriteLine()).

    Hoffe das bringt dich ein Stück weiter.

    Einmal editiert, zuletzt von AspirinJunkie (26. Februar 2007 um 19:25)

  • ui, das ging aber schnell....

    ich habs einfach mal so genommen wie du es geschrieben hast und es macht
    genau das was ich wollte, wobei ich nicht verstehe wieso das keine elegante
    lösung ist, naja bin ja auch noch anfänger, ich finds auf jeden fall spitze.

    ich habe mir natürlich direkt die hilfe zur hand genommen und geschaut was
    du da für befehle verwendest, z.B StringRegEx kann ich da nicht finden.

    ich habe die neuste beta 3.2.1.14 und die Hilfe ist wohl von SciTE Version 1.71.


    Ich danke Dir für die schnelle hilfe !

  • StringRegExp kam erst später als Funktion dazu und ist deswegen noch nicht in der Hilfe-Datei.
    In der Online-Doku ist es aber verzeichnet: >>klickmich<<
    Für den Anfang vielleicht etwas zu mächtig.
    Prinzipiell sollte in deinem Fall auch die Abfrage
    If $Input[$i] <> "" Then
    reichen.

  • in der Hilfe steht:

    Spoiler anzeigen


    Check if a string fits a given regular expression pattern.


    StringRegExp ( "test", "pattern" [, flag ] [, offset ] ] )


    Parameters

    test The string to check
    pattern The regular expression to compare.
    flag [optional] A number to indicate how the function behaves. See below for details. The default is 0.
    offset [optional] The string position to start the match (starts at 1) The default is 1.


    Flag Values
    0 Returns 1 (matched) or 0 (no match)
    1 Return array of matches.
    2 Return array of matches including the full match (Perl / PHP style).
    3 Return array of global matches.
    4 Return an array of arrays containing global matches including the full match (Perl / PHP style).


    Return Value

    Flag = 0 :
    @Error Meaning
    2 Bad pattern. @Extended = offset of error in pattern.


    Flag = 1 or 2 :
    @Error Meaning
    0 Array is valid. Check @Extended for next offset
    1 Array is invalid. No matches.
    2 Bad pattern, array is invalid. @Extended = offset of error in pattern.


    Flag = 3 or 4 :
    @Error Meaning
    0 Array is valid.
    1 Array is invalid. No matches.
    2 Bad pattern, array is invalid. @Extended = offset of error in pattern.


    Remarks

    Regular expression notation is a compact way of specifying a pattern for strings that can be searched. Regular expressions are character strings in which plain text characters indicate what text should exist in the target string, and a some characters are given special meanings to indicate what variability is allowed in the target string. AutoIt regular expressions are normally case-sensitive.

    Regular expressions are constructed of one or more of the following simple regular expression specifiers. If the character is not in the following table, then it will match only itself.

    Repeating characters (*, +, ?, {...} ) will try to match the largest set possible, which allows the following characters to match as well, unless followed immediately by a question mark; then it will find the smallest pattern that allows the following characters to match as well.

    Nested groups are allowed, but keep in mind that all the groups, except non-capturing groups, assign to the returned array, with the outer groups assigning after the inner groups.

    Complete description can be found here

    Matching Characters

    [ ... ] Match any character in the set. e.g. [aeiou] matches any lower-case vowel. A contiguous set can be defined using a dash between the starting and ending characters. e.g. [a-z] matches any lower case character. To include a dash (-) in a set, use it as the first or last character of the set. To include a closing bracket in a set, use it as the first character of the set. e.g. [][] will match either [ or ]. Note that special characters do not retain their special meanings inside a set, with the exception of \\, \^, \-,\[ and \] match the escaped character inside a set.
    [^ ... ] Match any character not in the set. e.g. [^0-9] matches any non-digit. To include a caret (^) in a set, put it after the beginning of the set or escape it (\^).
    [:class:] Match a character in the given class of characters. Valid classes are: alpha (any alphabetic character), alnum (any alphanumeric character), lower (any lower-case letter), upper (any upper-case letter), digit (any decimal digit 0-9), xdigit (any hexadecimal digit, 0-9, A-F, a-f), space (any whitespace character), blank (only a space or tab), print (any printable character), graph (any printable character except spaces), cntrl (any control character [ascii 127 or <32]) or punct (any punctuation character)
    [^:class:] Match any character not in the class.
    ( ... ) Group. The elements in the group are treated in order and can be repeated together. e.g. (ab)+ will match "ab" or "abab", but not "aba". A group will also store the text matched for use in back-references and in the array returned by the function, depending on flag value.
    (?i) Case-insensitivity flag. This does not operate as a group. It tells the regular expression engine to do case-insensitive matching from that point on.
    (?-i) (default) Case-sensitivity flag. This does not operate as a group. It tells the regular expression engine to do case-sensitive matching from that point on.
    (?i ... ) Case-insensitive group. Behaves just like a normal group, but performs case-insensitive matches within the group.
    (?-i ... ) Case-sensitive group. Behaves just like a normal group, but performs case-sensitive matches within the group. Primarily for use after (-i) flag or inside a case-insensitive group.
    (?: ... ) Non-capturing group. Behaves just like a normal group, but does not record the matching characters in the array nor can the matched text be used for back-referencing.
    (?i: ... ) Case-insensitive non-capturing group. Behaves just like a non-capturing group, but performs case-insensitive matches within the group.
    (?-i: ... ) Case-sensitive non-capturing group. Behaves just like a non-capturing group, but performs case-sensitive matches within the group.
    (?m) ^ and $ match newlines within data.
    (?s) . matches anything including newline. (by default "." don't match newline)
    (?x) Ignore whitespace and # comments.
    (?U) Invert greediness of quantifiers.
    . Match any single character (except newline).
    | Or. The expression on one side or the other can be matched.
    \ Escape a special character (have it match the actual character) or introduce a special character type (see below).
    \\ Match an actual backslash (\).
    \1 - \9 Back-reference. Match the prior group number given exactly. For example, ([:alpha:])\1 would match a double letter.
    \a Alarm, that is, the BEL character (chr(7)).
    \A Match only at beginning of string.
    \b Matches at a word boundary.
    \B Matches when not at a word boundary.
    \c Match a control character, based on the next character. For example, \cM matches ctrl-M.
    \d Match any digit (0-9).
    \D Match any non-digit.
    \e Match an escape character (chr(27)).
    \E end case modification.
    \f Match an formfeed character (chr(12)).
    \l Match lowercase next char.
    \L Match lowercase till \E.
    \n Match a newline (@LF, chr(10)).
    \Q quote (disable) pattern metacharacters till \E.
    \r Match a carriage return (@CR, chr(13)).
    \s Match any whitespace character: Chr(9) through Chr(13) which are Horizontal Tab, Line Feed, Vertical Tab, Form Feed, and Carriage Return, and the standard space ( Chr(32) ).
    \S Match any non-whitespace character.
    \t Match a tab character (chr(9)).
    \u Match uppercase next char.
    \U Match uppercase till \E.
    \w Match any "word" character: a-z, A-Z or underscore (_).
    \W Match any non-word character.
    \0### Match the ascii character whose code is given. Can be up to 3 octal digits.
    \x## Match the ascii character whose code is given in hexadecimal. Can be up to 2 digits.
    \z Match only at end of string.
    \Z Match only at end of string, or before newline at the end.

    Repeating Characters

    {x} Repeat the previous character, set or group exactly x times.
    {x,} Repeat the previous character, set or group at least x times.
    {0,x} Repeat the previous character, set or group at most x times.
    {x, y} Repeat the previous character, set or group between x and y times, inclusive.
    * Repeat the previous character, set or group 0 or more times. Equivalent to {0,}
    + Repeat the previous character, set or group 1 or more times. Equivalent to {1,}
    ? The previous character, set or group may or may not appear. Equivalent to {0, 1}
    ? (after a repeating character) Find the smallest match instead of the largest.

    Character Classes

    [:alnum:] letters and digits
    [:alpha:] letters
    [:ascii:] character codes 0 - 127
    [:blank:] space or tab only
    [:cntrl:] control characters
    [:digit:] decimal digits (same as \d)
    [:graph:] printing characters, excluding space
    [:lower:] lower case letters
    [:print:] printing characters, including space
    [:punct:] printing characters, excluding letters and digits
    [:space:] white space (not quite the same as \s, it include VT: chr(11) )
    [:upper:] upper case letters
    [:word:] "word" characters (same as \w)
    [:xdigit:] hexadecimal digits


    Related

    StringInStr, StringRegExpReplace

    Example

    [autoit]


    ;Option 1, using offset
    $nOffset = 1
    While 1
    $array = StringRegExp('<test>a</test> <test>b</test> <test>c</Test>', '<(?i)test>(.*?)</(?i)test>', 1, $nOffset)

    If @error = 0 Then
    $nOffset = @extended
    Else
    ExitLoop
    EndIf
    for $i = 0 to UBound($array) - 1
    msgbox(0, "RegExp Test with Option 1 - " & $i, $array[$i])
    Next
    WEnd

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

    ;Option 2, single return, php/preg_match() style
    $array = StringRegExp('<test>a</test> <test>b</test> <test>c</Test>', '<(?i)test>(.*?)</(?i)test>', 2)
    for $i = 0 to UBound($array) - 1
    msgbox(0, "RegExp Test with Option 2 - " & $i, $array[$i])
    Next

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

    ;Option 3, global return, old AutoIt style
    $array = StringRegExp('<test>a</test> <test>b</test> <test>c</Test>', '<(?i)test>(.*?)</(?i)test>', 3)

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

    for $i = 0 to UBound($array) - 1
    msgbox(0, "RegExp Test with Option 3 - " & $i, $array[$i])
    Next

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

    ;Option 4, global return, php/preg_match_all() style
    $array = StringRegExp('F1oF2oF3o', '(F.o)*?', 4)

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

    for $i = 0 to UBound($array) - 1

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

    $match = $array[$i]
    for $j = 0 to UBound($match) - 1
    msgbox(0, "cRegExp Test with Option 4 - " & $i & ',' & $j, $match[$j])
    Next
    Next

    [/autoit]
  • waaaa, ich glaub das ist etwas zu mächtig für den Anfang, aber danke
    für die Beschreibung, werde da mal etwas mit üben und rumspielen.


    meine eigendliche .txt quelldatei besteht aus n Zeilen, mit viel Text
    und zwischendrin mal irgendwo ein "EMAIL: <email@post.de>", also inkl.
    "<" und ">"

    ich starte ein script welches mir nur die Zeilen mit "EMAIL:" ausliest
    If StringInStr($aArray[$x], "EMAIL")Then
    dann starte ich ein script mit einer _StringBetween Function
    _StringBetween1($aArray[$x],'<', '>')
    um nur die email adressen zu erhalten
    dann das script von Aspirin Junkie für doppelte und leere Zeilen.
    jetzt gillt es für mich das alles in ein script zu bekommen.

    Ich danke aber erstmal für die Infos und wenn ich nicht weiterkomme
    melde ich mich wieder.

  • Hallo,

    nein, die Zeilen sind alle unterschiedlich.

    Beispiel:

    "Name:" <Müller, Petra> "Tel:" <> "EMAIL:" <müller@mail.de>
    kjlrsngfvlknxvnvnkjnvjnvjnsdjvnjnvjnbvjknbvjkn
    lkvnlkn langer text irgendetwas
    lkvmlkmvldmvmv

    "Name:" <> "Tel:" <> "EMAIL:" <>
    "Name:" <> "Tel:" <> <123456gd7890$abcde@hgdkkez.fhje>
    kkjvdkj langer text irgendetwas
    "Name:" <> "Tel:" <0123-412556> "EMAIL:" <mail@xyz.de>

    so ungefähr sieht das aus, und ich möchte nur die <echte_email@post.de>
    haben, ich sehe da ein problem mit dem <123456gd7890$abcde@hgdkkez.fhje>, was das ist weiß ich nicht, da steht
    aber auch kein "EMAIL:" davor.

    • Offizieller Beitrag

    Hi,

    Spoiler anzeigen
    [autoit]

    #include <File.au3>
    #include <String.au3>

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

    Global $Input
    Global $filePath = "emails.txt"

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

    _FileReadToArray($filePath, $Input)

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

    If Not @error Then
    Local $email
    For $i = 1 To UBound($Input) - 1
    ;$Input[$i] = StringRegExpReplace($Input[$i], "[<>]", '')
    ;If StringRegExp($Input[$i], "^\S+@\S+\.[a-z|A-Z]{2,4}$", 0) Then
    $email = _StringBetween($Input[$i], '"EMAIL:" <', '>')
    If Not @error And $email[0] <> '' Then
    IniWrite(@TempDir & "\mailstemp.ini", "mails", $email[0], '')
    EndIf
    Next
    $iniinput = IniReadSection(@TempDir & "\mailstemp.ini", "mails")
    If Not @error Then
    $File = FileOpen($filePath, 2)
    For $r = 1 To UBound($iniinput, 1) - 1
    FileWriteLine($File, $iniinput[$r][0])
    Next
    FileClose($File)
    EndIf
    FileDelete(@TempDir & "\mailstemp.ini")
    EndIf

    [/autoit]

    So long,

    Mega

  • das sieht ja eigendlich ziemlich einfach aus wenn man weiß wie es geht,
    irgendwann kann ich vieleicht auch mal sowas aus dem ärmel schütteln.


    leider bekomme ich einen fehler:

    (15) : ==> Subscript used with non-Array variable.:

    und in zeile 15 steht: If Not @error And $email[0] <> '' Then

    mir ist nicht klar warum das immer $email[0] ist bei jedem schleifendurchgang
    mit $email[$i] das gleiche ergebnis, nehme ich aber nur $email wird auch
    etwas verarbeitet aber das ergebnis sieht aus wie einfach nur durcheinandergewürfelter buchstaben und zwischendrin mal die emails, ebenso in der mailstemp.ini

    • Offizieller Beitrag

    HI,

    ich bin davon ausgegangen, dass in einer Zeile immer nur einmal oder kein mal EMAIL :<...> vorkommt.

    Am einfachsten wäre es, wenn du mal die ersten 20 Zeilen deiner Datei anonymisierst und in einer Spoiler postest, dann kann man es besser testen.

    Ich hatte es mit folgender Datei getestet:

    Spoiler anzeigen

    "Name:" <Müller, Petra> "Tel:" <> "EMAIL:" <müller@mail.de>
    kjlrsngfvlknxvnvnkjnvjnvjnsdjvnjnvjnbvjknbvjkn
    lkvnlkn langer text irgendetwas
    lkvmlkmvldmvmv

    "Name:" <> "Tel:" <> "EMAIL:" <>
    "Name:" <> "Tel:" <> <123456gd7890$abcde@hgdkkez.fhje>
    kkjvdkj langer text irgendetwas
    "Name:" <> "Tel:" <0123-412556> "EMAIL:" <mail@xyz.de>

    "Name:" <Müller, Petra> "Tel:" <> "EMAIL:" <müller@mail.de>
    kjlrsngfvlknxvnvnkjnvjnvjnsdjvnjnvjnbvjknbvjkn
    lkvnlkn langer text irgendetwas
    lkvmlkmvldmvmv

    "Name:" <> "Tel:" <> "EMAIL:" <>
    "Name:" <> "Tel:" <> <123456gd7890$abcde@hgdkkez.fhje>
    kkjvdkj langer text irgendetwas
    "Name:" <> "Tel:" <0123-412556> "EMAIL:" <mail@xyz.de>
    "Name:" <Müller, Petra> "Tel:" <> "EMAIL:" <müller@mail.de>
    kjlrsngfvlknxvnvnkjnvjnvjnsdjvnjnvjnbvjknbvjkn
    lkvnlkn langer text irgendetwas
    lkvmlkmvldmvmv

    "Name:" <> "Tel:" <> "EMAIL:" <>
    "Name:" <> "Tel:" <> <123456gd7890$abcde@hgdkkez.fhje>
    kkjvdkj langer text irgendetwas
    "Name:" <> "Tel:" <0123-412556> "EMAIL:" <mail@xyz.de>
    "Name:" <Müller, Petra> "Tel:" <> "EMAIL:" <müller@mail.de>
    kjlrsngfvlknxvnvnkjnvjnvjnsdjvnjnvjnbvjknbvjkn
    lkvnlkn langer text irgendetwas
    lkvmlkmvldmvmv

    "Name:" <> "Tel:" <> "EMAIL:" <>
    "Name:" <> "Tel:" <> <123456gd7890$abcde@hgdkkez.fhje>
    kkjvdkj langer text irgendetwas
    "Name:" <> "Tel:" <0123-412556> "EMAIL:" <mail@xyz.de>

    So long,

    Mega

  • mh, bei mir läufts nicht

    hier ein paar zeilen aus denen ich ich die email adressen haben möchte

    Spoiler anzeigen


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag)
    "TEL:" <xxxx-xxxx> (52232)
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx@post.de>
    Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: Hauptstrasse_&_[54] / [12345] / IRGENDWO


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag) "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx@post.de> Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: [12345] / IRGENDWO

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral>
    (kein Eintrag)
    "TEL:" <> ()
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx@post.de>

    "DATUM:" Mon, 26 Feb 2007 16:14 =-=

    • Offizieller Beitrag

    Hi,

    ich habe es jetzt mit dieser Datei laufenlassen:

    Spoiler anzeigen

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag)
    "TEL:" <xxxx-xxxx> (52232)
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx1@post.de>
    Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: Hauptstrasse_&_[54] / [12345] / IRGENDWO


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag) "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx2@post.de> Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: [12345] / IRGENDWO

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral>
    (kein Eintrag)
    "TEL:" <> ()
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx3@post.de>

    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag)
    "TEL:" <xxxx-xxxx> (52232)
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx1@post.de>
    Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: Hauptstrasse_&_[54] / [12345] / IRGENDWO


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag) "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx2@post.de> Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: [12345] / IRGENDWO

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral>
    (kein Eintrag)
    "TEL:" <> ()
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx3@post.de>

    "DATUM:" Mon, 26 Feb 2007 16:14 =-=

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag)
    "TEL:" <xxxx-xxxx> (52232)
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx1@post.de>
    Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: Hauptstrasse_&_[54] / [12345] / IRGENDWO


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag) "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx2@post.de> Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: [12345] / IRGENDWO

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral>
    (kein Eintrag)
    "TEL:" <> ()
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx3@post.de>

    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag)
    "TEL:" <xxxx-xxxx> (52232)
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx4@post.de>
    Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: Hauptstrasse_&_[54] / [12345] / IRGENDWO


    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral> (kein Eintrag) "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx2@post.de> Produced By xxxxxxxxxxxxxxx
    "DATUM:" Mon, 26 Feb 2007 16:14 =-=
    Strasse/PLZ/ORT: [12345] / IRGENDWO

    "ID:" <b1fc0$650aa8c0@52232>
    "Result:" <neutral>
    (kein Eintrag)
    "TEL:" <> ()
    "NAME:" <Name, Vorname>
    Object: x43
    "ID:" <b1fc0$650aa8c0@52232>
    "EMAIL:" <xxxx3@post.de>

    "DATUM:" Mon, 26 Feb 2007 16:14 =-=

    Ergebnis ist:

    Spoiler anzeigen

    Ist das nicht richtig?

    So long,

    Mega

  • doch, eigendlich genau das...

    ich habe nochmal deinen codeabschnitt kopiert und deinen letzten spoiler
    als datei genommen,

    ich erhalte weiterhin den fehler:
    (15) : ==> Subscript used with non-Array variable.:
    If Not @error And $email[0] <> '' Then
    If Not @error And $email^ ERROR

    in zeile 15 steht:
    If Not @error And $email[0] <> '' Then


    kann das evtl an der _StringBetween liegen ???

    Spoiler anzeigen


    Func _StringBetween($s_String, $s_Start = 0, $s_End = 0)
    $s_Start = StringInStr($s_String, $s_Start) + StringLen($s_Start)
    Return StringMid($s_String, $s_Start, StringInStr($s_String, $s_End) - $s_Start)
    EndFunc

  • mh, ich habe die version 3.2.1.14, die hab ich erst vor 2 tagen installiert,

    und unter programme\autoit\beta mache ich dann toggle AU3 beta,
    es erscheint kurz ein fenster "using beta 3.2.1.14"

    wenn ich die function rausnehme kommt folgende fehlermeldung:

    ERROR: _StringBetween(): undefined function.

    ich glaub irgendetwas stinkt ganz gewalltig bei mir auf dem rechner ????