问题描述
有没有办法在浏览器窗口中打开一堆3-4个链接,并在另一个窗口中打开另一个3-4个链接.
Is there any way to open a bunch of 3-4 links in a browser window and another bunch of 3-4 links in another window.
例如.
链接A = {"facebook.com","instagram.com","twitter.com"}应该在浏览器窗口中打开( chrome )
Links A = {"facebook.com","instagram.com","twitter.com"}Should open in browser window (chrome)
和
链接B = {"google.com","yahoo.com","bing.com"}应该在同一浏览器( chrome )中打开,但在另一个窗口中打开
Links B = {"google.com","yahoo.com","bing.com"}Should open in same browser (chrome) but another window
推荐答案
您可以将 Process.Start
方法与/new-window
参数一起使用,这将强制执行它如下所示:
You can use the Process.Start
method with /new-window
argument which will enforce what it says as the following:
System.Diagnostics.Process.Start("chrome.exe", "/new-window facebook.com instagram.com twitter.com");
以上内容将在一个带有多个标签的窗口中打开所有链接.
the above will open all links in one window with multiple tabs.
因此,在您的情况下,您需要的是以下内容:
so in your case what you need is something like the following:
var A = new string[] { "facebook.com", "instagram.com", "twitter.com" };
var B = new string[] { "google.com", "yahoo.com", "bing.com" };
System.Diagnostics.Process.Start("chrome.exe", " /new-window " + string.Join(" ", A));
System.Diagnostics.Process.Start("chrome.exe", " /new-window " + string.Join(" ", B));
这篇关于在一个窗口中打开多个链接,在另一个窗口中打开另一个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!