jcpb72 Posted June 6, 2007 Share Posted June 6, 2007 (edited) Hi there Guys, Just new to AutoIt, would like to thank the people who tirelessly contributed to the project, for putting together such a great tool. I've seen mentioned the use of _IEAttach and _IENavigate made, in regards to IE7 and Tabs that are generated from a IE7 broswer. "The Script" - opens IE7 on "it.seek.com.au" > Help Desk/Support > Melbourne, then it begins to open each job in it's own new Tab (20 Tabs all up) My problem is that the script runs fine, upto the point where _IEImgClick looks for the "ApplyNowButton" to apply for jobs. I guess the broswer didn't propergate the Object Reference ($oIE =), not sure if that's the word I should be using, through to the Opened Tabs. I've attached a sample of the script so far, which i guess will better explain..... CODE ; Set Windows Title to Match "ANY" AutoItSetOption("WinTitleMatchMode", 2) ; Includes AutoIT IE Commands File #include <IE.au3> ; Launch IE-SeekIT _IECreate ("it.seek.com.au", 0, 1, 1, 0) ; Set "OBJECT" Reference $oIE = _IEAttach ("it.seek.com.au/", "url") ; Maximize "IE 7" Window WinSetState("SEEK IT", "", @SW_MAXIMIZE ) ; Select "Job Search" _IELinkClickByText ($oIE, "Job Search") ; Select "Help Desk/Support" _IELinkClickByText ($oIE, "Help Desk/Support") ; Select "Melbourne jobs" _IELinkClickByText ($oIE, "Melbourne") ; Go to Top of Page Send ("{HOME}") ; 4000mS Pause before moving to the Next Phase Sleep (4000) ; Select Tabbing Positon MouseClick("left", 380, 414) ; Select Job 1 Send ("{TAB 4}^{ENTER}") ; Do While Loop $i = 0 While $i <= 18 ; 2000mS Pause before moving to the Next Phase Sleep (2000) ; Select Next Job Send ("{TAB 4}^{ENTER}") ; 2000mS Pause before moving to the Next Phase Sleep (2000) $i = $i + 1 WEnd ; 2000mS Pause before moving to the Next Phase Sleep (2000) ;~ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Job Application Phase 2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Do While Loop $i = 0 While $i <= 18 ; Select Next Tab $oIE = Send ("^{TAB}") ; 2000mS Pause before moving to the Next Phase Sleep (2000) ; Go to Bottom of Page Send ("{END}") ; Click "Apply Button" _IEImgClick ($oIE, "Apply to this job", "alt") ; 2000mS Pause before moving to the Next Phase Sleep (2000) $i = $i + 1 WEnd ; 2000mS Pause before moving to the Next Phase Sleep (2000) Many Thanks in Advance Jean-Claude Edited June 6, 2007 by jcpb72 Link to comment Share on other sites More sharing options...
lod3n Posted June 6, 2007 Share Posted June 6, 2007 Try this: #include <IE.au3> $oIE = _IECreate ("it.seek.com.au", 0, 1, 1, 0) $hwnd = _IEPropertyGet ($oIE, "hwnd" ) WinSetState($hwnd, "", @SW_MAXIMIZE ) [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
jcpb72 Posted June 7, 2007 Author Share Posted June 7, 2007 (edited) Try this: #include <IE.au3> $oIE = _IECreate ("it.seek.com.au", 0, 1, 1, 0) $hwnd = _IEPropertyGet ($oIE, "hwnd" ) WinSetState($hwnd, "", @SW_MAXIMIZE ) Thanks for your Fast reply.....and advice..........the error message I'm getting from the above code is: --> IE.au3 Error from function _IEImgClick, $_IEStatus_InvalidDataType --> IE.au3 Error from function _IEImgClick, $_IEStatus_InvalidDataType --> IE.au3 Error from function _IEImgClick, $_IEStatus_InvalidDataType When I pick a individual job from SeekIT, and paste the job web address, (before my SeekIT Session timesout) into the following code example it works: CODE ; AutoIt Code Example ; ******************************************************* ; Example 1 - Click on IMG by Alt text ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("SEEKIT JOB ADDRESS.com.au", 0, 1, 1, 0) _IEImgClick ($oIE, "Apply to this job", "alt") See DaleHohm remarks on "IE7 Tab Examples:" From Dale's Comments........ The only explanation, I have is the Object Reference ($oIE) is pointing to the first page/instance opened in IE7. All the _IE commands of AutoIt work fine on that first page, the moment you open a new Tab/Tabs. The new Tab loses the ($oIE) Reference point of the original page, _IEAttach in URL Mode will do the job, I guess...... Seeing how the domain name remains the same ("it.seek.com.au") in the Original page as well as the New Tabs. Is there a _IEAttach URL - "Wildcard" Mode? E.G. $oIE = _IEAttach ("it.seek.com.au/*", "url") Is there such a thing? Once again......Many Thanks...... Jean-Claude Edited June 7, 2007 by jcpb72 Link to comment Share on other sites More sharing options...
lod3n Posted June 7, 2007 Share Posted June 7, 2007 I don't know. I don't think there's a tried and true standard way of attaching to the other tabs. You're forging ahead into the wilderness with this one. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
jcpb72 Posted June 8, 2007 Author Share Posted June 8, 2007 I don't know. I don't think there's a tried and true standard way of attaching to the other tabs. You're forging ahead into the wilderness with this one. Originally I used to do this manually, using Firefox, a better browser by far, than the IE7 "KnockOff", but because AutoIt supports IE7 automation, well that explains that.And I know I'm in "the wilderness with this one", it sure feels like it, I could always rewrite the script to work in single browser mode, but that would be going backwards, not forwards.CODE;~ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Job Application Phase 2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Do While Loop$i = 0While $i <= 0; Select Next TabSend ("^{TAB}")WinSetTitle("http://it.seek.com.au/users", "", "SEEK IT"); Set "OBJECT" Reference $sIE = _IEAttach ("SEEK IT", "WindowTitle"); 2000mS Pause before moving to the Next PhaseSleep (2000); Go to Bottom of PageSend ("{END}"); Click "Apply Button"_IEImgClick ($sIE, "Apply to this job", "alt"); 2000mS Pause before moving to the Next PhaseSleep (2000)$i = $i + 1WEnd; 2000mS Pause before moving to the Next PhaseSleep (2000)I tried the above as a experiment, in the "Job Application Phase" of the script, to rename the Browser window from the web address of the job to SEEK IT and then _IEAttach to SEEK IT, here is the Mod: WinSetTitle("http://it.seek.com.au/users", "", "SEEK IT") ; Set "OBJECT" Reference $sIE = _IEAttach ("SEEK IT", "WindowTitle")But no luck, which is great, because it confirms an idea, in your original post we tried the "Hwnd" thing, which as I understand relies on the "Window/Browser id".What was tried above relies on the "Window/Browser Title", do you see where I'm going with this, maybe the efforts should concentrate on:1) The renaming of the Tabs to SEEK IT, then _IEAttach ("SEEK IT", "WindowTitle")or 2) Generating Multiple Object References for each of the Tabs E.G. TAB2=$sIE2, TAB3=$sIE3, TAB4=$SIE4........Well hopefully I'll have some better News for you Guys.J-C Link to comment Share on other sites More sharing options...
jcpb72 Posted June 9, 2007 Author Share Posted June 9, 2007 OK, after Spending Hours Testing, I'm sure it's all been said before, I'm not a programmer, so hopefully, I'll use simple language.Here's what I've found:When you look at all the Basic Examples of the _IE Commands, when you break it down, there 's only 3 main items for a Command to "Execute":1) The _IE Commands File = #include <IE.au3>2) Creation of the Browser with it's Reference point = E.G. $oIE = _IECreate , $oIE = _IE_Example or $oIE = _IECreateEmbedded3) The Command, which in my case was = _IEImgClick When the Browser is first created in most cases $oIE points to the 1st Tab of that Browser, once you start creating other Tabs, that link to $oIE is lost, Microsoft explains it as a "Security Feature".So why not just Reconnect the Link, you can using _IEAttach, but what happens is all the Hyperlinks, Images, Objects, Address, Elements of Tab1 are now super imposed onto Tab2, so what does that mean.Say on Tab2 you want to click on a link titled "Apply Now", you keep getting a $_IEStatus_InvalidDataType, or $_IEStatus_NoMatch Error, this error is coming up because Tab1 has no "Apply Now" link on the page, even though Tab2 has.Well why not just create a new Refer Point E.G. $oIE2 or $sIE, well with out a command that copies the _IECreate, but for Tabs like _IECreateInTab, or _IEOpenInTab, as an example, your commands just hang in mid-air, unable to be processed.And if you try to tie it back to the Old Refer Point $oIE, your back to square 1 with the $_IEStatus_InvalidDataType, or $_IEStatus_NoMatch Error.Well looks like I've hit a brick wall, unless anyone knows how to click on a "Apply Now" button that changes location on different web pages in Tabs.Hope you have Better Luck.J-C Link to comment Share on other sites More sharing options...
DaleHohm Posted June 12, 2007 Share Posted June 12, 2007 It looks to me that quotes you attribute to me above are either taken out of context or are inaccurate... It includes some of the remarks I made about why the enhanced version of _IENavigate (undocumented, but included in IE.au3 as __IENavigate) is not included in the official release. When you use the enhanced tab features of __IENavigate (which uses the .Navigate2 method) a new tab is opened, but we cannot directly get an object reference to it. You should be able to use _IEAttach to get a reference to it however. Please look at the many ways you can use _IEAttach to get a browser reference... title and url are only two of many. Please note that windowtitle is the overall browser window title. Title is the document title (look at the page source for the <title></title> tag. 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...
jcpb72 Posted June 17, 2007 Author Share Posted June 17, 2007 It looks to me that quotes you attribute to me above are either taken out of context or are inaccurate...DaleI Apologize for the above, I didn't mean to take your quotes out of context or to be inaccurate...You have put out a great product, I'm just new to it still feeling my way around, please excuse me for my mistake.I tried the IE7 Tabs example, which works great, and have looked into the other methods of _IEAttachThanks for pointerCODE; IE7 Tabs Example#include <IE.au3>$oIE = _IECreate()__IENavigate($oIE, "www.autoitscript.com", 1, 2048) ; opens in a new tab__IENavigate($oIE, "www.autoitscript.com", 1, 4096) ; opens in a new background tabJust a quick question in regards to __IENavigate.....If you had a Website such as www.seekit.com.auWhat method would you open the job descriptions into individual background Tabs, if the addresses kept changing E.G.Job 1 = http://it.seek.com.au/users/apply/index.as...p;JobID=9666097 Job 2 = http://it.seek.com.au/users/apply/index.as...p;JobID=9647790 Job 3 = http://it.seek.com.au/users/apply/index.as...p;JobID=9611037 Job 4 = http://it.seek.com.au/users/apply/index.as...p;JobID=9569302Many Thanks for the pointersJohn. (J-C) Link to comment Share on other sites More sharing options...
DaleHohm Posted June 17, 2007 Share Posted June 17, 2007 Is your question really about using the __IENavigate method for this or how to get the URL to use in the operation? Assuming the later, you can use _IELinkGetCollection and then loop through the items looking at the .href property to see if it contains the "index.ascx?JobID=" string -- then use the matching .href value. 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...
Richard Robertson Posted June 17, 2007 Share Posted June 17, 2007 IE7 is the worst browser ever. All Microsoft did was bring Vista level security to a ripoff of Firefox. Just downgrade and you will have no problems anymore. Link to comment Share on other sites More sharing options...
DaleHohm Posted June 18, 2007 Share Posted June 18, 2007 IE7 is the worst browser ever. All Microsoft did was bring Vista level security to a ripoff of Firefox. Just downgrade and you will have no problems anymore.What you say could be true - I don't happen to believe it, but I don't think it matters. Dropping in comments like this on a thread you are obviously not adding any value to is simply distracting at best. There are lots of forums on the internet where you can make comments like this and immediately turn the thread into a Microsoft bashing session with all of the folks who jump in to cheer you on -- this is fortunately not one of those forums.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...
jcpb72 Posted June 19, 2007 Author Share Posted June 19, 2007 (edited) What you say could be true - I don't happen to believe it, but I don't think it matters. Dropping in comments like this on a thread you are obviously not adding any value to is simply distracting at best. There are lots of forums on the internet where you can make comments like this and immediately turn the thread into a Microsoft bashing session with all of the folks who jump in to cheer you on -- this is fortunately not one of those forums. Dale Thank you Dale for taking the time to reply to Mr Icekirby's comments for me, as I guess your a busy man. In my earlier posts, I explained why I was using IE7, "Originally I used to do this manually, using Firefox" Well that's enough of the distractions, back to the Topic, for the Benefit of the others. In my earlier post, the "Original Script Version" would simply send {TAB} keystrokes to hi-light the job links and open the links into new Background Tabs by the {CRTL} + {ENTER} Key Stroke Method, or ("^{ENTER}") - See Below E.G. ; Select Next Job Send ("{TAB 4}^{ENTER}")oÝ÷ Ùhbr¥ +ç_w®Ø¥"wuçm¢ëjëh×6; Click "Apply Button" _IEImgClick ($oIE, "Apply to this job", "alt") Which was the reason, this whole Topic was started in the first Place, just to get _IEImgClick to work on a newly created Tab ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Not to sound like a broken record, the Object Refer, was not passed onto the Newly Created Tabs, so from my understanding, none of the _IE commands would work.....Unless you _IEAttach Hence you _IEAttach to the "Original Object Refer" ($oIE) from the "Original Page" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lets call "Original Page with ($oIE Refer)" = Page1 "Newly Opened Tab from a Hi-Lighted Link on Page1 by the {CRTL} + {ENTER} Key Stroke Method" = Page2 _IEAttach would Attach ALL the References of Page1 to Page2, even the Links. So what looks like a separate individual Page2 opened from a Page1 link, is really a Page1 Clone. The only reason, why I'm restating all this is not to Insult or Offend anyone, it's just to point out what to expect, after all the hours spent on testing various "workarounds" to try and solve this IE7 Tab Issue. The only Ray of Hope was provide by Dale: "you can use _IELinkGetCollection and then loop through the items looking at the .href property to see if it contains the "index.ascx?JobID=" string -- then use the matching .href value." I'm with you Dale, on this one, using _IELinkGetCollection to scan the links on Page1, then output the addresses to __IENavigate($oIE, "JobLinks.href", 1, 4096) then _IEAttach the page. Is that the general direction your pointing to ????? Once Again......Many Thanks John. Edited June 19, 2007 by jcpb72 Link to comment Share on other sites More sharing options...
DaleHohm Posted June 19, 2007 Share Posted June 19, 2007 I'm with you Dale, on this one, using _IELinkGetCollection to scan the links on Page1, then output the addresses to __IENavigate($oIE, "JobLinks.href", 1, 4096) then _IEAttach the page.Is that the general direction your pointing to ?????Exactly.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...
PsaltyDS Posted June 19, 2007 Share Posted June 19, 2007 Once Again......Many ThanksJohn. Could you please try out the code and autoit tags on the forum editor. Your posts would be much easier to follow.Thanks. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
jcpb72 Posted June 21, 2007 Author Share Posted June 21, 2007 (edited) Hi There Guys, I Knocked up a quick example of something along the lines of what Dale was Suggesting...... CODE#include <IE.au3> $oIE = _IECreate () ; Don't know if this should be Here, or further down the Script????? _IEAttach ("about:blank", "url" ) ; Main Index Page __IENavigate($oIE, "http://www.tomshardware.com/", 1, 4096) ; open in a new tab ; Tabs __IENavigate($oIE, "http://www.tomshardware.com/cpu/index.html", 1, 4096) ; open in a new background tab __IENavigate($oIE, "http://www.tomshardware.com/motherboard/index.html", 1, 4096) ; opens in a new background tab __IENavigate($oIE, "http://www.tomshardware.com/graphics/index.html", 1, 4096) ; opens in a new background tab ; Massive Pause to Let Tabs Load Sleep(40000) ; A _IE "TEST" Command to Test the _IEAttached Tab _IELinkClickByIndex ($oIE, 10) If you copy & paste the above into SciTE4AutoIt3, and hit the F8 to get the Output Window, run the Script, once the Script finish Execution. I get the following Error Message on the _IE "TEST" Command: --> IE.au3 Warning from function _IELinkClickByIndex, $_IEStatus_NoMatch This can only mean the _IEAttach failed on the TAB Where and how would you guys attach the Site??? Any Suggestions E.G. Activate Tab1 > _IEAttach ("SEEK IT", "WindowTitle") > Activate Next Tab > _IEAttach ("SEEK IT", "WindowTitle") Many Thanks.... John Edited June 21, 2007 by jcpb72 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted June 21, 2007 Moderators Share Posted June 21, 2007 If you copy & paste the above into SciTE4AutoIt3, and hit the F8 to get the Output Window, run the Script, once the Script finish Execution.If you use AutoIt Menu you can highlight the code and use:Alt-Insert - Edit w/SciTEAlt-F5 - Run w/SciTE Link to comment Share on other sites More sharing options...
DaleHohm Posted June 21, 2007 Share Posted June 21, 2007 _IEAttach will really do nothing for you unless you capture it's return value... it is the browser reference to the match it found. So, to get a reference to the first tab you created and click a link in it, you need to: $oIE-cpu = _IEAttach("http://www.tomshardware.com/cpu/index.html", "url") _IELinkClickByIndex ($oIE-cpu, 10) Make sense? 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...
jcpb72 Posted June 25, 2007 Author Share Posted June 25, 2007 _IEAttach will really do nothing for you unless you capture it's return value... it is the browser reference to the match it found. So, to get a reference to the first tab you created and click a link in it, you need to: $oIE-cpu = _IEAttach("http://www.tomshardware.com/cpu/index.html", "url") _IELinkClickByIndex ($oIE-cpu, 10) Make sense? Dale Here is the new Additions: CODE#include <IE.au3> $oIE = _IECreate ("www.google.com.au") ; Tab1 - Open in a new Foreground (Active) tab __IENavigate($oIE, "http://www.tomshardware.com/cpu/index.html",1, 2048) ; _IEAttach Tab1, Don't know if this should be Here, or further down the Script????? $oIE_cpu = _IEAttach("http://www.tomshardware.com/cpu/index.html", "url") ; Massive Pause to Let Tab1 Load Sleep(20000) ; A _IE "TEST" Command to Test the _IEAttach Tab1, Output should be Tab1 Links $oLinks = _IELinkGetCollection ($oIE_cpu ) $iNumLinks = @extended MsgBox(0, "Link Info", $iNumLinks & " links found") For $oLink In $oLinks MsgBox(0, "Link Info", $oLink.href) Next Here is the Output from the script --> IE.au3 Warning from function __IENavigate, Unsupported function called. Not fully tested. --> IE.au3 Warning from function _IEAttach, $_IEStatus_NoMatch --> IE.au3 Error from function _IELinkGetCollection, $_IEStatus_InvalidDataType C:\Documents and Settings\John\Desktop\Test.au3 (17) : ==> Variable must be of type "Object".: For $oLink In $oLinks For $oLink In $oLinks^ ERROR Sorry Guys, am I using the _IEAttach command properly? ; _IEAttach Tab1, Don't know if this should be Here, or further down the Script????? $oIE_cpu = _IEAttach("http://www.tomshardware.com/cpu/index.html", "url") Cause when I change it to: ; _IEAttach Tab1, Don't know if this should be Here, or further down the Script????? $oIE_cpu = _IEAttach("www.google.com.au", "url") It works, but returns the Links for google Once again...... Many Thanks.. John. Link to comment Share on other sites More sharing options...
A. Percy Posted June 25, 2007 Share Posted June 25, 2007 Modifying your script: #include <IE.au3> $o_IE = _IECreate ( "www.google.com&quoÈ BÈXHHÜ[[H]ÈÜYÜÝ[ XÝ]JHXÌÍÕTH ][ÝÝÝÝË2æ÷&rgV÷C°¥õôTæfvFRb33c¶õôRÂgV÷C¶GG¢òògV÷C²fײb33cµU$ÂfµÀìÅÕ½Ðì¼ÅÕ½Ðì°Ä°ÈÀÐà¤((ì}%ÑÑ QÄ°½¸Ìäíй½Ü¥Ñ¡¥ÌÍ¡½Õd be Here, or further down the Script????? Sleep( 1000 ) $o_IE_w3 = _IEAttach( $URL, "url" ) ; AÒQH ][ÝÕTÕ ][ÝÈÛÛ[X[ÈÝHÒQP]XÚXKÝ]]ÚÝ[H#Ææ·0¥6÷tÆÄÆæ·2b33c¶õôU÷s2 ¥6÷tÆÄÆæ·2b33c¶õôR ¤gVæ2¡½Ý±±1¥¹Ì ÀÌØí½}%¤(%%%Í=¨ ÀÌØí½}%¤Q¡¸($%}%1½]¥Ð ÀÌØo_IE ) Local $o_Links = _IELinkGetCollection ( $o_IE ) Local ÌÍÚS[S[ÜÈHVSQBRYÜH[BBSÙÐÞ ][ÝÓ[È[fògV÷C²Âb33c¶çVÔÆæ·2fײgV÷C²Ææ·2f÷VæBgV÷C² Æö6Âb33c´Æ1¥¹ÌôÅÕ½ÐìÅÕ½Ðì($$%%%Í=¨ ÀÌØí½}1¥¹Ì¤Q¡¸($$$%½ÈÀÌØí½}1¥¹¬In $o_Links $AllLinks &= $o_Link.href & @CRLF BBS^BBQ[YBBSÙÐÞ ][ÝÑÝ[[ÜÉ][ÝË ÌÍÐ[[ÜÈ BBQæD` VæD`¤VæDgVæ0 Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator VW Bug user Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
DaleHohm Posted June 25, 2007 Share Posted June 25, 2007 It's a timing issue. This variation will reattempt the attach until it works then uses a load wait, the rest should be fine: 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...
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