Jump to content

Recommended Posts

Posted

I am not a super noob but am still fairly new to autoit and can't seem to figure out why this msg box continues to loop through its self.

What I want it to do is if yes is selected (6) then it will load all the values from the INI with the function Load() and then just do nothing.

What I currently have.

Global $RunTest = IniRead("auto.ini", "config", "value1", "NotFound")

Case $RunTest > 0 & $Value1 ;asking if the value in the ini is > 0 and $Value1 = 0
                                Local $Autorun
                $Autorun = MsgBox(36, "Auto-Load", "Saved coords detected in auto.ini. Would you like me to load these?")
                    If ($Autorun = 6) Then
                        Load()
                        MsgBox(0, "Sucess", "Values Loaded.")
                        
                    ElseIf ($Autorun = 7) Then
                        ;No idea what to do if they say no yet.
                    EndIf

Maybe its that I'm not putting my script in the right place should I be putting all my other "Case" (for my gui) under the first "If ($Autorun = 6)"?

Posted

I don't know what else you have in your script but

Case $RunTest > 0 & $Value1
is not what you need.

You should try:

Case $RunTest > 0 And $Value1 = 0

That worked perfectly. I should have seen it also ><

I guess thats a good sign that staring at the same code for 3 hours is starting to get to me! Good night and thanks for all the fish!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...