Sandro Alvares Posted January 24, 2010 Share Posted January 24, 2010 (edited) @dmob: Here is a short example to control the download-manager. To try this script, you must download a file and pause the download. If you run it, it shows you the number of downloads, the size of the first download and resumes the first download. For the resume I've used the resumeDownload()-function from the downloads.js. #region Includes #include <FF.au3> #endregion Includes $Socket = _FFConnect() If $Socket > -1 Then _FFOpenURL($Socket,"chrome://mozapps/content/downloads/downloads.xul") ; number of downloads $iDownloads = _FFSetGet($Socket,'var FF_dV = content.document.getElementById("downloadView");FF_dV.itemCount;') MsgBox(64,"Number of Downloads",$iDownloads) If $iDownloads > 0 Then ; Download ID, first download $iDownloadID = _FFSetGet($Socket,'FF_dV.getItemAtIndex(0).getAttribute("dlid");') MsgBox(64,"Download-ID, first download",$iDownloadID) ; maxBytes, first download $iDownloadBytes = _FFSetGet($Socket,'FF_dV.getItemAtIndex(0).getAttribute("maxBytes");') MsgBox(64,"maxBytes / size, first download",$iDownloadBytes) ; restarting first download ; https://developer.mozilla.org/en/NsIDownloadManager _FFSetGet($Socket,'Components.classes["@mozilla.org/download-manager;1"].getService(Components.interfaces.nsIDownloadManager).resumeDownload(' & $iDownloadID &');') EndIf EndIf</div> [EDIT] Additional attributs for a download are: [codebox]target uri target referrer path dlid file uri state startTime endTime currBytes maxBytes referrer progress type id image lastSeconds dateTime dateTimeTip status statusTip path alternate selected current</div> @fspafford: At first you must "enter" the frame with your button: _FFFrameEnter() is this a button to submit a form or an other one? Or you can generate a command with this program: http://thorsten-willert.de/Themen/AutoIt-F...lyzer/index.php It's forum is block: #633222 Look my log error: >"C:\Arquivos de programas\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "D:\_AutoIT3\AutoDownload5.au3" _FFConnect: OS: WIN_XP WIN32_NT 2600 Service Pack 3 _FFConnect: AutoIt: 3.3.4.0 _FFConnect: FF.au3: 0.6.0.0b-5 _FFConnect: IP: 127.0.0.1 _FFConnect: Port: 4242 _FFConnect: Delay: 2ms _FFConnect: Socket: 1648 __FFSend: try{window.content.top.document.browserDOMWindow}catch(e){'_FFCmd_Err';}; __FFRecv: __FFSend: try{navigator.userAgent}catch(e){'_FFCmd_Err';}; __FFRecv: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2) Gecko/20100115 Firefox/3.6 _FFConnect: Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.9.2) Gecko/20100115 Firefox/3.6 __FFSendJavascripts: Sending functions to FireFox .......... done _FFOpenURL ==> Invalid data type: (URL) $sURL: http://1 D:\_AutoIT3\AutoDownload5.au3 (17) : ==> Unknown function name.: $iDownloads = _FFSetGet($Socket,'var FF_dV = content.document.getElementById("downloadView");FF_dV.itemCount;') $iDownloads = ^ ERROR >Exit code: 1 Time: 1.621 Why?! i no understand... FFSetGet not exist? Please me help!! I need monitor my browser firefox for when have download list ty Edited January 24, 2010 by Sandro Alvares Programmer PHP, ASP, CGI, Perl, Delphi, JScript, ......... :) Link to comment Share on other sites More sharing options...
TheSaint Posted January 25, 2010 Share Posted January 25, 2010 It's forum is block:#633222And the reason for that is given in the last post.Where it also states the relevant portion is relocated here.Now I haven't gone right thru any of the posts to see how they all tie together, but with this other post as well, it seems that you've just made things worse, by adding yet another one with this topic.Hopefully Stilgar or Volly will sort this out, as I realize 'English' for you is not a strong point? Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) 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