Krillr Posted December 28, 2008 Share Posted December 28, 2008 (edited) Hello. I was trying to learn how to use Ini files so i made theese 2 small scripts: 1. $lol1 = InputBox("1", "Choose 1") Sleep(1000) $lol2 = InputBox("2", "Choose 2") Sleep(500) IniWrite ("Test1.ini", "section1", "Key1", $lol1) Sleep(500) IniWrite ("Test2.ini", "section2", "Key2", $lol2) 2. $lol1= IniRead("Test1.ini", "section1", "Key1") Sleep(500) $lol2= IniRead("Test2.ini", "section2", "Key2") Sleep(500) Run("Notepad.exe") Send($lol1) Send("{Enter}") Send($lol2) When i use script number 1 it shows the Inputboxes, i write something in them and it creates the Test1.ini and Test2.ini. Then i use Script 2 and i get some kind of error message. $lol1=IniRead("Test1.ini", "section1", "Key1") $lol1^ ERROR Error: Incorrect number of parameters in function call.I got no idea what that is. I dont know if theres an error in my script or what it is, but please help me :-) I hope i posted this the right place and done it the right way and stuff ^^ Edited December 28, 2008 by Krillr Link to comment Share on other sites More sharing options...
Pain Posted December 28, 2008 Share Posted December 28, 2008 (edited) IniRead ( "filename", "section", "key", "default" )default is the value that will be returned if the key does not exist. Edited December 28, 2008 by Pain Link to comment Share on other sites More sharing options...
Krillr Posted December 28, 2008 Author Share Posted December 28, 2008 What should i write in the Default place? :S Link to comment Share on other sites More sharing options...
Pain Posted December 28, 2008 Share Posted December 28, 2008 Something that will let the user know that the key was not found. In the helpfile example they use the string "NotFound". IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound") Link to comment Share on other sites More sharing options...
Krillr Posted December 28, 2008 Author Share Posted December 28, 2008 IT WORKS! YAY. What do i do with this thread now? :S Close it or tag it or something? Link to comment Share on other sites More sharing options...
Pain Posted December 28, 2008 Share Posted December 28, 2008 Nothing, but if you like you can click on Edit > Full Edit on your first post and add [solved] to the title. Link to comment Share on other sites More sharing options...
Krillr Posted December 28, 2008 Author Share Posted December 28, 2008 Where the Biip does it say Edit? Link to comment Share on other sites More sharing options...
GEOSoft Posted December 28, 2008 Share Posted December 28, 2008 On your first post it's a button right beside where the Quote and Reply buttons are. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Krillr Posted December 28, 2008 Author Share Posted December 28, 2008 (edited) Uhm.. Theres no button next to Quote and Reply :S Edit: Found it, maybe it was because i was inactive? WHen i posted this reply the buttons showed up. Edited December 28, 2008 by Krillr 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