JScript:如何将焦点放在弹出窗口上

发布于 2024-08-21 16:08:42 字数 168 浏览 5 评论 0原文

我正在这样创建新窗口:

var WSHShell = WScript.CreateObject("WScript.Shell");
WSHShell.Popup("This is popup.");

但是窗口出现在另一个窗口下面。我怎样才能把它移到前面?

I'm making new window this way:

var WSHShell = WScript.CreateObject("WScript.Shell");
WSHShell.Popup("This is popup.");

But window appears under another ones. How can I move it to the front?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

抹茶夏天i‖ 2024-08-28 16:08:42

也许这会有所帮助:

WScript.Shell.Popup 有一个
nType 的未记录值
导致结果的参数
对话框/弹出窗口“保持在顶部”/
前景,这意味着他们不能
被其他窗口或对话框隐藏:
第4096章

WScript.CreateObject("WScript.Shell").Popup("Message", 0, "Title", 4096);

Perhaps this would help:

WScript.Shell.Popup has an
undocumented value for the nType
parameter which causes the resulting
dialogs/popups to “stay on top” / in
foreground, meaning that they cannot
be hidden by other windows or dialogs:
4096.

WScript.CreateObject("WScript.Shell").Popup("Message", 0, "Title", 4096);
慢慢从新开始 2024-08-28 16:08:42

使用 4096 使弹出窗口“保持在顶部”

我正在尝试在 Ruby 和 Watir Webdriver 中创建弹出窗口。

我安装了 win32ole-pp ruby​​gem

我在代码中使用了它并且它有效:

require 'win32ole'

WshShell = WIN32OLE.new("WScript.Shell").Popup("Message", 5, "Title", 4096);

Using 4096 works for popups to "stay on top"

I'm trying to create Popups in Ruby and Watir Webdriver.

I installed win32ole-pp rubygem

I used this in my Code and it works:

require 'win32ole'

WshShell = WIN32OLE.new("WScript.Shell").Popup("Message", 5, "Title", 4096);

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文