Event Ghost event launcher

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Event Ghost event launcher

Post by allalone747 » Sun May 03, 2015 6:04 pm

Hello everybody, a very good day to all forum users I seek your assistance with a project that I am trying to complete.
I am using Event Ghost to write some event which I want to launch daily that is when I boot in to windows an event would start, these events are named Monday.xml through to Sunday.xml
Therefore Monday’s event will be different from Tuesday’s and so on. It’s more refreshing seeing different dream scene, hear a different music track playing each day, different Rain meter display, and so on (daily)
Presently for me to launch an event I have to start Event Ghost the open the required event, then press the keyboard key say the F 7 key which I allocates to start the event.
What I would like to happen, is to create a file (Bat or python script which would start when windows boots up, then launch the file
I did a bat file that launch the Event Ghost program, but I am ask (Do you really want to load the tree file) - (press yes) -then I have to press a keyboard key (F7) to launch the event.

Your help will be well much appreciated, thank you

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: Event Ghost event launcher

Post by Luca Brasi » Mon May 18, 2015 8:26 am

Hi,

I think the confirmation dialog in eg only appears if eg was already running with another config when you launch the bat. So you could let it start from your bat after starting up your machine and take care that it is not started by the eg setting for autostart on boot. If you have this sorted out make sure so trigger your wanted event within eg in the autostart folder (trigger event or jump action) - no need for the F7...

On the other hand I think it would be better to handle this within eg completely. You would need a python script in the eg autostart folder which determines the weekday and then triggers and corresponding event.

Have a look here
http://stackoverflow.com/questions/9847 ... ate-python

Your script would look something like this

Code: Select all

from datetime import date
import calendar
my_date = date.today()
eg.globals.weekday = calendar.day_name[my_date.weekday()]
eg.TriggerEvent(eg.globals.weekday)
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Sem;colon
Plugin Developer
Posts: 730
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Event Ghost event launcher

Post by Sem;colon » Mon May 18, 2015 11:41 am

If you like to keep doing your F7 thing, You could do it like this within eventghost:
1. create a Folder for each action
2. In each Folder crate a macro for each day
3. assign the "F7" event to each macro in one folder
4. create a macro for each day outside the folder that has the action Aktivate Makro/Folder exclusively that points to a macro in the folder for one specific day, use the event from Luca Brasis post to trigger these macros
If you like my work, Image me a drink :wink:

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Tue Jul 21, 2015 9:23 pm

Hello again everybody it's me asking for some help here this was my previous post
Hello everybody, a very good day to all forum users I seek your assistance with a project that I am trying to complete.
I am using Event Ghost to write some event which I want to launch daily that is when I boot in to windows an event would start, these events are named Monday.xml through to Sunday.xml
Therefore Monday’s event will be different from Tuesday’s and so on. It’s more refreshing seeing different dream scene, hear a different music track playing each day, different Rain meter display, and so on (daily)
Presently for me to launch an event I have to start Event Ghost the open the required event, then press the keyboard key say the F 7 key which I allocates to start the event.
What I would like to happen, is to create a file (Bat or python script which would start when windows boots up, then launch the file
I did a bat file that launch the Event Ghost program, but I am ask (Do you really want to load the tree file) - (press yes) -then I have to press a keyboard key (F7) to launch the event.

Your help will be well much appreciated, thank you

Luca-Brasi and Semi;Colon ,please could you please send me an example of your method that you mention, i cannot get the ((create a Folder for each action)) please can you help thank you very much

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Fri Jul 24, 2015 1:28 pm

Hello everybody, good day to you all, just to update, I send in a post in May asking help on a project using event ghost, I had a reply from Luca Brasi and Semi, Colon , I have input this to event ghost did a test and good results.
from datetime import date
import calendar
my_date = date.today()
eg.globals.weekday = calendar.day_name[my_date.weekday()]
eg.TriggerEvent(eg.globals.weekday)

I cannot get it to run a macro, with the above script, please can you show me an example how I can enter this into event ghost to execute a project with these commands
If date. To date is Monday play ‪C:\Program Files\EventGhost\Psalm1.xml
If date today is Tuesday play C:\Program Files\EventGhost\Psalm2.xml
If date today is Wednesday play C:\Program Files\EventGhost\Psalm3.xml
If date today is Thursday play C:\Program Files\EventGhost\Psalm4.xml
If date today is Friday play C:\Program Files\EventGhost\Psalm5.xml
If date today is Saturday play C:\Program Files\EventGhost\Psalm6.xml
If date today is Sunday play C:\Program Files\EventGhost\Psalm7.xml
How to use (if, elif, else,) in the command for the weekdays and would it be play, or run, or launch.

Thank you for your time
Cheers

User avatar
Sem;colon
Plugin Developer
Posts: 730
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Event Ghost event launcher

Post by Sem;colon » Fri Jul 24, 2015 10:17 pm

I think you missed the most important part of my post:
Do not use one .XML per day, but use only one .XML and create folders inside the .XML for each day
If you like my work, Image me a drink :wink:

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Sat Jul 25, 2015 6:44 am

Hello good day thanks for a reply ,I did make folders for each day starting with Monday, you said (1)create a folder for each action,(2) in each folder create a macro for each day , I do'nt understand (3) assign the f7 event to each macro in one folder (4) create a macro for each day outside the folder that has the action Aktivate Makro/folder exclusively that points to a macro in the folder for one specific day, use the event from Luca Brasis post to trigger those macros. By using the python script in eventghost I enter Luca event and when I press the test icon in eventghost it return the correct day I then apply ,it appear under the autostart ,that's my macro I then create folders Monday etc ,please can you show me what you mean in you first reply 3 and 4 an example would help as I am just learning eventghost and also python thanks for your help . I could send you a image of my xml if required
cheers

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Mon Jul 27, 2015 8:20 am

Please can someone help me thanks

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: Event Ghost event launcher

Post by Luca Brasi » Mon Jul 27, 2015 9:28 am

Hi,

sorry man I lost track on how you wanna do this.
I put together an xml which you can try and which should take care of your needs if you change it accordingly.
Be aware that the script for getting the weekday returns your weekday in your local language. So you might have to change the events.

Luca
allalone747.xml
(2.19 KiB) Downloaded 185 times
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Mon Jul 27, 2015 8:18 pm

Hello, Luca,
Thank you , thank you very much for your help , This is exactly what I am talking about and you solve it, I am now creating the daily project, What I wanted is on each day event ghost will launch a different scene which includes , music, voice, and ,dream scene, then the main programs includes JARVIS (LINKS) it will then give a warmer feel to my daily computer use, for instance Monday start of a new week back to work for most people , Friday is a happier day, and Sunday, a more spiritual scene, and music to match, I hope it works,
One more thing I have to ask you would this thinking be possible?,As we know there are mostly 4 Sunday’s in a month what if I create 4 different scenes for Sunday( would it be Sunday 1 , 2,3,4 ,could event ghost launches scenes randomly, if so how could this be added to this xml that you have written for me ,I hope I am not asking too much here , anyway once again . Thank you very much for your help and I will report back this present xml work.
Cheers

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: Event Ghost event launcher

Post by Luca Brasi » Mon Jul 27, 2015 8:34 pm

This can be done pretty easily by creating four sunday macros 1..4 which reside on the same level (in one folder). Last action in each of these macros should be enabling the next one exclusively. I'd like to encourage you to figure that out by yourself so you have the chance to get into the possibilities of eg and its logic.
Just come back to me if it doesn't work. If you fire up your profiles more than once per Sunday you might need some more adjustments.
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Tue Jul 28, 2015 10:03 pm

Thanks again, I am pleased that you believe that i could solve the next riddle, (( in a folder )) that's have me already
cheers

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Thu Nov 12, 2015 1:04 pm

Hello Luca
Good day to you, i am back again, asking for your guidance with Event ghost
you send me a file that you name Allalone747.xml, great but now i am trying to add my action lines for each day , what i am having is
Activate the above if you want it run with eg start
Even tghost start but no action
Cheers
Attachments
allalone747.xml
(2.81 KiB) Downloaded 153 times

User avatar
Luca Brasi
Experienced User
Posts: 262
Joined: Sat Oct 11, 2008 12:39 pm

Re: Event Ghost event launcher

Post by Luca Brasi » Thu Nov 12, 2015 2:12 pm

I guess thats because of your local setting.
I am here in Germany and set the xml up in english.
So when I run it I get
screen_mmstation_20151112_15h05m08s.jpg
So I will have to pick the line "Main.Donnerstag" and drag it to the fitting action:
screen_mmstation_20151112_15h08m06s.jpg
After saving and restarting I will get this:
screen_mmstation_20151112_15h12m06s.jpg
screen_mmstation_20151112_15h12m06s.jpg (82.77 KiB) Viewed 7024 times
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

allalone747
Experienced User
Posts: 81
Joined: Sun May 03, 2015 2:17 pm

Re: Event Ghost event launcher

Post by allalone747 » Sun Nov 15, 2015 1:20 pm

Hello Luca
Good day ,thank you for your reply/help with my last post, i was wandering how to create a Main.Monday on a Sunday, so what i did was copy and rename
In my post on the 27 July 2015 i ask you this question
One more thing I have to ask you would this thinking be possible?,As we know there are mostly 4 Sunday’s in a month what if I create 4 different scenes to match each Sunday.Would it be Sunday 1 , 2,3,4 , Therefore Sunday 1 is pass now I am on Sunday 2 this should change to a different scene ,and so forth ,could event ghost launches scenes randomly? , if so how could this be added to this xml which you have written for me.


This was your reply in July which i am trying to follow

This can be done pretty easily by creating four sunday macros 1..4 which reside on the same level (in one folder). Last action in each of these macros should be enabling the next one exclusively. I'd like to encourage you to figure that out by yourself so you have the chance to get into the possibilities of eg and its logic.
Just come back to me if it doesn't work. If you fire up your profiles more than once per Sunday you might need some more adjustments.


I have added 4 Sunday's macro in one folder and (I think ) that i enable the next one exclusively, please can you have a look at this sample i attached as the results is I am getting all the macros loading, am I on the right track?
one more Q.. The time is {TIME} and this date is {DATE} this in text to speech reads the time is hour colon minutes colon and the date is 15 November 2015 how can i get rid of hearing the colon

Thank you

Cheers : :|
Attachments
mygorge.xml
(4.89 KiB) Downloaded 151 times

Post Reply