TK_Incorperate Posted September 3, 2007 Share Posted September 3, 2007 Ok well here's my problem, I'm using IniRead to try to get a number from the .ini, and it doesn't work. The program will use the default number from the IniRead function instead, it won't read my number from the acual .ini. I've tried removing default number from the IniRead function and replacing with "" but that still did not work. Here's what I'm trying to do, please help. $Stat = InputBox("", "Test, enter number") $Set1 = IniRead("j.FILE", "Character", "Number", 300) If $Stat < $Set1 Then MsgBox(0, "Stat", "Number is lower then the number in .ini") ElseIf $Stat > $Set1 Then MsgBox(0, "Stat", "Number higher then number in .ini" EndIf No matter what I put in the .ini, it will always go based off of 300 since that is the default in the function, I can put 1000 in the .ini, and enter 301 in the input box, and it will say my number is higher then what is in the .ini. Please help me out here. ~TK Link to comment Share on other sites More sharing options...
Nahuel Posted September 3, 2007 Share Posted September 3, 2007 I guess it's because you missed the .ini after j.FILE Link to comment Share on other sites More sharing options...
Danny35d Posted September 4, 2007 Share Posted September 4, 2007 You want to found out which number is higher. Inpubox() funtion return a string not a interger, so for you to be able to compare which number is higher you need to use NUMBER() function in your if statement.Example$Stat = InputBox("", "Test, enter number")$Set1 = IniRead("j.FILE", "Character", "Number", 300)If Number($Stat) < Number($Set1) Then MsgBox(0, "Stat", "Number is lower then the number in .ini")ElseIf Number($Stat) > Number($Set1) Then MsgBox(0, "Stat", "Number higher then number in .ini")EndIf AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
TK_Incorperate Posted September 4, 2007 Author Share Posted September 4, 2007 I'm not actually using an input box in my real script, I replaced what I am really using for testing purposes, however my problem was that I was an idiot and forgot to put the .ini at the end of the file name, my bad lol. ~TK 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