AutoHotkey Community

It is currently May 25th, 2012, 7:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: IniRead [No Section]
PostPosted: February 21st, 2005, 8:06 pm 
Offline

Joined: November 6th, 2004, 11:03 am
Posts: 170
Location: Salt Lake City, UT
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 8:40 pm 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 10:19 pm 
Offline

Joined: November 6th, 2004, 11:03 am
Posts: 170
Location: Salt Lake City, UT
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. :) Why do they make Automation, Hotkeys, and Scripting so hard?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 21st, 2005, 11:12 pm 
Offline

Joined: December 28th, 2004, 12:33 am
Posts: 60
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. :shock:


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, Exabot [Bot], Klark92, krthornton, vsub, Yahoo [Bot] and 1 guest


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group