Jump to content

Search the Community

Showing results for tags 'parsing'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 5 results

  1. Hello, I'm programming an automated email and have a line that is really long. I am using SciTE as my console. Here is that line in test. $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $aArray2[$i][3], $Subject, "This is a form letter meant for " & $aArray2[$i][1] &" "& $aArray2[$i][2]&"." & @CRLF & "The letters in "& $aArray2[$i][1] &" "& $aArray2[$i][2] & "'s first name are " &  $aArray2[$i][4] &" " & $aArray2[$i][5] &" "&$aArray2[$i][6] &" "& $aArray2[$i][7] &" "&$aArray2[$i][8] &" "& $aArray2[$i][9] & @CRLF & chr(13) & "Thank you." & chr(13) & " ", $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)  The body of the email that the $rc function is creating begins after $Subject and ends after chr(13) & " ",. That body is the primary cause of the length. When this goes live, I can easily see adding 3000+ characters to this line. Is there a line limit? Is there a way to wrap text in SciTE? Do you have a trick to break that line up into multiple lines for ease of coding and reading? "Ideally I would like to be able to type text like this " & @CRLF & "so that I could read what I am writing easily " & @CRLF & "without having to keep scrolling to the right or " & @CRLF & "to the left.  Scrolling is quite a pain in the neck " & @CRLF & "and with 5000 characters, it might even become  " & @CRLF & "a programming showstopper." I am not able to pass this entire string as a variable because this string contains variables embedded in a for loop. Thus, in so doing, I would multiplicate the loop. I'll take any help I can get!
  2. I have a XML file that i need assistance in parsing. Below is a snipping from the XML File: <Tasks> <Task> <BeginDate>2015/08/15 01:27:45,4375 (0)</BeginDate> <MangaName>Kono S o, Mi yo! (Kono S o, Mi yo! 1 --&gt; Kono S o, Mi yo! 155 - Just the Two of Them [End])</MangaName> <Website>MangaHere</Website> <SaveTo>F:\Manga\Kono S o, Mi yo!</SaveTo> <Status>Completed</Status> <Percent>100</Percent> <State>Stopped</State> <Queue>0</Queue> <Chapters /> </Task> <Task> <BeginDate>2015/08/15 01:28:49,9415 (0)</BeginDate> <MangaName>Tate no Yuusha no Nariagari (Tate no Yuusha no Nariagari 1 - A Royal Summoning --&gt; Tate no Yuusha no Nariagari 16 - The Third Wave of Calamity)</MangaName> <Website>MangaHere</Website> <SaveTo>F:\Manga\Tate no Yuusha no Nariagari</SaveTo> <Status>Completed</Status> <Percent>100</Percent> <State>Stopped</State> <Queue>0</Queue> <Chapters /> </Task> </Tasks> I have tried a couple of different ways but i haven't had any luck so far. I have messed with XML parsing with Rainmeter and Crystal Reports but im having difficulty with Auto-it. I need to parse the nodes <MangaName> and <Website> to a 2D Array with the <MangaName> as the first column and <Website> is the second column. Attached is the full XML File. Tasks.xml
  3. I'm doing parsing of HTML file with <table>. I need to go through rows and columns of table, ideally to get two dimensional array. I use this way with simple two levels of calling StrinRegExp() for rows and columns: ;~ $html = FileRead('table.html') $html = '<tr><td>r1c1</td> <td>r1c2</td></tr> <tr><td>r2c1</td> <td>r2c2</td></tr> <tr><td>r3c1</td> <td>r3c2</td></tr>' $rows = StringRegExp($html, '(?s)(?i)<tr>(.*?)</tr>', 3) For $i = 0 to UBound($rows) - 1 $row = $rows[$i] ConsoleWrite("Row " & $i & ': ' & $row & @CRLF) $cols = StringRegExp($row, '(?s)(?i)<td>(.*?)</td>', 3) For $j = 0 to UBound($cols) - 1 $col = $cols[$j] ConsoleWrite(" Col " & $j & ': ' & $col & @CRLF) Next Next Output: In my example there is called StringRegExp() for each row of table which is ineffective for many rows. It works fine, but my question is if there is better and more effective approach, maybe some clever the only one RegExp pattern? Or maybe using StringRegExp with option=4? I 'm not experienced with this option (array in array) and example in helpfile is not very clear to me so I don't know if this option=4 can be used also for HTML table parsing.
  4. Hi there everyone, I have a text file that looks something like the following: Administrator Guest Matt jaes james jas jasdfs jasds js Matthew pjaasddasdfs pjaasdds pjads pjdfs Notice the odd formatting; there are not always a consistant amount of spaces between terms, I'm looking for a way to break up this text file into the individual terms (in this case user accounts), and not include the spaces. Any ideas? Thanks for any advice! Matt
  5. Why will this not work? I have spent a few hours on this one little problem. I have tried everything I can think of to make it work, but never wants too. I have tested the pattern in a few other scripts and it works fine. the @ERROR says it is a bad string - but how can String($HTML) be bad? Is it to much text for it to string? $IE = _IECreate("C:\Users\Ned\Dropbox\Public\Findings.html", "", 0) $HTML = _IEBodyReadHTML($IE) _IEQuit($IE) $HTML = String($HTML) $array = StringRegExp($HTML, '(?<=\QNew: <a href="/items/view/\E)(.*?)(?=\Q">\E)', 3) ;gets new item numbers _ArrayDisplay($array)
×
×
  • Create New...