JScript: How to give focus to popup window - Stack Overflow

I'm making new window this way:var WSHShell = WScript.CreateObject("WScript.Shell");WSH

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?

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?

Share asked Feb 14, 2010 at 14:41 user272852user272852
Add a ment  | 

2 Answers 2

Reset to default 6

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);

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);

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744909465a4600459.html

相关推荐

  • JScript: How to give focus to popup window - Stack Overflow

    I'm making new window this way:var WSHShell = WScript.CreateObject("WScript.Shell");WSH

    1天前
    50

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信