AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IniRead: Remark about strings enclosed in quotation marks.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
tonne



Joined: 06 Jun 2006
Posts: 1133
Location: Denmark

PostPosted: Wed Mar 19, 2008 9:59 am    Post subject: IniRead: Remark about strings enclosed in quotation marks. Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group