Zywl Posted June 1, 2010 Share Posted June 1, 2010 I tried to hide the download window that Internet Explorer shows when you click on a download link, something like this:#include <IE.au3> _IELoadWait($oIE) _IELinkGetCollection ($oIE, 0) ; Get links. _IELinkClickByIndex($oIE, 2) ; Click on the second link. ;. ;. A piece of code that sets the path and clicks on "Download" goes here. ;. WinWait("[CLASS:#32770]");<---- This is the Download Window WinSetState("[CLASS:#32770]", "", @SW_HIDE)The problem is, the download window does not hide fast enough to be totally invisible to the user, it just pops up for like 2 seconds before hiding.Is there a way to hide it faster or make it invisible from the beggining or something like that? Link to comment Share on other sites More sharing options...
jfcby Posted June 1, 2010 Share Posted June 1, 2010 You could set window to transparent. WinSetTrans("[CLASS:#32770]", "", 0) ;Invisible jfcby Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB **** Link to comment Share on other sites More sharing options...
Zywl Posted June 2, 2010 Author Share Posted June 2, 2010 (edited) You could set window to transparent. WinSetTrans("[CLASS:#32770]", "", 0) ;Invisible jfcby I have tried that line "WinSetTrans("[CLASS:#32770]", "", 0) after the code i have, it's now something like this: WinWait("[CLASS:#32770]") WinSetTrans("[CLASS:#32770]", "", 0) ;Invisible But the problem persists, the download window pops up and becomes invisible when the window is fully loaded after 1,2 or 3 seconds; i suspect that AutoIt is unable to hide that window properly. Edited June 2, 2010 by Zywl Link to comment Share on other sites More sharing options...
Juvigy Posted June 2, 2010 Share Posted June 2, 2010 How did you create the window ? _IECreate? It has a visibility switch. Link to comment Share on other sites More sharing options...
Zywl Posted June 2, 2010 Author Share Posted June 2, 2010 (edited) Yes, i'm using _IECreate, at the beggining of the script i create a new IE window to start browsing. $site="www.something.com" ;Website to navigate . . $oIE = _IECreate($site,0,0) ;Run IE Hidden. . . ;A bunch of code here navigates the website. . . _IELoadWait($oIE) ;Here i wait the page to be fully loaded, Example: http://www.something.com/pages/pageN.aspx _IELinkGetCollection ($oIE, 0) ;Get the links of the site. _IELinkClickByIndex($oIE, 2) ;Click the second link of the collection. ; After _IELinkClickByIndex simulates a click on the link, the download windows i want to hide appears, but they are not initially hidden. ; Then i use WinSetTrans("Window Title", "", 0) or WinSetState("Window Title", "", @SW_HIDE) WinWait("File Download") WinSetState("File Download", "", @SW_HIDE) ControlSend("File Download","","","s") WinWait("Save As") WinSetState("Save As", "", @SW_HIDE) ControlClick("Save As","","Button2"); Click "Save" WinWait("[CLASS:#32770]") WinSetTrans("[CLASS:#32770]", "", 0) ;This window does not hide fast enough, here is my problem =( Edited June 2, 2010 by Zywl Link to comment Share on other sites More sharing options...
AnselRoe Posted July 24, 2010 Share Posted July 24, 2010 I am having exactly the same issue. The only solution that I see is to move the 'File Download' and 'Save As' dialog windows off the screen boundaries. This should keep it from appearing on the visible window area. But I am not sure what command(s) would effect this. Windows is setting the screen position of the 'File Download' and 'Save As' dialog windows. This may entail a reg patch to change the default window position and a re-Patch to return to defaults. Any help in this matter will be appreciated. Thanks. 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