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.

Bug in WPI GUI

Featured Replies

The 'multi-line' ability of the 'description' field is not being handled properly.

If you start WPI.

Click on config

add a new item,

In the 'Description' field add a long line of text, including a 'return' (newline).

It incorrectly writes the desc[pn] field with a line feed (newline)

prog[pn]=['HP TCP/IP Port Monitor'];
desc[pn]=['Installs "HP Standard TCP/IP Port" as an available port to connect printers with.
This is needed to talk to HP jet Direct network printers'];
uid[pn]=['HPTCPIPPORTMONITOR'];
dflt[pn]=['yes'];
cat[pn]=['Drivers'];
forc[pn]=['no'];
cmd1[pn]=['"%root%\\Win\\batch\\Add_Printer_portmon.cmd"'];
pn++;

If you restart WPI.hta, you get 'unterminated string constant' script error.

This may possibly be a bug with the interpreting of the desc field (terminating at the newline and not the field end marker)

If I manually edit the config.js file and remove the 'return' it works fine..

On a side note, I struggle to appreciate the syntax that one uses for 'condition'.

Reading through the (limited) help file I can ony find breif reference to it.

I have insufficient (mental) storage capacity to even contemplate learning JavaScript.

So if it is 'standard' js condition evalation phrases then I will need some sort of reasonable documentation that lists the syntax, modifiers and some good working examples..

Perhaps I've missed a guide here somewhere.. If I have, my 'Googling' sucks..! Link anyone?

The 'multi-line' ability of the 'description' field is not being handled properly.

...

On a side note, I struggle to appreciate the syntax that one uses for 'condition'.

I've never thought of this as a bug, I just use <BR> or other HTML tags to format the description, without real line feeds, as in

desc[pn]=['
<B><u>Notepad replacement wit LOTS! of nice extra features</u></B>
When the original Notepad.exe is replaced by Notepad++, a "<font color="#0000FF">Windows File Protection</font>" message box may appear: <font color="#0000FF">click Cancel.</font> If thereafter another message box appears, <font color="#0000FF">click OK.</font></P><UL><LI>	[ FREEWARE ]<LI>	<a href="http://Notepad-plus.sourceforge.net/uk/about.php">HOME</a>	- <a href="http://notepad-plus.sourceforge.net/uk/download.php">DOWNLOAD</a>	- <a href="http://perishablepress.com/press/2006/08/08/associate-extensionless-files-with-Notepad">SILENT</a><LI>	Harddisk space taken: <FONT color=blue>6 MB</FONT><LI>	<B>STATUS</B> 2008-05-13:	<B><FONT color=green>-0K</FONT></B></UL></FONT></UL>'];

For the cond and gcond: you can do some fancy things like

cond[pn]=['getOSver()=="03" && FileExists("%wpipath%\\Install\\INTERNET\\IE7\\IE7-WindowsServer2003-x86-enu(sp1).exe")'];
gcond[pn]=['RegKeyValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer\\Version")=="7.0.5730.11"'];

  • Author
I've never thought of this as a bug, I just use <BR> or other HTML tags to format the description, without real line feeds, as in

desc[pn]=['
<B><u>Notepad replacement wit LOTS! of nice extra features</u></B>
When the original Notepad.exe is replaced by Notepad++, a "<font color="#0000FF">Windows File Protection</font>" message box may appear: <font color="#0000FF">click Cancel.</font> If thereafter another message box appears, <font color="#0000FF">click OK.</font></P><UL><LI>	[ FREEWARE ]<LI>	<a href="http://Notepad-plus.sourceforge.net/uk/about.php">HOME</a>	- <a href="http://notepad-plus.sourceforge.net/uk/download.php">DOWNLOAD</a>	- <a href="http://perishablepress.com/press/2006/08/08/associate-extensionless-files-with-Notepad">SILENT</a><LI>	Harddisk space taken: <FONT color=blue>6 MB</FONT><LI>	<B>STATUS</B> 2008-05-13:	<B><FONT color=green>-0K</FONT></B></UL></FONT></UL>'];

Ah then it's a data validition bug in the GUI.. It allows you to press return to start a new line of text and does hot handle this correctly.

But I get what you say.. and this is a good solution. wish this kind of control was visible/available in the GUI

For the cond and gcond: you can do some fancy things like

cond[pn]=['getOSver()=="03" && FileExists("%wpipath%\\Install\\INTERNET\\IE7\\IE7-WindowsServer2003-x86-enu(sp1).exe")'];
gcond[pn]=['RegKeyValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Internet Explorer\\Version")=="7.0.5730.11"'];

My point exactly.. Click click.. out of memory error..

Any 'syntax rules' guide/notes/faq ????

Edited by Nobby Barnes

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.