tonne
Joined: 06 Jun 2006 Posts: 1133 Location: Denmark
|
Posted: Wed Mar 19, 2008 9: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 |
_________________ there's a dog barking close within the range of my ear
sounds like he wants to escape the chain
he would probably bite me to death if he could
but the chain lets me spit in his face
- Kashmir |
|