[System.Idle] event is not working under certain conditions

Found a bug in EventGhost? Report it here.

[System.Idle] event is not working under certain conditions

Postby Snowbird » Thu Jul 24, 2014 12:01 pm

Hello everyone,

I have a bug that bugs me for a while and I never had the time to report it here, and now is the time :).

Ok, here's a quick information of my setup, Win7 x64 with latest version of EG 0.4.1 r1669.

I use a lot the [System.Idle] event to do many things, for example to lock my windows session after a certain time, turn off my display, and so on. What I do, is to wait for example 2 minutes of inactivity of my computer to let the [System.Idle] event Fired up by itself, and then I run the macro with all my required actions, and if in the meantime I move my mouse or type anything it resets the 2 minutes timer, and this works perfectly except under certain conditions. Some applications, for example when I'm using the "Windows Task Scheduler", even though I'm moving the mouse or typing anything within this application, the [System.Idle] event is still fired ! and it shouldn't because there is activity. There are some other applications where this behavior occurs, like Acrobat Reader for example, and some others... but in most cases all my other applications work as expected with this [System.Idle] event (ie. if there is activity, the event is not fired).

Does anyone else have this issue except me ? This bug has been around for months, maybe more.

Thank you for any help or advice you could provide.
Snowbird
 
Posts: 39
Joined: Fri Jul 03, 2009 10:04 am

Re: [System.Idle] event is not working under certain conditi

Postby orlum » Sun Oct 05, 2014 11:57 am

I found a workaround for this bug. Just generate an insignificant keyboard or mouse windows message before calling Set Idle Time.

Code: Select all
# workaround for bug "Idle/UnIdle events doesn't fire after call [Set Idle Time]"
eg.win32api.keybd_event(0, 0, 0, 0)
orlum
 
Posts: 1
Joined: Sun Oct 05, 2014 11:42 am

Re: [System.Idle] event is not working under certain conditi

Postby Snowbird » Sun Aug 23, 2015 10:04 am

Hello,

Thanks for your suggestion but it didn't work !

I have made a deeper investigation and finally find out what was causing this bug (Pako, if you're around you should read :) ).

When you run a program in "elevated" mode (run as admin), while you are using this program EG doesn't see any events that may occur in the meantime, that is why the "idle/unidle" events were not seen ! :)

You can reproduce this bug anytime with any program, here's how to do it :
- in EG set an idle timer to 3 seconds for example,
- then run "Notepad" in elevated mode (run as admin),
- then start typing a text, and, stop typing for 3 seconds or more,
>> an idle event should be generated in EG, but it won't until you switch to another program.

Is there a way to fix this bug ? we should be able to trigger an event while using a program in elevated mode.

Thanks.
Snowbird
 
Posts: 39
Joined: Fri Jul 03, 2009 10:04 am

Re: [System.Idle] event is not working under certain conditi

Postby skribb » Thu Apr 28, 2016 8:15 am

Snowbird wrote:Hello,

When you run a program in "elevated" mode (run as admin), while you are using this program EG doesn't see any events that may occur in the meantime, that is why the "idle/unidle" events were not seen ! :)

Thanks.



System.Unidle isn't registrering. This doesn't happen all the time. But a few days out of the week I notice that EG doesn't log system.unidle, or sometimes the event shows up in the log a minute later.

I'm pretty sure I'm not running anything in elevated mode from EG - or could it be that this bug appears when any program is run elevated, even if said program wasn't launched from within EG?
Automation is life.

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


Return to Bug Reports

Who is online

Users browsing this forum: Google [Bot] and 1 guest