Page 1 of 1
Multiple Instances Starting from Command Line Event
Posted: Thu Apr 14, 2011 9:38 am
by wackyshaun
Hi, I am new to EventGhost but I have searched all over the forum and haven't found this problem mentioned before.
I have an AutoHotKey script sending an event to EventGhost using the command line parameters -e option:
C:\Program Files\EventGhost\EventGhost.exe -e TV.Off
Every once in a while, though, this will start a new conflicting instance of EventGhost, which, of course, is undesirable.
I'm on Windows 7 32 bit with EventGhost 0.3.7.r1486.
Any ideas of what is going on? Any ideas for a relatively easy alternative in the mean time?
Re: Multiple Instances Starting from Command Line Event
Posted: Thu Apr 14, 2011 2:56 pm
by Pako
I confirm the same behavior.
I will try to find and eliminate the cause.
Pako
Re: Multiple Instances Starting from Command Line Event
Posted: Mon Apr 18, 2011 5:51 am
by Pako
wackyshaun wrote:Any ideas of what is going on? Any ideas for a relatively easy alternative in the mean time?
I found that this is a very specific problem and it seems that I have not sufficient knowledge and skills to solve it.
Moreover, I do not have any experience with AutoHotKey and I did not have no interest in it.
However, some workaround perhaps here is. Try to do the following:
1. Create a EventGhost
shortcut, including the argument
-e TV.off
2. In your AutoHotKey script replace the EG using just its
shortcut.
BTW - how you run EventGhost at computer startup (ie, how you run the first instance EG)?
I found that on that very matter. It is possible that you also use AutoHotKey.
If so, try to use a normal shortcut.
Please write whether this workaround works for you.
Pako
Re: Multiple Instances Starting from Command Line Event
Posted: Mon Apr 18, 2011 6:50 am
by Pako
Although some days I dealt with the problem without success,
so a few minutes after writing the last post I found a likely cause.
I think the problem lies in the fact that you are one of those two programs (EventGhost, AutoHotKey)
run as a another user (perhaps as an administrator).
Some interactions are then impossible (ACCESS DENIED reason).
Pako
Re: Multiple Instances Starting from Command Line Event
Posted: Mon Apr 18, 2011 9:00 am
by wackyshaun
Thanks for looking into it, Pako.
Although I don't think I run either application as Administrator, I do have EventGhost set to autostart which adds it to the startup menu. My autohotkey script also starts automatically in the startup folder. The difference between the two is that EventGhost's shortcut is in my user's startup folder while I put my autohotkey script in the "All Users" startup folder. I'm going to switch it to the regular user's startup folder with EventGhost and see if that fixes the problem.
If that doesn't work, I'll try using shortcuts instead of calling the program directly from the autohotkey script.
If that doesn't work, I'll try to get a way to consistently reproduce the case where it actually happens.
I'll report back my findings.
Re: Multiple Instances Starting from Command Line Event
Posted: Thu Apr 21, 2011 10:44 am
by wackyshaun
I made the change to having both scripts run at startup in my local user startup folder rather than the "all users" startup folder and I don't think I have seen this happen a single time since. I'll report back if it ever happens again, but it looks like that was likely the problem. Thanks for the help.
Re: Multiple Instances Starting from Command Line Event
Posted: Tue May 17, 2011 11:17 am
by Anne28
wackyshaun wrote:I made the change to having both scripts run at startup in my local user startup folder rather than the "all users" startup folder and I don't think I have seen this happen a single time since. I'll report back if it ever happens again, but it looks like that was likely the problem. Thanks for the help.
That's great!
i have the same problem as you thanks for the help wackyshaun:)