Use .ini to customize your script PART 1

Hello,Today i will explain how to make .ini and how to use it in script.


PART1:

THIS PART ABOUT LEARNING .INI AND HOW TO MAKE ONE.

PART2>> http://ugbase.eu/tutorials/14)use-ini-to-customize-your-script-part2-tut/



so ini means:
The INI file format is an informal standard for configuration files for some platforms or software. INI files are simple text files with a basic structure composed of "sections" and "properties".

and this is how we put codes in ini file:

first sections:

Sections:
Keys may (but need not) be grouped into arbitrarily named sections. The section name appears on a line by itself, in square brackets ([ and ]). All keys after the section declaration are associated with that section. There is no explicit "end of section" delimiter; sections end at the next section declaration, or the end of the file. Sections may not be nested.

Code:
[section]
a=a
b=b


then keys:
Keys:
The basic element contained in an INI file is the key or property. Every key has a name and a value, delimited by an equals sign (=). The name appears to the left of the equals sign.

Code:
name=value


and we put keys under sections
just like you saw above:

Code:
[ONKEY]
kay1=49

[OFFKEY]
key1=50

and we comment in INI file using this semicolon " ; "
so every semicolon means the whole line is commented

wiki:

Comments:
Semicolons (;) at the beginning of the line indicate a comment. Comment lines are ignored.

Code:
; comment text

now making .ini file is easy , just open notepad and add the codes for example:

Code:
[ONKEY]
kay1=49

[OFFKEY]
key1=50
then under FILE tap select SAVE AS..
then name it and put after the name .ini
so it get compiled as ini file


so now we have .ini file , and we can edit it with notpad too , just double click to open it if you want to edit it

PS: you saw key1=49
but did you notice we didn't add space between?
yes we don't add space between key name(key1) and the value (49)


now inside "[]" is the section name that we will look for in cleo
and under this section name is the key , and keys can be strings/integers/floats


integers: 1 , 2 , 3 , -21 , -5 , 124 ...etc
float: 1.0 , 2.3 , 3.75 , -21.02 , -5.146 , 124.9 ...etc
strings: this is string , word , letter , nigger , lol ..etc

strings are letters/words contain even numbers , but you have to know every sentence contain letter it is a string


PS: keys are integers

so now to get integer we use this opcode:
Code:
0AF0: 0@ = get_int_from_ini_file "cleo\config.ini" section "SectionName" key "intKey"

and for float we use this opcode:
Code:
0AF2: 0@ = get_float_from_ini_file "cleo\config.ini" section "SectionName" key "floatKey"

and for string we use this opcode:
Code:
0AF4: 0@v = read_string_from_ini_file "cleo\config.ini" section "SectionName" key "stringKey"


PS: and the "v" followed by a variable sign (@) is a string tag
so strings variables followed by V


this is it , this is how you make .ini and how you use it and edit it .

sorry if i forgot something , please comment so i can add/fix it



thanks for following my tutorials.
if i helped you please hit the thanks button and the little heart(rep.) under my name so you can make me more trusted for users so they can reach me easily.
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
Re: 13)Use ini to customize your script PART1- TUT

~quick update added to explain how to get strings/floats/integers and a bit more explanations for it
 
Top