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 [No Section]

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
ranomore



Joined: 06 Nov 2004
Posts: 170
Location: Salt Lake City, UT

PostPosted: Mon Feb 21, 2005 7:06 pm    Post subject: IniRead [No Section] Reply with quote

What would I have to do to read/write from an ini file where the information is not listed under a [section] heading? It still meets the KEY=Var format.

EDIT:
If it's not possible with IniRead/IniWrite, I'm sure I can do it with a file read loop. Just curious if it is.
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
jonny



Joined: 13 Nov 2004
Posts: 2951
Location: Minnesota

PostPosted: Mon Feb 21, 2005 7:40 pm    Post subject: Reply with quote

IniRead can only read from correctly formatted, standard INI files. In truth, if it doesn't have any sections, it's not a true INI file.

To answer your question more directly: it requires the third parameter (section) to be non-blank.
Back to top
View user's profile Send private message
ranomore



Joined: 06 Nov 2004
Posts: 170
Location: Salt Lake City, UT

PostPosted: Mon Feb 21, 2005 9:19 pm    Post subject: Reply with quote

thanks jonny. I'd already gotten the erro message. It's a weird ini file. It has what i'd call a pre-amble section that has stored values in it, before the start of the normal-correctly formatted-sections. It's for M$ Visual Source Safe, so it's non-standardness is not too surprising. Smile Why do they make Automation, Hotkeys, and Scripting so hard?
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Watcher



Joined: 27 Dec 2004
Posts: 60

PostPosted: Mon Feb 21, 2005 10:12 pm    Post subject: Reply with quote

You might try adding your own section header to it. It's very possible that although the program does not add one it will not complain if you do. Shocked
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help 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