Tellblom Posted February 14, 2010 Posted February 14, 2010 I Use this code when getting a html page to the local disk Local $hDownload = InetGet("http://www.mywebpage.com/search.asp?q=" & $PartNumber, @ScriptDir & "\temp.dat", 1, 1) Do Sleep(250) Until InetGetInfo($hDownload, 2) ; Check if the download is complete. InetClose($hDownload) When I later on tries to read from the temp.dat file It does not work. $file1 = FileOpen(@ScriptDir+"\temp.dat", 0) $line2 = FileReadLine($file1,1) MemoWrite( "WebLine=" & $line2) get no error, $file1 returns a filehandenumber but $line2 is blank If I manually copy the file to a different file the problem persists. If I open the file in Notepad and copy the text and the paste it in another file then I can get a value to $line2 What have I done wrong?
Developers Jos Posted February 14, 2010 Developers Posted February 14, 2010 What is the content of the file that is downloaded? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Beege Posted February 14, 2010 Posted February 14, 2010 Did you really use that "+" in this line? $file1 = FileOpen(@ScriptDir+"\temp.dat", 0) Also did you try to do any error checking when reading the line? Something like.. $line2 = FileReadLine($file1,1) If @error then memowrite(@error) Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
Tellblom Posted February 14, 2010 Author Posted February 14, 2010 The context of the file is HTML codes And thanx Beege it was a typo It all works with '&' instead og the '+' Thanx alot
Beege Posted February 14, 2010 Posted February 14, 2010 The context of the file is HTML codesAnd thanx Beege it was a typo It all works with '&' instead og the '+'Thanx alotGlad I could help. Also, if your not already using Scite, you should. SyntaxCheck(ctrl+F5) under tools will catch almost all syntax errors like that one. Assembly Code: fasmg . fasm . BmpSearch . Au3 Syntax Highlighter . Bounce Multithreading Example . IDispatchASMUDFs: Explorer Frame . ITaskBarList . Scrolling Line Graph . Tray Icon Bar Graph . Explorer Listview . Wiimote . WinSnap . Flicker Free Labels . iTunesPrograms: Ftp Explorer . Snipster . Network Meter . Resistance Calculator
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