我想添加一些IDM链接。任何人都可以给我一个伪代码。 或指向解释如何操作的页面的链接。
答案 0 :(得分:1)
您可以通过将“-d”参数传递给IDMan.exe
来添加指向IDM的链接在您的程序或脚本中,(您可以使用 ShellExecute 或您使用的任何语言的等效文件),调用 [IDM安装路径] \ IDMan。 exe -d [link]
[IDM安装路径] :安装idm的目录
(例如,C:\ Program Files \ Internet Download Manager)
[link] :您要添加到IDM的网址
答案 1 :(得分:0)
为此,IDM应该支持这种东西,因为我知道这是不可能的,但如果你发现任何库或RPC方式将数据发送到IDM,那么是的!
答案 2 :(得分:0)
您可以使用以下参数从命令行启动IDM
import networkx as nx
G = nx.Graph()
G.add_edge(1,2,weight=3)
G.add_edge(1,3,weight = 5)
node = 1
weight3_neighbors = [neighbor for neighbor in G.neighbors_iter(node) if G.edge[node][neighbor]['weight']==3]
weight3_neighbors
> [2]
或idman /s
<强>参数:强>
/ d网址 - 下载文件
e.g。 IDMan.exe / d&#34; internetdownloadmanager.com/path/FileName.zip"
/ s - 在调度程序中启动队列
/ p local_path - 定义保存文件的本地路径
/ f local_file_name - 定义保存文件的本地文件名
/ q - IDM将在成功下载后退出。此参数仅适用于第一个副本
/ h - 成功下载后,IDM会挂断您的连接
/ n - 当IDM没有提出任何问题时,打开静音模式
/ a - 添加用/ d指定的文件下载队列,但不要开始下载
参数 / a,/ h,/ n,/ q,/ f local_file_name,/ p local_path 仅在您使用 / d URL 指定要下载的文件时才有效
<强>实施例强>
C:&gt; idman.exe / n / d tonec.com/download/idman317.exe
更多信息请访问:https://www.internetdownloadmanager.com/support/command_line.html
答案 3 :(得分:0)
我知道这是一个老问题,但我想与那些有相同问题的人分享我的方法
public void SendLinkToIdm(string url)
{
try
{
bool x_32 = System.IO.Directory.Exists(@"C:\Program Files\Internet Download Manager"); // check if system is 32bit
bool x_64 = System.IO.Directory.Exists(@"C:\Program Files (x86)\Internet Download Manager"); // check if system is 64bit and you have installed 32bit programs on it
if (x_32 == true | x_64 == true) // if any of the above directories exist it means you have idm installed
{
System.Diagnostics.Process p = new System.Diagnostics.Process(); // Start the child process.
p.StartInfo.UseShellExecute = false; // Set the useshellExecute to false
p.StartInfo.RedirectStandardOutput = true; // Redirect the output stream of the child process.
p.StartInfo.FileName = @"C:\Windows\System32\cmd.exe"; // specify the location of the command line
p.StartInfo.Verb = "runas";
p.StartInfo.CreateNoWindow = true; // eliminate the process window
if(x_32 == true)
p.StartInfo.Arguments = @"/C cd %programfiles%\Internet Download Manager && IDMan.exe /d " + "\"" + url + "\""; // first go to the idm location then execute the command
else
p.StartInfo.Arguments = @"/C cd C:\Program Files (x86)\Internet Download Manager && IDMan.exe /d " + "\"" + url + "\"";
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
p.Start(); // now when all is set run the process
p.WaitForExit(); // Waits here for the process to exit.
}
else
MessageBox.Show("Please install Internet Download Manager " + System.Diagnostics.Process.Start("https://www.internetdownloadmanager.com/download.html")); // open the download page of the idm in the browser
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
调用函数
SendLinkToIdm("http://mirror2.internetdownloadmanager.com/idman630build10.exe");