在一个窗口中打开多个链接,在另一个窗口中打开另一个链接 [英] Open multiple links in a window and another multiple links in another window

查看:63
本文介绍了在一个窗口中打开多个链接,在另一个窗口中打开另一个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在浏览器窗口中打开一堆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));

这篇关于在一个窗口中打开多个链接,在另一个窗口中打开另一个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆