iHonda Posted March 18, 2006 Share Posted March 18, 2006 ok i still have no clue wut a .ini is i know that a lot of programs have them but i dont kno wut they do or wut they are for some1 plz explain this to me A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
Developers Jos Posted March 18, 2006 Developers Share Posted March 18, 2006 ok i still have no clue wut a .ini is i know that a lot of programs have them but i dont kno wut they do or wut they are for some1 plz explain this to mehttp://en.wikipedia.org/wiki/INI_file SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
nfwu Posted March 18, 2006 Share Posted March 18, 2006 An initialization file, or INI file, is a configuration file that contains configuration data for Microsoft Windows based applications. Starting with Windows 95, the INI file format was superseded but not entirely replaced by a registry database in Microsoft operating systems. Although made popular by Windows, INI files can be used on any system thanks to their flexibility. They allow a program to store configuration data, which can then be easily parsed and changed. File Format A typical INI file might look like this: [section1] ; some comment on section1 var1 = foo var2 = doodle [section2] ; another comment var1 = baz var2 = shoodle Format This describes the elements of the INI file format: Sections: Sections start with '[' and end with ']' as in [section1] and [section2] above. Parameters: The "var1 = foo" above is an example of a parameter (also known as an item). Parameters begin with a key ('var1'), equals sign ('='), and a value ('foo'). Comments: All the lines starting with a ';' are assumed to be comments, and are ignored. Differences The format of INI files is not well defined. Many programs interpret their structure differently than the basic structure that was defined in the above example. The following is a basic list of some of the differences: Comments: Programs like Samba accept either ';' or '#' as comments. Comments can be added after parameters with several formats. Backslashes: Adding a backslash '\' allows you to continue the value from one line to another. Some formats also allow various escapes with a '\', such as '\n' for newline. Duplicate parameters: Most of the time, you can't have two parameters with the same name in one section. Therefore we can say that parameters are local to the section. Although this behavior can vary between implementations, it is advisable to stick with this rule. Duplicate sections: If you have more than one section with the same name then the last section overrides the previous one. (Some implementations will merge them if they have different keys.) Some implementations allow ":" in place of "=". #) TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
iHonda Posted March 18, 2006 Author Share Posted March 18, 2006 (edited) hmm didnt think of wikipedia. thanx guys. ok now how do i use a INI file?? Edited March 18, 2006 by Zmaster A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
Developers Jos Posted March 18, 2006 Developers Share Posted March 18, 2006 hmm didnt think of wikipedia. thanx guys. ok now how do i use a INI file??check the helpfile for Ini????() function for more info... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Andrew Sparkes Posted March 19, 2006 Share Posted March 19, 2006 There are heaps of information in the help file Try looking in the index for these: IniRead() IniWrite() IniReadSection() IniReadSectionNames() ... The list goes on. The documentation is pretty complete. It should get you what you need. If not, there is always to forum. Just remember to post your code. Hope you found what you were lookin for, Sparkes. ---Sparkes. Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 (edited) ok i looked at the help file but now i dont know wut they mean by "key" in the paramiters (i think they're called) EDIT: i would also like to know if it is possible to have a While WEnd loop in a While WEnd loop such as when u are using the Loop thing for you GUI Edited March 23, 2006 by Zmaster A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
greenmachine Posted March 23, 2006 Share Posted March 23, 2006 Did you read the remarks section? A standard ini file looks like: [sectionName] Key=Value Yes, loops can be nested. Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 i did read the remarks but i dont understand what they mean by value A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
greenmachine Posted March 23, 2006 Share Posted March 23, 2006 What the hell else would a value mean? It's the VALUE that is set to the key. It is really too simple to explain it any simpler. Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 ok i guess what i really want to know is what does the key and value do?? A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
greenmachine Posted March 23, 2006 Share Posted March 23, 2006 Go find some INI files on your computer and look at them. Or alternatively, use some common sense. What do you think they would do? Think about it for a sec. You have stuff you want to store. What do you do with it? ........ Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 ok so the value is what your going to be saving to the .ini?? or am i wrong?? A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
slipperylobster Posted March 23, 2006 Share Posted March 23, 2006 an .ini is the opposite of an .outi (had to say it! ) Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 ok well now i finially get wut a .ini is and wut a key is so im done about that. but now i need to know if there is a way to make it so that the program wont run unless a key file is in the folder kind of like with d2 needing the cdkey.mpq thing A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
greenmachine Posted March 23, 2006 Share Posted March 23, 2006 If _____________ Then Exit EndIf Figure something out for yourself for a change. Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 ok but what i need to know is: is there a way to make it so that ppl cant see the file?? A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
CyberSlug Posted March 23, 2006 Share Posted March 23, 2006 (edited) ok but what i need to know is: is there a way to make it so that ppl cant see the file?? I wonder if Valik is reading this thread.Anyway, you can't really "hide" the file unless you make its data hard to understand or encrypted. Well, you could FileSetAttrib("theFile.ini", "+H") One reason to use an ini file is so that it could be manually edited if need be..... Edited March 23, 2006 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
iHonda Posted March 23, 2006 Author Share Posted March 23, 2006 the file i want to hide isnt and ini its a file that contains a key that the program reads to be sure that the computer is authorized to use the prog A great place to start Autoit 1-2-3 Link to comment Share on other sites More sharing options...
Valik Posted March 23, 2006 Share Posted March 23, 2006 ok but what i need to know is: is there a way to make it so that ppl cant see the file??Stab them in their eyes? I wonder if Valik is reading this thread.Unfortunately.Zmaster, if you're not able to figure out an INI file, please turn the computer off now and go find something else to do with your life. An INI file is about the most simple storage mechanism in use on computers today. Arguably, it's easier than a flat-text file since most of the parsing is done for you. If you can't figure an INI file out just by looking at it, you definitely do not need to be using a scripting language. It's virtually impossible (as demonstrated) to explain an INI file because they are so simple. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now