I'm trying to make EventGhost minimize all Windows on System.Idle and then restore them on System.UnIdle.
The problem is, when I emulate {Win+M} on System.Idle, it immediately triggers System.UnIdle. Is there a way to prevent this?
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.
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.
Prevent Emulate Keystrokes from triggering System.UnIdle
-
skeeter007
- Posts: 2
- Joined: Thu Mar 24, 2016 2:14 pm
Re: Prevent Emulate Keystrokes from triggering System.UnIdle
Are you dead set on using {Win+M} to accomplish this? If not you can download autoit and make a script for WinMinimizeAll() and another for WinMinimizeAllUndo()skeeter007 wrote:I'm trying to make EventGhost minimize all Windows on System.Idle and then restore them on System.UnIdle.
The problem is, when I emulate {Win+M} on System.Idle, it immediately triggers System.UnIdle. Is there a way to prevent this?
Once you compile them you'll have an exe file for each one and trigger them to launch on idle and unidle. I just tried it and it worked. I'm also sure there's a way to do it in python but I'm not good enough yet in that language to accomplish it.
-
skeeter007
- Posts: 2
- Joined: Thu Mar 24, 2016 2:14 pm
Re: Prevent Emulate Keystrokes from triggering System.UnIdle
Thanks DanRoss! I didn't end up using AutoIt but instead wrote 2 powershell scripts that get executed as command line actions:
minimize_all_windows.ps1:
$shell = New-Object -ComObject "Shell.Application"
$shell.MinimizeAll()
undo_minimize_all_windows.ps1:
$shell = New-Object -ComObject "Shell.Application"
$shell.undominimizeall()
Before this would work I had to start a powershell window in Administrator mode and run:
Set-ExecutionPolicy RemoteSigned
which enabled running unsigned scripts on my machine.
minimize_all_windows.ps1:
$shell = New-Object -ComObject "Shell.Application"
$shell.MinimizeAll()
undo_minimize_all_windows.ps1:
$shell = New-Object -ComObject "Shell.Application"
$shell.undominimizeall()
Before this would work I had to start a powershell window in Administrator mode and run:
Set-ExecutionPolicy RemoteSigned
which enabled running unsigned scripts on my machine.