Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[Lib] ini v1.0 - Basic ini string functions


  • Please log in to reply
23 replies to this topic
Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
Roger, I'll add test soon.

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
Heres a major problem

The variable 2 is blank. I think it has to do with Misc1 & Misc2



#Include ini.ahk
f = 
(
[Home]
Path=C
[Email]
Misc1=12345
Misc2=67890
)
Content := ini_getSection(f, "Email") 
1 := ini_getValue(Content, "Email", "Misc1",1)
2 := ini_getValue(Content, "Email", "Misc2",1)
msgbox,%1%
msgbox,%2%


Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006
Thx for the report and taking time to test. I have fixed and updated the archive. I had allways problems with last line. The test is also added in test module. And I have given credit to you as tester.^^

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
EDIT:

Still have the error, in larger ini files, it still gives error. I dont know why.

Tuncay
  • Members
  • 1945 posts
  • Last active: Feb 08 2015 03:49 PM
  • Joined: 07 Nov 2006
Are you sure you downloaded and used the newer version 0.4.1 (not 0.4)? My test are success. Please send me or show the ini content and how you access that content. I would like to inspect it.

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
Let me retry.

EDIT:

I #Included wrong file, but other than that, I see no bugs

Fry
  • Members
  • 885 posts
  • Last active: Jan 17 2011 09:57 PM
  • Joined: 01 Nov 2007
BTW, when do you think add section and and keys and values will be done?

gamefreak310
  • Members
  • 55 posts
  • Last active: Jul 12 2016 04:37 PM
  • Joined: 05 Apr 2007

is it posible to reupload this lib  or post the code on forum ?



cgx5871
  • Members
  • 49 posts
  • Last active: Jul 31 2018 07:23 PM
  • Joined: 13 Sep 2014

A simple examle:

 

if  (a <> var)

    a := var

 

so, it must be  like this---------ini_Key( _Content, _Section, _Key,_Var,  type=0)

 

if ini_Key( _Content, _Section, _Key) <> var

  ini_Key( _Content, _Section, _Key, Var )

 

type:

0-----get

1-----put var

2-----Switchname

3-----AllkeyName

..........

 

 

i just thinking, but i dont  how to do it

------------------------

 

ini_getKey()

ini_replaceKey()

ini_getAllKeyNames()

.......