Damein Posted December 1, 2010 Share Posted December 1, 2010 (edited) When I use the following code I get weird symbol's in my message box, shown below.Image of MsgBox:Here is the code.#include <array.au3> #include <file.au3> Global $aFile, $aLinks Global $IniFilePath, $sSource, $sLink Global $n = 0 $IniFilePath = "Names.ini" $sSource = BinaryToString(InetRead("http://www.oneplace.com/ministries/paws-and-tales/listen/broadcast-archives.html")) $aLinks = StringRegExp($sSource,'(?i)(?s)<a class="EpisodeLink" href="(.*?)">(.*?)</a>',3) If Not IsArray($aLinks) Then MsgBox(0,"error","No links found!") Exit EndIf FileDelete($IniFilePath) Global $aLinkTitles[UBound($aLinks)/2][2] ;this is still a good way to create an array is big enough, althoug probably too big if you skip double links. For $i = 0 To UBound($aLinks) -1 Step 2 $sSource2 = BinaryToString(InetRead($aLinks[$i])) $aLinks2 = StringRegExp($sSource2,'(?i)(?s)<div class="EpisodeDescription">(.*?)</div>',3) for $j = 0 to UBound($aLinks2) - 1 $aLinkTitle = StringRegExpReplace($aLinks[$i+1],"(?i)(?:Episode #\d+: ){0,1}(.*?)(?:â€.*){0,1}","$1") MSgBox(0, "Test", "Episode Name: " & $aLinkTitle & @CRLF & "Episode Info: " & $aLinks2[$j]) Next NextI tried doing a simple StringReplace.. but to no avail Thanks a lot.*** EDIT ***I did it using multiple string replaces Thanks. Edited December 2, 2010 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Tvern Posted December 2, 2010 Share Posted December 2, 2010 Try setting BinaryToString to UTF8 like this: $sSource2 = BinaryToString(InetRead($aLinks[$i]),4) Link to comment Share on other sites More sharing options...
Damein Posted December 2, 2010 Author Share Posted December 2, 2010 (edited) That fixed it up, much quicker and cleaner Thanks Edited December 2, 2010 by Damein Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now