Jump to content
Sign in to follow this  
lolp1

.INI reading problems

Recommended Posts

lolp1

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?

Share this post


Link to post
Share on other sites
gnosis3d

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

Share this post


Link to post
Share on other sites
lolp1

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

Share this post


Link to post
Share on other sites
gnosis3d

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

Share this post


Link to post
Share on other sites
lolp1

I got it working with a bit of mixture of the various idea you gave me, thanks :)

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.