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.

 
Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
tonne



Joined: 06 Jun 2006
Posts: 1651
Location: Denmark

PostPosted: Wed Mar 19, 2008 8: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

_________________
RegEx Powered Dynamic Hotstrings
COM
AutoHotkey 2
Back to top
View user's profile Send private message
TheIrishThug



Joined: 19 Mar 2006
Posts: 419

PostPosted: Fri Oct 02, 2009 2:03 pm    Post subject: Reply with quote

Bump. I just ran into this same thing. Luckily I guessed that it was a "feature" and searched the forum. It would be much easier if it was in the official documentation since it has been mentioned in the forum at least 3 times now.
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Wish List 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