2016-08-02 69 views
1

我有这个简单的Windows JavaScript,它将每隔30分钟弹出一个提醒10秒钟。如何让弹出窗口出现在所有其他窗口的顶部?Windows脚本主机弹出 - 在其他窗口之上

var wshShell = WScript.CreateObject("WScript.Shell"); 
while(1) { 
    var value = wshShell.Popup("Reminder text", 10, "Reminder", 0x1); 
    if (value == 2) { // Cancel button pressed 
     break; 
    } 

    WScript.sleep(30 * 60 * 1000); // Every 30 minutes 
} 

WScript.Echo("Exiting timer!"); 

回答

0

得到了Clackwell’s Weblog

WScript.Shell.Popup答案有导致结果对话框/弹出窗口“留在上面” /在前台N型参数的无证值,这意味着他们不能4096

JScript example: 

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

VBScript example: 

WScript.CreateObject(“WScript.Shell”).Popup “Message”, 0, “Title”, 4096 

MSDN

还记载:被其他窗口或对话框被隐藏
相关问题