Nobby Barnes Posted July 8, 2008 Share Posted July 8, 2008 The 'multi-line' ability of the 'description' field is not being handled properly.If you start WPI.Click on configadd 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? Link to comment Share on other sites More sharing options...
GrowBigTrees Posted July 8, 2008 Share Posted July 8, 2008 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 likecond[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"']; Link to comment Share on other sites More sharing options...
Nobby Barnes Posted July 8, 2008 Author Share Posted July 8, 2008 (edited) 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 indesc[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 GUIFor the cond and gcond: you can do some fancy things likecond[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 July 8, 2008 by Nobby Barnes Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now