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.

Shutdown Notifier

Questions and comments specific to a particular plugin should go here.
Post Reply
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Shutdown Notifier

Post by kgschlosser »

Shutdown Notifier
v0.1.0b

This Plugin generates 2 events
ShutdownNotifier.SystemShutdown
ShutdownNotifier.LogOff

There are 2 actions. one to block the logoff and the other to block the shutdown. those actions will only work with the matching event. It's a pretty simple plugin.
Attachments
ShutdownNotifier-0.2b.egplugin
(8.51 KiB) Downloaded 58 times
ShutdownNotifier-0.1b.egplugin
(8.49 KiB) Downloaded 49 times
If you like the work I have been doing then feel free to Image
User avatar
topix
Experienced User
Posts: 441
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: Shutdown Notifier

Post by topix »

I found two problems when i tried the plugin (Win 10, build 1809):
  • When the plugin is added and the macros automatically added, the Block Shutdown action has no default value for reason. Running that macro/action results in an error.

    Code: Select all

    Traceback (most recent call last) (0.5.0-rc6):
      File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
        return self(*args)
    TypeError: __call__() takes at least 2 arguments (1 given)
  • Removing or disabling the plugin throws an error:

    Code: Select all

    Traceback (most recent call last) (0.5.0-rc6):
      File "wx\_core.pyc", line 16766, in <lambda>
      File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 442, in LogItWrapper
        return func(*args, **kwargs)
      File "C:\ProgramData\EventGhost\plugins\ShutdownNotifier\__init__.py", line 202, in unregister_notification
        handler=self.OnQueryEndSessionVista
    AttributeError: 'ShutdownNotifier' object has no attribute 'OnQueryEndSessionVista'
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shutdown Notifier

Post by kgschlosser »

OK i can fix that
If you like the work I have been doing then feel free to Image
*Roma*
Posts: 2
Joined: Thu Mar 13, 2008 5:13 pm

Re: Shutdown Notifier

Post by *Roma* »

kgschlosser

Can't download the latest version.
Please upload ShutdownNotifier-0.2.0b.egplugin again.

Thanks
nYce
Posts: 48
Joined: Wed Mar 28, 2018 2:29 am

Re: Shutdown Notifier

Post by nYce »

i could need the last version of that plugin too
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shutdown Notifier

Post by kgschlosser »

OK i re uploaded the plugin.
If you like the work I have been doing then feel free to Image
*Roma*
Posts: 2
Joined: Thu Mar 13, 2008 5:13 pm

Re: Shutdown Notifier

Post by *Roma* »

topix wrote: Sat Jan 19, 2019 8:05 pm I found two problems when i tried the plugin (Win 10, build 1809):
  • When the plugin is added and the macros automatically added, the Block Shutdown action has no default value for reason. Running that macro/action results in an error.

    Code: Select all

    Traceback (most recent call last) (0.5.0-rc6):
      File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
        return self(*args)
    TypeError: __call__() takes at least 2 arguments (1 given)
  • Removing or disabling the plugin throws an error:

    Code: Select all

    Traceback (most recent call last) (0.5.0-rc6):
      File "wx\_core.pyc", line 16766, in <lambda>
      File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 442, in LogItWrapper
        return func(*args, **kwargs)
      File "C:\ProgramData\EventGhost\plugins\ShutdownNotifier\__init__.py", line 202, in unregister_notification
        handler=self.OnQueryEndSessionVista
    AttributeError: 'ShutdownNotifier' object has no attribute 'OnQueryEndSessionVista'
kgschlosser

Please upload version 0.2.0b , that includes the fix for the problems that mentioned by topix.


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

Re: Shutdown Notifier

Post by kgschlosser »

sigh.... I know there was a 0.2 I cannot locate it on my system I did not know if i made the changes and did not change the version number.. so i guess I did not make the changes.. give me a few to update the code and post it again.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shutdown Notifier

Post by kgschlosser »

OK i have uploaded an updated version of the plugin. I do not remember exactly what i did for a fix in version 0.2b so if someone happens to have that version of the plugin installed if they can attach it to a post that would be most helpful..

to export the plugin click on "Add Pluigin" then locate the plugin in the lest on the left.. right click the plugin and click on "export" it will ask you where you ant to save it. once you are back to the "Add Plugin" dialog simply cancel/close it.. the .egplugin file is going to be saved where you told the export to save it.. then attach it to a post.

Any assistance would be greatly appreciated..

Again I have uploaded a modified version. I do not know if the modifications are the same as what i did last time.
If you like the work I have been doing then feel free to Image
stephen0804
Posts: 2
Joined: Sat Jun 01, 2019 8:41 am

Re: Shutdown Notifier

Post by stephen0804 »

im using eventghost 0.4.1.r1722 on Windows 10, not sure if I'm using this plug-in properly? Is it supposed to completely stop the shutdown or what? Because when i set it up and click shutdown it goes to the shutdown screen saying that eventghost is preventing shutdown is that what should be happening?.

What I'm trying to accomplish is that when i click start shutdown i want it to prevent the shutdown do some other things then continue the shutdown.
any help would be great.

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

Re: Shutdown Notifier

Post by kgschlosser »

This is designed to block a shutdown or logoff. But it can be used in a manner that would suit you because it does generate a shutdown event. and in that event you can add the block shutdown to stall the shutdown. and after that put in place any actions you want to run and the last action would be the shutdown action from the System plugin.
If you like the work I have been doing then feel free to Image
matejdro
Posts: 38
Joined: Wed Jul 21, 2010 9:58 am

Re: Shutdown Notifier

Post by matejdro »

Is there a way to manually clear the shutdown block after necessary actions are performed?

It appears only timeout clears the block.
Post Reply