I'm using 0.3.7.r1194 on Vista SP2. I'm trying to execute a macro when I shutdown the computer. (the one called shutdown in the picture). When I execute the macro manually, it works fine, but it doesn't get executed on shutdown. Can anybody tell me why, and how to fix it??
Best Regards
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.
System.OnEndSession not working for some reason???
Re: System.OnEndSession not working for some reason???
Maybe try adding a wait (for a second or two) in the macro?
It looks like the code will send the event, then wait for the event to finish before closing things down. I think that the USB-UIRT plugin is threaded, so it is possible it starts to send the signal but then returns before the signal is sent. If that is the case, the "closing things down" may be happening before/during the USB-UIRT transmit.
Can't say for sure that will work, but it's worth a shot.
Brett
It looks like the code will send the event, then wait for the event to finish before closing things down. I think that the USB-UIRT plugin is threaded, so it is possible it starts to send the signal but then returns before the signal is sent. If that is the case, the "closing things down" may be happening before/during the USB-UIRT transmit.
Can't say for sure that will work, but it's worth a shot.
Brett
Re: System.OnEndSession not working for some reason???
I tried putting a 2 sec delay in the end of the macro, but it has no effect at all. It seems like the macro is not even being triggered by the event "System.OnEndSession", but I can't figure out why. Any suggestions any one?????
Best Regards
Max
Max
Re: System.OnEndSession not working for some reason???
Are you sure the event is firing in the first place? Does it appear in the log?
That event is tied to the wx event EVT_END_SESSION, and checking this page, that event should be triggered when you log out of windows. Are you looking for an event that runs when EG is closing?
Brett
That event is tied to the wx event EVT_END_SESSION, and checking this page, that event should be triggered when you log out of windows. Are you looking for an event that runs when EG is closing?
Brett
Re: System.OnEndSession not working for some reason???
Well I can't see it because the computer is shutting down, and the log gets cleared, so I don't know. But Yes I'm looking for some event, that can trigger when the I shutdown the computer or secondary when the application is closed, but I'd prefer the shutdown event, since I could otherwise trigger the macro If i restarted the application.
But anything will do at the moment:-)
The System.OnEndSession was described in an other post here, so I tried it, but as noted it doesn't seem to work for some reason I that I can't figure out.
Any suggestions anyone??????
But anything will do at the moment:-)
The System.OnEndSession was described in an other post here, so I tried it, but as noted it doesn't seem to work for some reason I that I can't figure out.
Any suggestions anyone??????
Best Regards
Max
Max
Re: System.OnEndSession not working for some reason???
Perhaps I should reformulate the question.
I'm looking for an event, that I can use to trigger a macro (that can turn off some stuff) when I turn off my computer. The event should occur when EventGhost exits or preferably when the computer shuts down.
I've tried using System.OnEndSession without success.
Is this possible???????????
I'm looking for an event, that I can use to trigger a macro (that can turn off some stuff) when I turn off my computer. The event should occur when EventGhost exits or preferably when the computer shuts down.
I've tried using System.OnEndSession without success.
Is this possible???????????
Best Regards
Max
Max
Re: System.OnEndSession not working for some reason???
You could try running EG with the -debug switch. That will write out the log (plus some extra messages) to a file. Then, even if you can't see the messages in the EG screen, you can see what events occur from the log text file.
Brett
Brett
Re: System.OnEndSession not working for some reason???
Thank you very much for the advice Stottle (though I probably should have thought of that as the first thing
). After playing a bit Around with the events in the debug log I found that:
Main.OnClose - will fire when the app is closed. and
Main.OnEndSession - will fire when Vista shuts down.
Hopes this helps someone else
Main.OnClose - will fire when the app is closed. and
Main.OnEndSession - will fire when Vista shuts down.
Hopes this helps someone else
Best Regards
Max
Max
Re: System.OnEndSession not working for some reason???
Thank you, it did with Windows 7 as well.Main.OnEndSession - will fire when Vista shuts down.
Hopes this helps someone else