AutoHotkey Community

It is currently May 27th, 2012, 6:33 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: March 30th, 2011, 7:13 am 
Offline

Joined: May 31st, 2008, 3:22 pm
Posts: 47
i have *.ini file with few same keys in section. Need add to begin or to end, not replace, how? coz by default only replace first value
in user manual, no info

iniTest.ini
Quote:
[uzrpass]
Pass=Add2Begin < how do that?
Pass=Seed0
Pass=Richa
Pass=Yally
Pass=Rutger
Pass=Salt
Pass=Brady
Pass=Add2End < and that?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 7:37 am 
Read and save each key/value pair, then deleted it. When they are all delete, re-add them (from your saved pairs) in the order you want.

There are some ini libraries in the Scripts and Functions section that may do what you want directly. You will have to search and investigate.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 7:42 am 
FileAppend


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 7:46 am 
Offline

Joined: April 8th, 2009, 7:49 pm
Posts: 6073
Location: San Diego, California
http://en.wikipedia.org/wiki/INI_file

An INI file is a configuration file. The AHk commands do not support multiple identical keys within the same section.
The link above suggests something similar.

Why would you want to hwve 7 passwords, but no way to qualify them?

If you want to do this I suggest looking at the other file reading methods listed in the docs. Fileeread, loop, read etc


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 30th, 2011, 8:43 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Insert text in (a) specific line(s)
http://www.autohotkey.net/~hugov/tf-lib ... InsertLine :wink:
(you can use TF_Find to find the line with [uzrpass])

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], JSLover and 66 guests


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