Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Multiple Instances Starting from Command Line Event

Found a bug in EventGhost? Report it here.
Post Reply
wackyshaun
Posts: 3
Joined: Thu Apr 14, 2011 9:27 am

Multiple Instances Starting from Command Line Event

Post 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?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multiple Instances Starting from Command Line Event

Post by Pako »

I confirm the same behavior.
I will try to find and eliminate the cause.

Pako
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multiple Instances Starting from Command Line Event

Post 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
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Multiple Instances Starting from Command Line Event

Post 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
wackyshaun
Posts: 3
Joined: Thu Apr 14, 2011 9:27 am

Re: Multiple Instances Starting from Command Line Event

Post 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.
wackyshaun
Posts: 3
Joined: Thu Apr 14, 2011 9:27 am

Re: Multiple Instances Starting from Command Line Event

Post 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.
Anne28
Posts: 1
Joined: Tue May 17, 2011 10:46 am

Re: Multiple Instances Starting from Command Line Event

Post 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:)
Post Reply