Toggle the EG window (show/hide) ?

If you have a question or need help, this is the place to be.
Post Reply
skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Toggle the EG window (show/hide) ?

Post by skribb » Sun Aug 26, 2018 3:57 pm

I am now running 0.5 rc4 and have noticed that launching the exe while EG is running won't show the window, as it did on earlier versions.

I had an AHK hotkey for toggling the EG window, and I'd very much like this to work again. I could not find a global hotkey in EG to toggle the EG window.

for reference, My AHK is the following

Code: Select all

IfWinNotActive, EventGhost ahk_class wxWindowNR
	Run, C:\Program Files (x86)\EventGhost\EventGhost.exe, C:\Program Files (x86)\EventGhost
Else IfWinActive, EventGhost ahk_class wxWindowNR
	WinMinimize, EventGhost ahk_class wxWindowNR
Return

I am going to try Avoid the issue of sending keys by invoking the tray menu item via PostMessage/SendMessage and WM_COMMAND/WM_SYSCOMMAND, as per https://autohotkey.com/boards/viewtopic.php?f=6&t=31971

EIDT: minimizing the window via AHK still works, FYI.
Last edited by skribb on Sun Aug 26, 2018 10:46 pm, edited 1 time in total.
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Sun Aug 26, 2018 9:07 pm

Hmmmm. I will have to take a look.
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Sun Aug 26, 2018 10:51 pm

kgschlosser wrote:
Sun Aug 26, 2018 9:07 pm
Hmmmm. I will have to take a look.
much obliged :D
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Mon Aug 27, 2018 2:26 am

ok slap this bad larry into your EG installation. Overwrite the existing file.
Attachments
Cli.py
(6.05 KiB) Downloaded 57 times
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Mon Aug 27, 2018 6:58 pm

kgschlosser wrote:
Mon Aug 27, 2018 2:26 am
ok slap this bad larry into your EG installation. Overwrite the existing file.
EG wont start now :shock:

Code: Select all

  File "EventGhost.pyw", line 53, in <module>
  File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
    import Cli
  File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 30, in <module>
    from NamedPipe import is_eg_running
ImportError: cannot import name is_eg_running
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Tue Aug 28, 2018 3:42 am

Doah!

That's my goof. It's not a biggie. I will get a new file to ya in an hour when I get home. I must have grabbed the Client.py from a version I had been working on. Didn't know I had actually done any modifications to my installed version. I must have at some point.

Sorry about that. If you go to the downloads page you can grab the source for the version you have installed. Open up the zip and copy the client.py file into your eg folder. It will fix the issue.
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Tue Aug 28, 2018 2:22 pm

kgschlosser wrote:
Tue Aug 28, 2018 3:42 am
Doah!

That's my goof. It's not a biggie. I will get a new file to ya in an hour when I get home. I must have grabbed the Client.py from a version I had been working on. Didn't know I had actually done any modifications to my installed version. I must have at some point.

Sorry about that. If you go to the downloads page you can grab the source for the version you have installed. Open up the zip and copy the client.py file into your eg folder. It will fix the issue.
I'm a bit confused. Should I wait for a new Cli.py from you, or re-download client.py from https://github.com/EventGhost/EventGhos ... .0-rc4.zip ?
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Tue Aug 28, 2018 2:28 pm

sorry for getting this to you late. got wrapped up in something else when i got home.
Attachments
Cli.py
(5.71 KiB) Downloaded 55 times
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Tue Aug 28, 2018 4:21 pm

kgschlosser wrote:
Tue Aug 28, 2018 2:28 pm
sorry for getting this to you late. got wrapped up in something else when i got home.
YAYYYYYYYYYYYY :D
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Tue Aug 28, 2018 4:31 pm

i am assuming this
skribb wrote:
Tue Aug 28, 2018 4:21 pm
YAYYYYYYYYYYYY :D

means it works.
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Tue Aug 28, 2018 5:40 pm

kgschlosser wrote:
Tue Aug 28, 2018 4:31 pm
i am assuming this
skribb wrote:
Tue Aug 28, 2018 4:21 pm
YAYYYYYYYYYYYY :D

means it works.
I can't toggle back and forth actually (which isn't really needed in a real scenario, but while testing it, it poops out if i toggle the window repeatedly), but at least it shows the window if it hasn't been active for a while.

so yes, it works. :mrgreen:
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Tue Aug 28, 2018 6:33 pm

Yes you can toggle back and forth.


EventGhost.exe -hide
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Tue Aug 28, 2018 6:35 pm

And we are aware of an issue with the command line stuff. We are going to be releasing a new version of EG which should have that issue fixed. I can send you a test version to see if it is solved if you like?
If you like the work I have been doing then feel free to Image

skribb
Experienced User
Posts: 228
Joined: Thu Feb 12, 2015 7:22 pm
Location: Win7 64bit

Re: Toggle the EG window (show/hide) ?

Post by skribb » Wed Aug 29, 2018 9:56 pm

No what I mean is if I toggle back and forth repeatedly in quick succession, the window won't show anymore, and I have to click on some other window (or select the taskbar with the mouse) for the toggle function to "kick in" again. I think it MIGHT be a GUI bug in Win7 tho as it seems I have it with another app as well.

I've now added to my script that after minimizing EG, it selects the taskbar, so now I can toggle the EG window quickly :D

as per the below:

Code: Select all

;;;;;;  EventGhost hide/show toggle
Ins::
IfWinNotActive, EventGhost ahk_class wxWindowNR
	Run, C:\Program Files (x86)\EventGhost\EventGhost.exe, C:\Program Files (x86)\EventGhost
Else IfWinActive, EventGhost ahk_class wxWindowNR
	WinMinimize, EventGhost ahk_class wxWindowNR
	WinActivate, ahk_class Shell_TrayWnd
Return
Automation is life.

Win7 64bit
EG: v0.5.0-rc4

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Toggle the EG window (show/hide) ?

Post by kgschlosser » Wed Aug 29, 2018 11:19 pm

Ok cool. So not a bug in EventGhost. I know there is an issue with the named pipe. Which is what we use to send cli arguments to an already running eg session. It will bomb out sometimes. But you end up with an orphaned EG process when this happens.

So if you experience this we already know about the problem.
If you like the work I have been doing then feel free to Image

Post Reply