Multiple Instances Starting from Command Line Event

Found a bug in EventGhost? Report it here.

Multiple Instances Starting from Command Line Event

Postby wackyshaun » Thu Apr 14, 2011 9:38 am

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

Re: Multiple Instances Starting from Command Line Event

Postby Pako » Thu Apr 14, 2011 2:56 pm

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

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

Re: Multiple Instances Starting from Command Line Event

Postby Pako » Mon Apr 18, 2011 5:51 am

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: 1282
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Multiple Instances Starting from Command Line Event

Postby Pako » Mon Apr 18, 2011 6:50 am

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

Re: Multiple Instances Starting from Command Line Event

Postby wackyshaun » Mon Apr 18, 2011 9:00 am

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

Postby wackyshaun » Thu Apr 21, 2011 10:44 am

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

Re: Multiple Instances Starting from Command Line Event

Postby Anne28 » Tue May 17, 2011 11:17 am

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


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 1 guest