Sign in to follow this  
Followers 0
lolp1

.INI reading problems

5 posts in this topic

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



#2 ·  Posted (edited)

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

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

#4 ·  Posted (edited)

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

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  
Followers 0