Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Feature] TimedWaitForWindow and CloseWindow

Featured Replies

Description

An alternative to abruptly terminating processes with TASKKILL.

Changes

In jscript.js before

function TimedWaitForProgram(ImageName,HowLong)

add

function TimedWaitForWindow(WindowName,HowLong){ 	position="jscript.js";	whatfunc="TimedWaitForWindow()";		RunCmd('"' + wpipath + '\\Tools\\WPI Tool.exe" /Action=WaitForWindow /WindowName="' + WindowName + '" /Timeout=' + HowLong, false, true);}

In configwizard.js replace

CommandsMenuBar.addNewChild("jscript_dos", 3, "jscript_setEnvVar", "setEnvVar()", false, "", "");	CommandsMenuBar.addNewChild("jscript_dos", 4, "jscript_removeEnvVar", "removeEnvVar()", false, "", "");	CommandsMenuBar.addNewChild("jscript_dos", 5, "jscript_FormatDrive", "FormatDrive()", false, "", "");

with

CommandsMenuBar.addNewChild("jscript_dos", 3, "jscript_TimedWaitForWindow", "TimedWaitForWindow()", false, "", "");					CommandsMenuBar.addNewChild("jscript_dos", 4, "jscript_setEnvVar", "setEnvVar()", false, "", "");					CommandsMenuBar.addNewChild("jscript_dos", 5, "jscript_removeEnvVar", "removeEnvVar()", false, "", "");					CommandsMenuBar.addNewChild("jscript_dos", 6, "jscript_FormatDrive", "FormatDrive()", false, "", "");

and

CommandsMenuBar.addNewChild("cmd_other", 3, "other_sleep", "Sleep", false, "", "");     CommandsMenuBar.addNewChild("cmd_other", 4, "other_reboot", "Reboot", false, "", "");

with

CommandsMenuBar.addNewChild("cmd_other", 3, "other_closewindow", "CloseWindow", false, "", ""); 			CommandsMenuBar.addNewChild("cmd_other", 4, "other_sleep", "Sleep", false, "", ""); 			CommandsMenuBar.addNewChild("cmd_other", 5, "other_reboot", "Reboot", false, "", "");

and before

case 'jscript_CreateRegKey':

add

case 'jscript_TimedWaitForWindow':			HandleCommandsSelectionMenu('{JSCRIPT}=TimedWaitForProgram("Setup",10)');			break;

and before

case 'other_sleep':

add

case 'other_closewindow':			HandleCommandsSelectionMenu("{CLOSEWINDOW} WindowName");			break;

In installer.js before

case 'SLEEP':

add

case 'CLOSEWINDOW':				cmd="\"" + wpipath + "\\Tools\\WPI Tool.exe\" /Action=CloseWindow /WindowName=\"" + cmd + "\"";				fsoCmd=true;				break;

In the Tools folder add the WPI Tool.exe attached to this post

WPI Tool.exe

Edited by Francesco

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.