Automatic thunder download file (vbs script) Call thunder API

Source: Internet
Author: User

This article writes that searching for multiple versions of N still cannot solve my problem. Many vbs versions call thunder in the following ways:

Set thunderagent = Createobject ("thunderagent. agent.1 ") <br/> // find the agent DLL <br/> call thunderagent. addtask ("http://www.hxit.net/files/bjhyn.mp3", "Welcome to Beijing", "C:/a/", "", "http://www.readlog.cn", 5) <br/> // create a download task <br/> call thunderagent. committasks (1) <br/> // submit a task request <br/> call thunderagent. addtask ("http://file.fzone.cn/upload2/hompyFile/2007/28/921524670987.wma", "Star .wma", "C:/A/B/C/", "", "http://www.readlog.cn", 5) <br/> call thunderagent. committasks (1) <br/> set thunderagent =

Here we will introduce the addtask function. The first parameter of this function is the URL to be downloaded, the second parameter is the file name to be saved, the third parameter is the Save path, the fourth parameter is the Reference URL, and the fifth parameter is, -1 (1 indicates immediate download, 0 indicates manual download, and-1 indicates default download. However, you must see the pop-up box and click it manually .); The fifth is whether to only download from the original address 0 is not, 1 is yes, and the sixth is the number of download threads.

Save this code as *. vbs. Then, choose "Thunder"> "advanced"> "use thunder download" from the shortcut menu of "ie. If version 5.9 is used, you can remove monitoring ie from monitoring. In this way, I tested Xunlei 5.9 without any problems. However, once you run this operation, a dialog box will pop up and you must click "OK" to download it. My need is to remove this confirmation. After searching for a long time, the problem persists. In desperation, I encountered luck.

1. Download a version 5.1.4.174 thunder.

2.search for geturl.htm from the thunder installation directory. If you find it, you will know what to do.

3. Write the following script *. vbs. Use your own URL here.

Set thunderapi = Createobject ("xunleibho. catchrightclick.1 ") <br/> downloadinfo = "# * 01 # *" + "http://blog.csdn.net/cctt_1" + "# * 02 # *" + "" + "# * 03 # *" + "hello.mp3" + "# * 04 # * thunder_backwnd # * 05 # *" <br/> retvalue = thunderapi. sendurl (downloadinfo) <br/> set thunderapi = nothing

Here the first # * 01 # * is followed by the URL to be downloaded, # * 02 # * is followed by the referenced URL, and the third is the comment content. The fourth is background download (no need to change ).

4. Start thunder and double-click the vbs file.

However, the above method has a defect, that is, the file cannot be downloaded to the directory you want to save. It can only be saved to the default file directory. To use version 5.1.4.174 to save it to the directory you want to save. Call a method similar to the first script. But make some changes. The script is as follows:

Set thunderagent = Createobject ("thunderagent. agent.1 ") <br/> call thunderagent. addtask ("http://blog.csdn.net/cctt_1", "My URL", "C:/a/", "", "", 5) <br/> call thunderagent. committasks () <br/> call thunderagent. addtask ("http://blog.csdn.net/cctt_1/archive/2009/05/06/4153465.aspx", "my blog", "C:/A/B/C/", "", "", 5) <br/> call thunderagent. committasks () <br/> set thunderagent = nothing <br/>

Here we can see committasks instead of committasks2 ()

Are there any better ways to call thunder? Which box does not pop up, but can be saved to the corresponding address? Thank you first.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.