Herb191 Posted May 12, 2011 Share Posted May 12, 2011 This function runs fine on one computer running XP and just returns a an empty array when I run it on a computer running windows 7 64 bit. Does anyone have any ideas on why and how I can make it work? I am guessing it’s a security issue with IE but I assumed that if I used #RequireAdmin it would work fine. Apparently not! lol #RequireAdmin #include <IE.au3> #include <Array.au3> $links = google_seach("test") _ArrayDisplay($links) Func google_seach($kw_to_search_for) Dim $array_of_links[1] ConsoleWrite(" Waiting for Google to load..." & @CRLF) $oIE = _IECreate("http://www.google.com", 0, 1) ConsoleWrite("Submiting Google seach for " & '"' & $kw_to_search_for & '"' & @CRLF) $oForm = _IEFormGetObjByName($oIE, "f") $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, $kw_to_search_for) ;enters the KW's that will be searched _IEFormSubmit($oForm) $oLinks = _IELinkGetCollection($oIE) If IsObj($oLinks) Then ;will attempt to run if $oLinks is an obj For $oLink In $oLinks $sLinkText = _IEPropertyGet($oLink, "innerText") _arrayadd($array_of_links, $sLinkText) ConsoleWrite($sLinkText & @CRLF) Next EndIf Return $array_of_links EndFunc Link to comment Share on other sites More sharing options...
wakillon Posted May 12, 2011 Share Posted May 12, 2011 (edited) Windows 7 64 bit and IE9 ? -Support- Edited May 12, 2011 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Herb191 Posted May 12, 2011 Author Share Posted May 12, 2011 Windows 7 64 bit and IE9 ? -Support-Yes that is correct. Link to comment Share on other sites More sharing options...
wakillon Posted May 12, 2011 Share Posted May 12, 2011 Yes that is correct.Try IE8 compatibility Mode. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Herb191 Posted May 12, 2011 Author Share Posted May 12, 2011 No luck with compatibility view. Link to comment Share on other sites More sharing options...
Herb191 Posted May 14, 2011 Author Share Posted May 14, 2011 (edited) Ok well its not a Windows 64 bit thing I just got done installing Windows 7 32 bit on the same computer and I have the same problem. I have the exact same version installed on another computer and it works fine. The only deference is that the computer that it is not working on is installed on a clients computer in the UK. I would think that IE and Google would work the same there though... Edited May 14, 2011 by Herb191 Link to comment Share on other sites More sharing options...
Rogue5099 Posted May 14, 2011 Share Posted May 14, 2011 Windows 7 Ultimate 64-bit IE9 Script works fine for me... My projects: Inventory / Mp3 Inventory, Computer Stats Link to comment Share on other sites More sharing options...
Herb191 Posted May 16, 2011 Author Share Posted May 16, 2011 Bump… Anyone else have a possible solution? Link to comment Share on other sites More sharing options...
DaleHohm Posted May 16, 2011 Share Posted May 16, 2011 I'm afraid there is a problem with AutoIt and IE9. The ObjName function is returning null for some objects instead of the object type. IE.au3 makes extensive use of ObjName. A bug report has been filed, but I don't believe there has been any work on it. One person has reporterd luck with putting the page in compatability mode. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
Herb191 Posted May 17, 2011 Author Share Posted May 17, 2011 Thanks Dale, Downgrading to IE 8 fixed the problem. 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