![]() ![]() |
Jul 8 2008, 10:02 AM
Post
#1
|
|
|
Group: Members Posts: 7 Joined: 23-May 08 Member No.: 193456 OS: XP Pro x86
|
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? |
|
|
|
Jul 8 2008, 10:38 AM
Post
#2
|
|
|
Newbie Group: Members Posts: 21 Joined: 4-December 05 Member No.: 81505 OS: XP Pro x86
|
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"']; |
|
|
|
Jul 8 2008, 11:36 AM
Post
#3
|
|
|
Group: Members Posts: 7 Joined: 23-May 08 Member No.: 193456 OS: XP Pro x86
|
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 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 |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 7th January 2009 - 09:31 PM |