Jump to content

.INI reading problems


lolp1
 Share

Recommended Posts

Well, here is my problem..

I am trying to call a program, here is what I got:

$test = IniRead("hotkey.ini", "hotkey", "plugin1", "");
;=====================================================
;  Loading Plugins!
;=====================================================
If $test = "yes" then;
   Run("plugintest.exe")
        ElseIf $test = "no" then;
            endif

Here is how my .ini looks

[Hotkeys]

plugin1=yes

For some odd reason, it wont run the plugintest.exe , yes it is in the same folder, any ideas?

Link to comment
Share on other sites

Try this real quick.

$test = IniRead("hotkey.ini", "hotkey", "plugin1", "NotFound")
If $test = "yes" then
Run("plugintest.exe")
Else
sleep(2)
endif

Or it could be the path:

$test = IniRead("hotkey.ini", "hotkey", "plugin1", "NotFound")
If $test = "yes" then
Run(@ScriptDir & "\plugintest.exe")
Else
sleep(2)
endif

Note: You can change sleep(2) into MsgBox(4096,"Warning","Whatever error you want.")

Edited by gnosis3d
Link to comment
Share on other sites

Nope, neither solution work. If I use use run("blahblah.exe") it works, so I don't believe it's the path.

Hate to ask but... Is there a problem with plugintest.exe? If another executable works, then it narrows the problem down I would think.

EDIT: in the .au3 it says "hotkey", in the INI you pasted it says "Hotkeys".

Edited by gnosis3d
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...