tonne
Joined: 06 Jun 2006 Posts: 1651 Location: Denmark
|
Posted: Wed Mar 19, 2008 8:59 am Post subject: IniRead: Remark about strings enclosed in quotation marks. |
|
|
I lost quotes when saving and reading a string enclosed in quotation marks with IniWrite and IniRead and presumed it was a bug in AutoHotkey.
But it isn't, its explained on MSDN on GetPrivateProfileString:
| Quote: | | If the string associated with lpKeyName is enclosed in single or double quotation marks, the marks are discarded when the GetPrivateProfileString function retrieves the string. |
I suggest that this is added to the help on IniWrite and IniRead, possible with an example, like:
| Code: | ; To succesfully save and restore a string enclosed in quotation marks
; with IniWrite and IniRead use this approach:
variable="a" "b"
IniWrite,"%variable%",standard.ini,section,key
IniRead,newvariable,standard.ini,section,key |
_________________ RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2 |
|