IPB

Google Frontpage Forums Unattended CD/DVD Guide
 
Reply to this topicStart new topic
> Bug in WPI GUI, Config 'description' field not handled properly
Nobby Barnes
post Jul 8 2008, 10:02 AM
Post #1





Group: Members
Posts: 7
Joined: 23-May 08
Member No.: 193456
OS: XP Pro x86
Country Flag


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)


CODE
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?
Go to the top of the page
 
+Quote Post
GrowBigTrees
post Jul 8 2008, 10:38 AM
Post #2


Newbie


Group: Members
Posts: 21
Joined: 4-December 05
Member No.: 81505
OS: XP Pro x86
Country Flag


QUOTE (Nobby Barnes @ Jul 8 2008, 05:02 PM) *
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

CODE
desc[pn]=['<BR><B><u>Notepad replacement wit LOTS! of nice extra features</u></B><P>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

CODE
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"'];

Go to the top of the page
 
+Quote Post
Nobby Barnes
post Jul 8 2008, 11:36 AM
Post #3





Group: Members
Posts: 7
Joined: 23-May 08
Member No.: 193456
OS: XP Pro x86
Country Flag


QUOTE (GrowBigTrees @ Jul 8 2008, 05:38 PM) *
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

CODE
desc[pn]=['<BR><B><u>Notepad replacement wit LOTS! of nice extra features</u></B><P>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

QUOTE (GrowBigTrees @ Jul 8 2008, 05:38 PM) *
For the cond and gcond: you can do some fancy things like

CODE
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 ????

This post has been edited by Nobby Barnes: Jul 8 2008, 01:58 PM
Go to the top of the page
 
+Quote Post

Google Frontpage Forums Unattended CD/DVD Guide

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 9th January 2009 - 05:04 PM
All trademarks mentioned on this page are the property of their respective owners
MSFN is not affiliated with Microsoft
Copyright © 2001-2008 msfn.org
Privacy Policy