Jester009 Posted September 10, 2008 Share Posted September 10, 2008 Hi guys, I'm trying to click on the download now link in the following page. http://www.download.com/AVG-Anti-Virus/3000-2239_4-10385707.html?tag=mncol;rbxcrdl1 I tried to use _IELinkClickByText and _IETagNameGetCollection but none seem to be working. $oIE = _IEAttach("AVG") $oPaths = _IETagNameGetCollection ($oIE, "A") For $oPath In $oPaths If StringInStr($oPath.className, "dlNowIcon", 1) > 0 Then _IEAction($oPath, "click") EndIf Next Can any of you explain why this does not prompt me the file download dialog box? Thanks in advance. Jester009 Link to comment Share on other sites More sharing options...
DaleHohm Posted September 10, 2008 Share Posted September 10, 2008 Any messages to the SciTe console? Does it ever execute your _IEAction? (use consolewrite, msgbox or SciTe debug mode to see what gets run). 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...
Jester009 Posted September 10, 2008 Author Share Posted September 10, 2008 Hi Dale thanks a lot for replying. Yeah, It performs the _IEAction. The page redirects to the landing page. But I do not get the File Download dialog box. But when I click manually, I get the dialog box Link to comment Share on other sites More sharing options...
DaleHohm Posted September 10, 2008 Share Posted September 10, 2008 I would first wonder if you are clicking on the correct link. Many objects can hve the same className. suggest you: For $oPath In $oPaths ConsoleWrite($oPath.className & @CR) Next to verify 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...
Jester009 Posted September 10, 2008 Author Share Posted September 10, 2008 Hi Dale, I have gone through the page source. Only the download link has the className "dlNowIcon" I tried click the "DIV" surrounding the link as well. But that does not even give me the landing page. Thanks Link to comment Share on other sites More sharing options...
DaleHohm Posted September 10, 2008 Share Posted September 10, 2008 Don't know how you got the page source and it is easy to be fooled by dynamically generated HTML. Please run the code snippet I supplied. 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...
Jester009 Posted September 10, 2008 Author Share Posted September 10, 2008 (edited) ok sir. I tried the snippet you provided me. This is the result. expandcollapse popup0 0 0 0 0 0 dlNowIcon 0 toolTipElement 0 dlnl edRate5 userRate3h userRateInline 0 addtowatch toolTipElement 0 0 0 0 0 0 0 0 0 0 0 0 0 readMore 0 0 0 0 0 0 userRate3h userStars userRate0 flexButton readMore 0 userRateSm1 0 0 submitHelpful submitHelpful report toolTipElement email toolTipElement permalink toolTipElement reply userRateSm3 0 0 submitHelpful submitHelpful report toolTipElement email toolTipElement permalink toolTipElement reply userRateSm1 0 0 submitHelpful submitHelpful report toolTipElement email toolTipElement permalink toolTipElement reply userRateSm4 0 0 submitHelpful submitHelpful report toolTipElement email toolTipElement permalink toolTipElement reply userRateSm5 0 0 submitHelpful submitHelpful report toolTipElement email toolTipElement permalink toolTipElement reply readMore flexButton close closeSticky closeSticky flexButton submitButton 0 userStars userRate0 0 flexButton submitButton 0 flexButton submitButton 0 flexButton submitButton 0 0 flexButton submitButton 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 logOut rblogo siteId4logo siteLogo 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 I used the debubbar in your sig to check the source Edited September 10, 2008 by Jester009 Link to comment Share on other sites More sharing options...
DaleHohm Posted September 10, 2008 Share Posted September 10, 2008 Thanks. Ok, better test... $oIE = _IEAttach("AVG") $oPaths = _IETagNameGetCollection ($oIE, "A") For $oPath In $oPaths If StringInStr($oPath.className, "dlNowIcon", 1) > 0 Then ConsoleWrite(_IEPropertyGet($oPath, "outerhtml") & @CR) _IEAction($oPath, "click") EndIf Next 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...
Jester009 Posted September 10, 2008 Author Share Posted September 10, 2008 Done. This the output... <A class=dlNowIcon onclick="return RBDL.downloadNow('http://software-files.download.com/sd/0WdQUaMn4rp-3n3zurK4tTsmVsKw7nQzaEfygYA9mdiYlCjOpvU-f70jAKpcTBNfOg7MCOnkObomRa4QVp2qwLmkqiq2DQlt/software/10824764/10385707/3/avg_avwt_stf_all_8_87a1276_cnet.exe?lop=btn&ptype=1900&ontid=2239&siteId=4&edId=3&spi=f03a831723c9e0122722ce634e4c898e&pid=10824764&psid=10385707', 'http://dw.com.com/redir?edId=3&siteId=4&oId=3000-2239_4-10385707&ontId=2239_4&spi=f03a831723c9e0122722ce634e4c898e&lop=btn&tag=tdw_dlicon&ltype=dl_dlnow&pid=10824764&mfgId=6270610&merId=6270610&pguid=wgPtjQoPjF0AAH8PLTMAAACk&destUrl=http%3A%2F%2Fwww.download.com%2F3001-2239_4-10824764.html', '0')" href="http://dw.com.com/redir?edId=3&siteId=4&oId=3000-2239_4-10385707&ontId=2239_4&spi=f03a831723c9e0122722ce634e4c898e&lop=btn&tag=tdw_dlicon&ltype=dl_dlnow&pid=10824764&mfgId=6270610&merId=6270610&pguid=wgPtjQoPjF0AAH8PLTMAAACk&destUrl=http%3A%2F%2Fwww.download.com%2F3001-2239_4-10824764.html%3Fspi%3Df03a831723c9e0122722ce634e4c898e"><IMG src="http://i.i.com.com/cnwk.1d/i/tron/download/dlNowGrn.gif"></A> Link to comment Share on other sites More sharing options...
DaleHohm Posted September 10, 2008 Share Posted September 10, 2008 Popup-blocker. On my machine it is activated when doing a scripted click, but not with the mouse. Try disabling (I had more than one) and try again. 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...
Jester009 Posted September 11, 2008 Author Share Posted September 11, 2008 Hi Dale, It's already turned off... Any idea?? Link to comment Share on other sites More sharing options...
DaleHohm Posted September 11, 2008 Share Posted September 11, 2008 OK, not a popup blocker, but your friendly IE Information Bar.After the pop-up blocker was disabled, I managed to catch the small popup window that appears and read the info in the info bar. It was truncated, but I got enough of it. It said: "to help protect your security, internet explorer has restricted this site from sh..."In the IE helpfile you'll find a section called "Understanding the Internet Explorer Information bar". In here you'll find (formatting lost):Can I turn off the Information bar?Yes, you can, but we don't recommend it. If you do want to turn it off, you have to turn it off for each type of message.To turn off Information bar messages about blocked pop-up windowsOpen Internet Explorer. Click the Tools button, click Pop-up Blocker, and then click Pop-up Blocker Settings. Clear the Show Information Bar when a pop-up is blocked check box, and then click Close. To stop the Information bar from blocking file and software downloadsOpen Internet Explorer. Click the Tools button, and then click Internet Options. Click the Security tab, and then click Custom level. Do one or both of the following: To turn off the Information bar for file downloads, scroll to the Downloads section of the list, and then, under Automatic prompting for file downloads, click Enable. To turn off the Information bar for ActiveX controls, scroll to the ActiveX controls and plug-ins section of the list, and then, under Automatic prompting for ActiveX controls, click Enable. Click OK, click Yes to confirm that you want to make the change, and then click OK again.Once I enabled "Automatic prompting for file downloads", things worked as they would with a mouse click.If you cannot or do not want to change this security setting, you may want to use the standard AutoIt MouseClick() instead. The the example for _IEPropertyGet to find the screen coordinates, height and width of the link so that you can click in the middle of it.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...
Jester009 Posted September 11, 2008 Author Share Posted September 11, 2008 WOW. Dale you are the man. It works. I can't remember how many hours I wasted on this. Thanks a million. Link to comment Share on other sites More sharing options...
philphil61 Posted October 21, 2011 Share Posted October 21, 2011 Hi,, I know this is an old topic but I've searched and tried different methods including here. I'm a noob, a novice with scripting - I'm trying honest! My script - why I want to create it? becoz I maintain several pc's from friends/acquaitances and always use the same software to install for checking updates, cleaning and defragging... Filehippo Update Checker, CNET TechTracker and Secunia PSI to check all updates (each miss certain programs so I install and run all) then CCleaner, Wise Registry and Disk Cleaner then MyDefrag. What I want it to do? check if installed, if not installed download and install then run.... simple? yes I got as far as Filehippo's UpdateChecker tested and working but it's the same problem as above ... with download.com - I can't find the right "function/instruction" to get the mouse to click the green "dlNowIcon" button Is this _IETagNameGetCollection browser specific? if so how can i make this work on default browser? If it's not browser specific - all I need is the code to find "dlNowIcon" and click it........ but nothing seems to work (I use chrome as default browser but even trying IE9 as default - still nothing) if FileExists(@AppDataDir & "\CBS Interactive\CNET TechTracker\TechTracker.exe") Then Run(@AppDataDir & "\CBS Interactive\CNET TechTracker\TechTracker.exe") Else Run("http://www.cnet.com/techtracker-free/") WinWaitActive("CNET TechTracker - the easiest way to keep software up-to-date") then i'm lost?? 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