ifthenhelpme Posted September 29, 2004 Share Posted September 29, 2004 How do you make a .ini (a Configuration file) and link it to the program you want it to configure? Link to comment Share on other sites More sharing options...
ifthenhelpme Posted September 29, 2004 Author Share Posted September 29, 2004 ok....so is anyone gunna help me AT ALL?or are all these "brainiacs"(not offensive)out there finally stumped...the internet is no help as all the files i try to dl are humungous.... Link to comment Share on other sites More sharing options...
sugi Posted September 29, 2004 Share Posted September 29, 2004 INI-files can be changed with the IniWrite command. a simple search in the helpfile should show you everything you can do with INI-files. But the second part... A file cannot be linked to another file, so your question is what's wrong. Maybe there are some people out there that can read your mind and can help you. But with that little information you provide I doubt that. Besides just waiting one hour and then complaining that you didn't receive any help is a bit strange. There are parts of the world where it's deep night just now and usually everyone is asleep. Link to comment Share on other sites More sharing options...
this-is-me Posted September 29, 2004 Share Posted September 29, 2004 Umm... Duh... No offense, but an ini file is nothing more than a text file. Who else would I be? Link to comment Share on other sites More sharing options...
ifthenhelpme Posted September 29, 2004 Author Share Posted September 29, 2004 well ...sorry... what i mean by linking it to another file...is directing it to which file to be able to configure... Link to comment Share on other sites More sharing options...
sugi Posted September 29, 2004 Share Posted September 29, 2004 Depends on the program. Most windows software has a hardcoded path and filename (like windows directory, user directory or current directory) and in most cases you cannot tell the program to read a specific ini-file. Link to comment Share on other sites More sharing options...
t0ddie Posted September 30, 2004 Share Posted September 30, 2004 (edited) yep.. just cause you have an .ini does not mean the program you want to read it.. will read it. if the program has a .ini already.. you might just try editing it what exactly are you trying to do? we are here to help Edited September 30, 2004 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
Guest BL@(K-R34P3R Posted September 30, 2004 Share Posted September 30, 2004 Yes you can link them. Here is example:Pindlebot.au3setup.au3 Link to comment Share on other sites More sharing options...
t0ddie Posted September 30, 2004 Share Posted September 30, 2004 black.. thats obvious if they are both able to use the same .ini i think he meant use any program... with any .ini which is just .... plain.... crazy Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
ifthenhelpme Posted September 30, 2004 Author Share Posted September 30, 2004 ok...me write script...me compile script to .exe ... me ask u guys for help making .ini file to configure certain things in the .exe "autoit script"...me rephrase question to help u guys understand...and no there obviously isnt a .ini file for the program already...btw this is an .ini file for me conditional statement script... Thanks, Dan Link to comment Share on other sites More sharing options...
KnowledgeSponge Posted October 1, 2004 Share Posted October 1, 2004 ok...me write script...me compile script to .exe ... me ask u guys for help making .ini file to configure certain things in the .exe "autoit script"...me rephrase question to help u guys understand...and no there obviously isnt a .ini file for the program already...btw this is an .ini file for me conditional statement script...Thanks, Dan<{POST_SNAPBACK}>IniRead ( "filename", "section", "key", "default" ) config.ini config1 myvar notfoundContents of config.ini[config1]myvar = myvalueCode to retrieve myvar's value$readmyini = IniRead ( "config.ini", "config1", "myvar", "notfound" ) msgbox(0,"Value", "The value of myvar is " & $readmyini)Success: Returns the requested key value. Failure: Returns the default string if requested key not found. A standard ini file looks like:[sectionName]Key=ValueCode to write value to myvar$writevalue = InputBox ( "Value", "Enter Value" , "blah" ) IniWrite ( "config.ini", "config1", "myvar", $writevalue )This is all straight outta the help file with very minor alteration. Have you read it? Link to comment Share on other sites More sharing options...
ifthenhelpme Posted October 1, 2004 Author Share Posted October 1, 2004 ok...im not exactly an expert at this...is this in the manual under IniWrite? Link to comment Share on other sites More sharing options...
Josbe Posted October 1, 2004 Share Posted October 1, 2004 ok...im not exactly an expert at this...is this in the manual under IniWrite?<{POST_SNAPBACK}>Definitively, you need read the manual. IniRead function • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
ifthenhelpme Posted October 1, 2004 Author Share Posted October 1, 2004 okie-dokies...thanks...il figure it out eventually Link to comment Share on other sites More sharing options...
scriptkitty Posted October 1, 2004 Share Posted October 1, 2004 Just to confuse you a bit more, if you want multiple scripts to use the same INI, I normally store the INI location in the registry. You can also have the program read the ini file, and if it fails, you could have it write the default one. check out RegWrite and RegRead functions in the manual. I made a few programs for others, and the program would ask them questions on file locations the first time, and then it would store these defaults on the computer, later it would just read these and not have to ask each time. My second script I gave them read the reg entry to determine that INI and knew the file locations. I never had to worry about where they stored anything, and didn't have to use any searches. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
ifthenhelpme Posted October 2, 2004 Author Share Posted October 2, 2004 @josbe - um...ive read that over and over and over trying to figure out what that means...i want the .ini file to be able to configure only a few things out of the entire script...so that means ... Link to comment Share on other sites More sharing options...
the_lord_mephy Posted October 2, 2004 Share Posted October 2, 2004 IniWrite( "Config.ini", "Settings", "Username", "JoeUser") Would write this to Config.ini [settings] Username=JoeUser To read it you would do IniRead("Config.ini", "Settings", "Username", "Not Found") The return value would be JoeUser. And if the key, "Username" didn't exist, it would return "Not Found". My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
ifthenhelpme Posted October 3, 2004 Author Share Posted October 3, 2004 ok so i want it to read the part $a=is|... $b=isn't|... and only to be able to edit that...so what would i do? Link to comment Share on other sites More sharing options...
the_lord_mephy Posted October 3, 2004 Share Posted October 3, 2004 (edited) What do you mean. If a .ini looks like this:[information]Username=JoeUserPassword=JoePassand you wanted to change the password, you would do.IniWrite("Config.ini", "Information", "Password", "JoePass2")This would:a.) If the key "Password" doesn't exist, it would write the key in with the value.b.) If the key "Password" does exist, it would change the value to JoePass2Edit:A standard ini file looks like:[sectionName]Key=Value Edited October 3, 2004 by the_lord_mephy My site for HTML Help :)[quote name='Valik' date='Oct 15 2004, 12:29 PM']Maybe nobody is an "elite uber-coder" like me because thinking is a capital offense in today's online-world?[right][snapback]36427[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
ifthenhelpme Posted October 4, 2004 Author Share Posted October 4, 2004 i want it to write an .ini file to configure the part on $a=is|... and $b=isn't|... and only those two...what does the command look like 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