Fetzia Posted April 1, 2010 Posted April 1, 2010 Hi guys, In all of my scripts there is a bug in "_InetGetSource". For Example: #include <INet.au3> msgbox(0,"",_INetGetSource("www.autoitscript.com")) gives an empty msgbox ... How can I fix this problem???
GEOSoft Posted April 1, 2010 Posted April 1, 2010 I could be wrong but I seem to recall that _InetGetSource() required a fully quallified url. http://www.autoitscript.com Just checking the help file, the parameters table doesn't show it that way but the example does. You could also replace _InetGetSource with BinaryToString() andInetRead() which also requires the fully qualified path. MsgBox(0, "", BinaryToString(InetRead("http://autoitscript.com"))) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
BrettF Posted April 1, 2010 Posted April 1, 2010 I could be wrong but I seem to recall that _InetGetSource() required a fully quallified url. http://www.autoitscript.comJust checking the help file, the parameters table doesn't show it that way but the example does.You could also replace _InetGetSource with BinaryToString() andInetRead() which also requires the fully qualified path.MsgBox(0, "", BinaryToString(InetRead("http://autoitscript.com")))IMO the $s_URL parameter is misleading as it is so it should be updated to reflect this... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 Thanks GEOSoft you were right...But whats about https sites?? Everytime I try to get the sourcecode of an https site it's empty. But if I open the site in FireFox I can get the sourcecode.
GEOSoft Posted April 1, 2010 Posted April 1, 2010 Thanks GEOSoft you were right...But whats about https sites?? Everytime I try to get the sourcecode of an https site it's empty. But if I open the site in FireFox I can get the sourcecode.I don't recall ever using _InetGetSource() or InetRead() on an https site so I can't help you there. Perhaps someone else will come along with that answer. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted April 1, 2010 Posted April 1, 2010 IMO the $s_URL parameter is misleading as it is so it should be updated to reflect this...I fixed the docs and I'll submit it this morning. It seems to me there might already be a report open on this issue, but now it's done. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 I also tried it like you said...For example MsgBox(0, "", BinaryToString(INetRead('https://addons.mozilla.org/de/firefox/addon/3829'))) It gives an empty msgbox...How do you recall those sites?
GEOSoft Posted April 1, 2010 Posted April 1, 2010 I also tried it like you said...For example MsgBox(0, "", BinaryToString(INetRead('https://addons.mozilla.org/de/firefox/addon/3829'))) It gives an empty msgbox...How do you recall those sites? I'm just trying to get ready to go out but now that you have provided the link I'll do some testing when I return. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
GEOSoft Posted April 1, 2010 Posted April 1, 2010 I just took a quick test becuase I have another person asking about https pages as well. This worked for me $sUrl = "https://addons.mozilla.org/de/firefox/addon/3829" $sSource = InetRead($sUrl) $sSource = BinaryToString($sSource) ClipPut($sSource) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!"
jchd Posted April 1, 2010 Posted April 1, 2010 That's working fine here: Local $b = INetRead('https://addons.mozilla.org/de/firefox/addon/3829') ConsoleWrite(@error & @LF) ; gives 0 ConsoleWrite(BinaryToString($b) & @LF) and displays the page's source (shortened here): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" dir="ltr" class="html-ltr firefox"> <head> <title>Live HTTP Headers :: Firefox Add-ons</title> <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <meta name="MSSmartTagsPreventParsing" content="true"/> <meta name="keywords" content="add-ons,addons,erweiterungen,themes,firefox,thunderbird,sunbird,seamonkey,fennec,plugins,personalisieren,mozilla,browser"/> <meta name="description" content="Personalisieren Sie Firefox, Thunderbird und andere Mozilla-Produkte mit tausenden von kostenlosen Erweiterungen und Themes."/> <meta name="Copyright" content="Creative Commons Attribution Share-Alike Lizenz v3.0, außer wenn anderweitig angegeben."/> <meta http-equiv="imagetoolbar" content="no"/> <meta name="Rating" content="General"/> <link rel="search" type="application/opensearchdescription+xml" title="Mozilla Add-ons" href="/AMOSearch.xml" /> ... This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 Very strange neither jchd's nor GEOSoft's script worked for me... Now I'm going crazy :-D. I tried the scripts in Windows XP mode (my OS is win 7 x64) and ALL of them work in XP mode, but not in Win7...But a few days ago everything was fine..can you help me?
jchd Posted April 1, 2010 Posted April 1, 2010 Are you sure to run the latest release? You say it doesn't work only when compiled for x64, or is it run with X64 AutoIt? Strange, but I don't have x64 handy here so I'm afraid I can't help much. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 I'm sure to run the latest version. I deinstalled and installed autoit and scite again...but nothing changed. I compile the script in x86 mode, but it only works in XP-mode ... and not in Win7...You know?
jchd Posted April 1, 2010 Posted April 1, 2010 I'll try to get confirmation that it's a bug and open a ticket for this, and / or find a workaround. Please be a little patient. A possible workaround would be to use _IE (from the IE.au3 UDF) instead and get source from there. Again I can't try on x64 myself. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 Thanks jchd and GEOSoft. I solved the problem on my own. A friend of mine entered a proxy in the Internet Explorer. So ALL functions used with the IE couldn't work right.
jchd Posted April 1, 2010 Posted April 1, 2010 Ha, a cheap proxy, of course. Reading your posts again I realize you said to have it working "by hand" in Firefox and I took this to mean it also applied to IE. Cheers This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Fetzia Posted April 1, 2010 Author Posted April 1, 2010 (edited) Yeah but now it's solved thank you Edited April 1, 2010 by Fetzia
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