raca Posted November 23, 2006 Posted November 23, 2006 First the code $ad_file = @UserProfileDir & "\Application Data\Microsoft\Internet Explorer\Desktop.htt" ; ad_file = active desktop file If Not FileExists($ad_file) Then MsgBox(16,"Error","Active desktop file doesn't exist") EndIf $ad_file_handler = FileOpen($ad_file,0) If $ad_file_handler = -1 Then MsgBox(16, "Error", "Unable to open active desktop file.") EndIf dim $eof_flag = False Do $line = FileReadLine($ad_file_handler) ;$line = FileRead($ad_backup_file_handler, 10) if @error = -1 Then $eof_flag = True Else MsgBox(0,"Readed",$line) EndIf Until Not $eof_flag Expected behaviour: to show the file contents in a msgbox, the same text like i see them when i open the file with wordpad Real behabiour: It's just show's this: "ÿþ<" (with no quotes) The same happen with FileRead and FileReadLine
jpm Posted November 23, 2006 Posted November 23, 2006 .htt file is not a plain text file so you need to extraxt the text befor building the text rhat you can use in the MsgBox NOBUG PS You should have post first in the "Help & Support" Forum
raca Posted November 23, 2006 Author Posted November 23, 2006 (edited) Sorry... i knocked my head so much with this.. i thought it was an error I see the problem now, only know i when to check the encodding on the file, normal editors don't even show that detail. Anyway, autoit only reads text files. Isn't a way of read the file contents with autoit? Edited November 23, 2006 by raca
jpm Posted November 23, 2006 Posted November 23, 2006 Sorry... i knocked my head so much with this.. i thought it was an errorI see the problem now, only know i when to check the encodding on the file, normal editors don't even show that detail.Anyway, autoit only reads text files. Isn't a way of read the file contents with autoit?In Fact if you use FileRead you will get the entire file if you want (see doc) but in your case the problem is to extract from this file/string the text info which are specific of the .htt file
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