BarryB
10th October 2004 22:30 UTC
Escaped quotes working inconsistantly
I had sucessfully used the section description text of:
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} "If $\"GNU tar$\" is checked, the installer for GNU tar (Windows version) will be executed when you click $\"next$\"."
without getting an error, but then I inserted it in a different location, and now the escaped quotes in the line above give me the error:
SendMessage expects 4-6 parameters, got 34.
Usage: SendMessage hwnd message [wparam|STR:wParam] [lparam|STR:lParam] [$(user_var: return value)] [/TIMEOUT=X]
Error in macro MUI_DESCRIPTION_TEXT on macroline 8
Error in script "C:\Program_Files_2\EZ_TAR_INSTALLER.nsi" on line 96 -- aborting creation process
Line 96 is the line with the escaped quotes. If I replace the escaped quotes with single quotes, it works. I don't remember if I used the text with the !insertmacro instruction before, but I know I somehow got the escaped-quotes version to work when hovering over an item in the component menu, with no error.
No big deal to use the single quotes, but it made me waste some time, so incase it's a bug, I figured I'd mention it.
This happened with "Compile and run" in HM NIS Edit, but I'm assuming it's a NSIS problem.
Afrow UK
11th October 2004 09:55 UTC
I recommend you use e.g. 'hello my name is "bobo"'
-Stu
BarryB
22nd October 2004 06:50 UTC
That worked for that case, but needed to use quotes in a different part of the script and the only quoting that worked was the following (I put backslashes between the dollar signs and the single quotes, but they don't show in this post):
!insertmacro MUI_DESCRIPTION_TEXT ${GNU_tar}'Check box next to $'GNU tar and EZ tar$' to install EZ TAR and execute the GNU tar installer. EZ TAR requires a separate, command line tar utility such as GNU tar.'
When I replaced the escaped single quotes with double quotes, I got the following error (whether or not I escaped the double quotes):
!insertmacro: MUI_DESCRIPTION_TEXT
SendMessage expects 4-6 parameters, got 32.
Usage: SendMessage hwnd message [wparam|STR:wParam] [lparam|STR:lParam] [$(user_var: return value)] [/TIMEOUT=X]
Error in macro MUI_DESCRIPTION_TEXT on macroline 8
Error in script "C:\123123123.nsi" on line 77 -- aborting creation process
I just realized that I put the dollar sign before the backslash instead of after by accident, but that's the only way the quotes don't give me an error! Maybe there's a bug in NSIS due to a backslash being before the dollar sign, allowing my bug to work by accident.
Yikes! The dollar sign does before the backslash to represent characters like newlines, according to 4.2.4 Constants Used in Strings, but the dollar sign goes after the backslash when escaping a quote, according to 2.2 Script Files. Error in the documentation?
kichik
22nd October 2004 12:37 UTC
Originally posted by BarryB
Yikes! The dollar sign does before the backslash to represent characters like newlines, according to 4.2.4 Constants Used in Strings, but the dollar sign goes after the backslash when escaping a quote, according to 2.2 Script Files. Error in the documentation?
Thanks, fixed the error. It should be $\" not \$".
Comm@nder21
22nd October 2004 18:27 UTC
i'd rather use the following code:
!insertmacro MUI_DESCRIPTION_TEXT ${GNU_tar} 'Check box next to "GNU tar and EZ tar" to install EZ TAR and execute the GNU tar installer. EZ TAR requires a separate, command line tar utility such as GNU tar.'
BarryB
22nd October 2004 19:11 UTC
Comm@nder21, that's the first thing I tried. Same error. Turns out that I won't be quoting anything anyway. I'd like to mention what the description refers to and put it in quotes, but my new description would get truncated because it's too long.
I wish there was a way to resize the description area. Is there?
Joost Verburg
24th October 2004 14:08 UTC
Yes, you can use a custom interface resource file (see MUI_UI in the Modern UI Readme).