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.

simple task to wake up monitor - screen saver

If you have a question or need help, this is the place to be.
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

Log.txt
debug log
(318.35 KiB) Downloaded 73 times
eglog2.txt
interface log
(4.72 KiB) Downloaded 81 times
forgot debug. reran with -debug. attaching log again and debug log.
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

ok lets start from scratch...


only do these steps.


install the process watcher plugin
copy the xml code that is at the bottom of this post
open the screen saver dialog in Windows (not EG) and click on any screen saver. then click on preview.

I redid how this is organized. i added a macro for each of the default Windows screen savers.

I am not sure when you are trying to shutdown the screen saver. but this is just as an example to show you how to do it.

The purpose for the Wait is so that there is a screen saver to locate we are using process watcher simply to trigger the macro. you can use whatever event you like. The reason why you can remove the Wait is because this is needed when using the process watchiong to trigger the macro. this is because the event for the screen saver will come in before the screen saver actually starts. when you click on the preview button in Windows it will reate a process. this will cause the event to get triggered in EG. but the macro will run through before windows gets the chance to start the screen saver thus causing the FindWindow not to locate it. the Wait simply causes the macro to wait for 1 second. and in that 1 second Windows is able to start the screen saver before the Find Window action gets run. this way Find Window will be able to locate it.

the Wait action can be removed if a different event is used to run the macro.

so leave it as is for the moment.
and simply click on the preview button.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4">
    <Folder Name="Screen Saver Shutdown" XML_Guid="{77A3843D-73AD-4F62-AA90-A619D871EEF2}" Expanded="True">
        <Macro Name="Bubbles" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.Bubbles" XML_Guid="{893915E5-F60D-435A-A5A1-AB803ACB7324}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'Bubbles.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
        <Macro Name="scrnsave" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.scrnsave" XML_Guid="{A1629893-5807-48C4-849B-12145AFF943B}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'scrnsave.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
        <Macro Name="ssText3d" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.ssText3d" XML_Guid="{25F9E9D8-9C4E-4AFF-93CD-52272A31B028}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'ssText3d.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
        <Macro Name="Ribbons" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.Ribbons" XML_Guid="{0780A1FB-97F0-4254-823D-FDC6F66B3075}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'Ribbons.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
        <Macro Name="PhotoScreensaver" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.PhotoScreensaver" XML_Guid="{3B286B5E-2829-4AF0-8A11-1F5F8783F74C}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'PhotoScreensaver.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
        <Macro Name="Mystify" XML_Guid="{83271B15-D88B-43D0-A754-1DEBF6A8BD43}">
            <Event Name="Process.Created.Mystify" XML_Guid="{68A9A468-B68E-4D32-8BEB-97F7C4B1A9EF}" />
            <Action XML_Guid="{F9B12AE7-DFBB-460B-9B29-A93A7378DECE}">
                EventGhost.Wait(1.0)
            </Action>
            <Action XML_Guid="{888CB011-0C8D-4E15-9F15-DD62F7B293D1}">
                Window.FindWindow(u'Mystify.scr', None, None, None, None, 1, True, 1.0, 0)
            </Action>
            <Action XML_Guid="{EB5FD277-B65F-42AB-84F1-279F8D2B568D}">
                Window.SendKeys(u'{Space}', False, 2)
            </Action>
        </Macro>
    </Folder>
</EventGhost>
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

ok, this code works to do as you say.

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

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

this was set up merely as a test to make sure it functions the same on windows 10. so to move it to a production state we will have to do a couple of simple things.

first thing is go into your windows 10 screen saver choices. and see if there are any choices in there that are not in the list i provided above. if there are any you will need to preview each one of them. the process watcher plugin will generate a Created event for each one... in that event will be the name of the process. write those names down with .scr at the end. case sensitive. once you have that done you will copy one of the existing macros for turning off the screen saver and paste it into the same folder. you will edit the FindWindow action and change the Program name to match one of the names you wrote down. and also I would rename the macro to match as well.

You will want to repeat this for each of the process names you wrote down. if you do not have any then BONUS. move on to the next step. I am having you do this so that if for some reason you decide you hate looking at the bubbles and change the screen saver EG will still shutdown the screen saver for ya.. because if you change the screen saver a year from now you may not remember what ya did to make it work and then you will have to spend some time going back over this again so better to just cover the bases now..

next step:

I do not know what event it is that takes place that you want to stop the screen saver but make note of that event

so in order for you to make this work in your production EventGhost. you will need to take whatever event it is that you want to trigger the turning off of the screen saver and either drag and drop it into each one of the macros or if you know the event, edit the existing events that are in there and type/paste that name into those events. if you are doing the drag and drop method then you will need to delete the existing events. You will also need to delete the Wait actions in each of the macros (this action was only needed for the test because of a timing thing) and if you do not use the process watcher plugin for anything then you can remove that as well because this was only needed for the test..

once you have this done. go ahead and save your eg tree and if you can cause your computer to perform the tasks that would make the macro work. then give it a go. and if not. you will have to wait until your computer does it..

and now you should be good to go..

I am going to give you a little tutorial as to what is going on here. I do this so you will be armed with the knowledge of exactly what is going on and you will be able to create other macros with success.

I am pretty sure that you understand the whole event/macro/action topology. so I am going to explain the 2 actions.
The find window action does exactly what it states.. it goes and finds a window. there are a bunch of different ways to locate the specific window you are looking for. I want to go a little in depth of how this action works because it is hands down the most powerful action in the EG arsenal for controlling your PC. The term window is used to describe the action and what you or I would normally think it is referring to is the program you want to find.. this is true.. however it really means find a Window class item. let me explain. there is a chunk of code in MS Windows that is written to handle drawing things to your screen. it is not keyed to a specific item on your screen. but it is designed to be a base for the things that are drawn. and that base can be added onto for the various things you see on your screen... So if you wanted to say press the enter button that is inside of a program that is running. you would not simply locate the program.. the button uses that window base and then adds to it.. so you will actually want to find that specific button.. this is where it gets a little hairy because you have have a base inside a base inside a base and then your button so sometimes you may have to do some digging. or you can sue that target deal to isolate the specific button.

when you find the control it is that you want to use. there is a handle or a unique number associated to that item. the only thing that find window action is it retrieves that number. the more specific you are with your search parameters the small the list of possible numbers it will find. ideally you will try to only have it grab one. the specific control you are looking for. once it has that number any action that is in the Window group it will automatically be passed this number if you have the Find Window action before it and that includes the Send Keys action. so if you wanted to click on an OK button.. you would locate that specific button and then use Send Keys to press the enter button. that key press will only be visible to that OK button and nothing else (hopefully) and there ya go you just pressed a specific ok button. this can be done for drop down menus.. sending up and down keystrokes or the alt + hotkey once the menu is open to select a specific menu option. I do want to note that you do not have to have the program be visible or in the foreground for this to work. there is one exception to this.. some programs will destroy their UI if it is minimized. in this case you will have to have it open but not in the foreground.

The reason why just sending the keystrokes before did not work was because the Send Keys action didn't have a specific handle to send to. so it simply send it to whatever has focus. just because the screen saver is running does not mean that it is the program that has focus. it is simply the one that is drawing to your screen. so when you sent the keystrokes it was sending them somewhere else.


I hope I didn't go over the top here and confuse ya at all.. and if i did please let me know. this is also hands down the most difficult action to understand also. it took me a long time to wrap my bean around it. I am still working on the best instruction of what it does. and how to use it. (doing this without going crazy geek speak is very difficult). but let me know if you are successful and also if the above tutorial helped.

K
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

Wow, thanks. May be more than I can process at once but I do appreciate the information. Probably have to go back and read a couple of times.

I think I did what you said - added my trigger to each screensaver event, disabled the wait. Tested trigger and it never seems to find the window. I am using the 3dtext. Going to try another one to see if I get same result. 18:08:20 HTTP.ST.DummySwitch.switch.on [] is my trigger to turn it off (screensaver)

18:07:55 Process.Created.SearchFilterHost
18:08:12 HTTP.ST.DummySwitch.switch.off []
18:08:12 Shutdown Monitor
18:08:12 Start Screensaver
18:08:12 Process.Created.ssText3d
18:08:12 ssText3d
18:08:12 Find Window: ssText3d.scr
18:08:14 Process.Created.tvnserver
18:08:14 Process.Destroyed.tvnserver
18:08:20 HTTP.ST.DummySwitch.switch.on []
18:08:20 scrnsave
18:08:20 Find Window: scrnsave.scr
18:08:21 ssText3d
18:08:21 Find Window: ssText3d.scr
18:08:22 Ribbons
18:08:22 Find Window: Ribbons.scr
18:08:23 PhotoScreensaver
18:08:23 Find Window: PhotoScreensaver.scr
18:08:25 Mystify
18:08:25 Find Window: Mystify.scr
18:08:26 Bubbles
18:08:26 Find Window: Bubbles.scr
18:08:32 Process.Destroyed.ssText3d
18:08:32 Process.Created.tvnserver
18:08:32 Process.Destroyed.tvnserver
18:08:37 Process.Created.svchost
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

yea same thing. tried bubbles. last event is Find Windows Bubbles.scr
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

what you have posted for information can you do me a favor? could you put a [ code ] before it and a [ /code ] after it.. no spaces in those. and if you go into the view drop down menu at the top of EG make sure that these items are checked, log macros, log actions, indent log and timestamp log.


it will be easier for me to understand what is what. but it looks as tho from the log data you posted it seems as tho you did not change the event out in the ssText3d macro. because i see the Process.Created.ssText3d. which tells us that the screen saver started. then right after it is 18:08:12 ssText3d which is the name of the macro i believe. the only way this would happen is if there is an event in the macro for Process.Created.ssText3d the wait it disable in the action because the next thing that gets fired off is 18:08:12 Find Window: ssText3d.scr which is the find window. remember how i told you about the timing thing and the reason why the wait needed to be there???. it could be that you also still have to have it be there. if you are using the process watcher to shutdown the screen saver then you will have to keep the wait in there. if you are not using the process watching to do it and you are using some other means then you do not have to have the wait in there. but there has to be sufficient amount of time between the screen saver starting and the macro getting run. this is due to a process getting created.. but the window has not get been drawn so if there is no window then the find window is not going to be able to locate it. maybe it is safer to leave the wait action in there you can trim back the time to 0.50 if ya like I am sure that would be able amount of time.
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: simple task to wake up monitor - screen saver

Post by kgschlosser »

why don't you do this. zip up your EG save file and send it to me in a PM. then i can have a look at it and see what you are trying to do.. I think that may be easier.. it's up to you.
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

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

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

sent back to ya
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

got your file. sorry i did miss disabling that processs. used your file and no difference. i changed to 3dtext.
you can see below 5 seconds after i moved the mouse and the process terminates. 06:42:48 Process.Destroyed.ssText3d

06:41:49 ---> Welcome to EventGhost <---
06:42:22 HTTP.ST.DummySwitch.switch.off []
06:42:22 Shutdown Monitor
06:42:22 Start Screensaver
06:42:22 Process.Created.ssText3d
06:42:23 Process.Created.tvnserver
06:42:23 Process.Destroyed.tvnserver
06:42:35 Process.Destroyed.backgroundTaskHost
06:42:42 HTTP.ST.DummySwitch.switch.on []
06:42:42 ssText3d
06:42:42 Find Window: ssText3d.scr
06:42:43 Ribbons
06:42:43 Find Window: Ribbons.scr
06:42:44 PhotoScreensaver
06:42:44 Find Window: PhotoScreensaver.scr
06:42:46 Mystify
06:42:46 Find Window: Mystify.scr
06:42:47 Bubbles
06:42:47 Find Window: Bubbles.scr
06:42:48 Process.Destroyed.ssText3d
06:42:48 Process.Created.tvnserver
06:42:48 Process.Destroyed.tvnserver
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

I do not understand what you are trying to do.. the moving of the mouse is not the event that is triggering the screen saver to get turned off. and if you are trying to disable the screen saver when the monitor is not on it will not work because the screen saver does not run when the monitor is off. well it is running but the program knows that the monitor is off and because there is no need to have the screen aver running it destroys the window when windows tells it the monitor is on then it recreates the window.


if you explain the purpose to the macro maybe i will have a better understanding of what you are trying to accomplish.

it seems to me that when you turn a light on in a specific room then you want to stop the screen saver... but to do this the monitor will have to be turned on first.
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: simple task to wake up monitor - screen saver

Post by kgschlosser »

ok do this. disable all of those other macros. and paste the code below into your tree. lets see what happens

I made a python script that is going to turn the monitor on and then it is going to wait for a few seconds. then it is going to run through locating each of the screen savers 2 times only stopping if it has found it or it is finished running through them 2 times.
if this works then i am going to remove the wait and set it so that it will run through the list of screen saves something like 5 times. it only takes a 1/2 a second each time it runs through the list of them


Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4" Guid="{5EE4F107-2AA3-4802-8DB8-604BD73F8D36}" Time="1501852367.14">
    <Macro Name="Screen Saver Shutdown" XML_Guid="{9D5C93F0-87B3-4ED4-9A7C-870C6762DE34}" Expanded="True">
        <Event Name="HTTP.ST.DummySwitch.switch.off" XML_Guid="{893915E5-F60D-435A-A5A1-AB803ACB7324}"/>
        <Action XML_Guid="{BD07F278-BFEB-4621-85B8-C14829AD941C}">
            EventGhost.PythonScript(u"eg.plugins.System.MonitorPowerOn()\neg.plugins.EventGhost.Wait(3.0)\n\ncount = 0\n\nscreen_savers = [\n 'Bubbles.scr',\n 'scrnsave.scr',\n 'ssText3d.scr',\n 'Ribbons.scr',\n 'PhotoScreensaver.scr',\n 'Mystify.scr'\n]\n\nwhile not eg.result and count <= 11:\n if count > 5:\n screen_saver = screen_savers[count - 6]\n else:\n screen_saver = screen_savers[count]\n eg.plugins.Window.FindWindow(screen_saver, None, None, None, None, 1, True, 0.1, 2)\n count += 1\n\nif eg.result:\n eg.plugins.Window.SendKeys(u'{Space}', False, 2)\n \n\n")
        </Action>
    </Macro>
</EventGhost>
If you like the work I have been doing then feel free to Image
scottsams
Experienced User
Posts: 55
Joined: Fri Jul 07, 2017 9:59 pm

Re: simple task to wake up monitor - screen saver

Post by scottsams »

kgschlosser wrote:I do not understand what you are trying to do.. the moving of the mouse is not the event that is triggering the screen saver to get turned off. and if you are trying to disable the screen saver when the monitor is not on it will not work because the screen saver does not run when the monitor is off. well it is running but the program knows that the monitor is off and because there is no need to have the screen aver running it destroys the window when windows tells it the monitor is on then it recreates the window.


if you explain the purpose to the macro maybe i will have a better understanding of what you are trying to accomplish.

it seems to me that when you turn a light on in a specific room then you want to stop the screen saver... but to do this the monitor will have to be turned on first.
hey, thanks again. so i know i have been bouncing around with this so let me reset with you on my intent. you are correct - this PC will be a Home Automation panel running a web interface. in my kitchen i have a motion detector that turns on my under cabinet lights. i will also use this "switch" to activate the HA panel so when you are in the kitchen it is displayed. when no activity is detected i want to EITHER turn monitor off or activate screen saver. i don't care which one as they both accomplish the same thing. that part works. EITHER one. as you know, getting monitor to turn back on with activity OR stop the screen saver has not worked. so my macro names have turn off / turn on monitor but those functions are disabled (i thought you see that in the code but never checked myself if it shows that). right now only thing enabled is what you told me and screen saver functions. make sense? once again, whichever we get working first is what i will use. i am ok with whichever one you are willing to help me tackle. screen saver or monitor on/off.

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

Re: simple task to wake up monitor - screen saver

Post by kgschlosser »

ok so here i go with hammering you with some questions. The screen that is going to be attached what is it? make and model.. I am assuming it is going to be a small touch screen of some kind. well we need to find out if it supports controlling the power state. in eg 0.5 the monitor being powered off is done by Windows. EG simply Sends a command to Windows to power down the display. to turn the display back on we have to use a different method because simply sending a command to turn the display back on Microsoft broke somewhere in the development of Windows 8 and has not seen a need to fix it. even in the release of Windows 10 LOL. so what EG tells Windows to do in order to power the monitor back on is to move the mouse 1 pixel. This has been reported as working properly.

You are going to need to have the display hooked up that you will be using... and you also will need to be testing the event from that screen and not an RDP session as this is going to cause all kinds of issues with trying to control a display.

If by some chance the display you are going to be using does not support the ability to set it's power state I have just added a nice little bit of code to the Coding Corner thread. this might be the ticket for you. I am almost certain it is the solution to all of your problems. LOL if you go and download that attached file and place that file in your eg\Classes folder in your EG installation directory and paste the code below into your tree this will fix the issue..whether you are logged in via an RDP session or not. :D


ok so here are the instructions.

go and download the file attached to this post.
viewtopic.php?f=10&t=9767

put the file in your eg installation\eg\Classes folder
start EG and then copy and past the code below into your tree.
give it a try.

**NOTE you will not need to have any power saving turned on inside of windows for the display nor will you have to have a screen saver.

I can add upon this so that if you connect with an RDP session it will turn on the display (so you will be able to see the desktop in the rdp session) but also so it will not blackout the display when you are in an rdp session. and if you are in an rdp session and the switch is in the off state once you end the rdp session it will blackout the display. but before I add these things we need to make sure this is going to do the job for ya.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="0.5.0-rc4" Guid="{5EE4F107-2AA3-4802-8DB8-604BD73F8D36}" Time="1501852367.14">
    <Folder Name="Display Blackout" XML_Guid="{5EF73764-95C1-4FC6-A23A-C897E479651D}" Expanded="True">
        <Macro Name="Display Blackout Off" XML_Guid="{512BEA4F-6AE7-442C-A35A-A73CBC3F08B1}">
            <Event Name="HTTP.ST.DummySwitch.switch.on" XML_Guid="{10A19873-FA79-40F4-8395-F3DA4712BEA5}" />
            <Action Name="Blackout Off" XML_Guid="{9A62027A-8840-4099-B6A7-B57F005E4B54}">
                EventGhost.PythonScript(u'display = eg.DesktopDisplay.GetDisplay(0)\n\nif display.blackout:\n    display.blackout = False\n    ')
            </Action>
        </Macro>
        <Macro Name="Display Blackout On" XML_Guid="{5D90EB1B-DA40-4E3A-8C29-BA74324B1B5A}">
            <Event Name="HTTP.ST.DummySwitch.switch.off" XML_Guid="{AF66EEE0-592A-4CCC-8B36-DFA09ADECC8F}" />
            <Action Name="Blackout On" XML_Guid="{162BD3AF-1E95-4D7C-AB71-743EA7CA2AB4}">
                EventGhost.PythonScript(u'display = eg.DesktopDisplay.GetDisplay(0)\n\nif not display.blackout:\n    display.blackout = True')
            </Action>
        </Macro>
    </Folder>
</EventGhost>
If you like the work I have been doing then feel free to Image
Post Reply