TrayTip plugin - v0.2.0

Questions and comments specific to a particular plugin should go here.
User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

TrayTip plugin - v0.2.0

Post by Boolean263 » Tue Aug 22, 2017 3:04 am

Version 0.2.0 released! Highlights:
  • The API has changed! Again! ShowTip()'s function signature is different. You'll probably have to delete and recreate your actions (again).
  • Specify an event suffix for TrayTip events. No more needing to check {eg.event.payload}! (You can still pass a payload if you want, though.)
  • (0.1.x) Choose an icon for your notification, or choose no icon at all.
  • (0.1.x) Optionally disable the default notification sound.
  • See the changelog for more details.
~*~*~

Me again! I just can't seem to help myself.

TrayTip is an action plugin for popping up notifications in the Windows system tray. You can specify the title and detail message to show in the notification, along with what icon to show, and whether it should play a sound.

If you click on the notification, it'll generate a TrayTip.Clicked event in EventGhost for you to act on. When you configure the action, you can also specify an event suffix to be included in the Clicked event; you'll need to do this if you want different messages to do different things when they're clicked on.

The title, message, event suffix, and payload fields are all interpreted for python code in {curly braces}.

You can pop up a notification from your own python script actions by calling eg.plugins.TrayTip.ShowTip(title, msg, event_name, payload, iconOpt, sound) directly.

Source code and full documentation: Boolean263/EventGhost-TrayTip on gitlab

Releases: will be attached to this forum post.
Attachments
TrayTip-0.2.0.egplugin
(5.32 KiB) Downloaded 63 times
TrayTip-0.1.2.egplugin
(5.16 KiB) Downloaded 44 times
Last edited by Boolean263 on Sat Sep 09, 2017 3:47 pm, edited 5 times in total.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

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

Re: TrayTip plugin - v0.0.1

Post by Luca Brasi » Tue Aug 22, 2017 8:04 am

Great man, keep them coming! :D
Just set up a notification on my laptop when my htpc is about to go to sleep. If I click the notification the sleep will be interrupted. If I hit the X the sleep will proceed.
Thanks!
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.0.1

Post by Boolean263 » Tue Aug 22, 2017 2:36 pm

Luca Brasi wrote:Great man, keep them coming! :D
Just set up a notification on my laptop when my htpc is about to go to sleep. If I click the notification the sleep will be interrupted. If I hit the X the sleep will proceed.
Thanks!
That's awesome! I'm glad you're finding it so useful. That's a neat idea!
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.0.1

Post by Boolean263 » Tue Aug 22, 2017 2:40 pm

Huge thanks also to @kgschlosser, who's already submitted four pull requests against my code, and in the process, is teaching me more about wxPython and about EventGhost's coding standards!
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

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

Re: TrayTip plugin - v0.0.1

Post by kgschlosser » Mon Aug 28, 2017 2:12 am

@ Luca Brasi

do me a favor. make up a nice little tutorial for doing that with some screen shots and post itin the tutorials section.
If you like the work I have been doing then feel free to Image

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

Re: TrayTip plugin - v0.0.1

Post by Luca Brasi » Tue Aug 29, 2017 10:17 am

kgschlosser wrote:@ Luca Brasi

do me a favor. make up a nice little tutorial for doing that with some screen shots and post itin the tutorials section.
Sure, will do as soon as I find some spare time...
Win10 x64 Prof. / Eventghost latest / MCE Plugin / MCE RC6 Receiver / Logitech Harmony Hub / MediaPortal / kodi

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.1.0

Post by Boolean263 » Sat Sep 02, 2017 3:51 pm

v0.1.0 released! See the first post for the download and highlights. Enjoy!
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 90
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TrayTip plugin - v0.1.0

Post by Neytrino-OnLine » Sun Sep 03, 2017 1:31 pm

Very coolplugin, but I have found several bugs:
• If I have chosen *.ico-file for costum icon
Image
The notification is shown with a standard app icon...
Image
If the icon is chosen from library - it is displayed correctly...
• If I open Icon choice window,
Image
And without having made a choice - I will press Ok (in notices settings window),
Image
It crushes EG...

Also: I think it would be very useful, to have control which would allow to a notification - stay in the notification center (while it will be seen by user), and maybe it is possible: not only system notices (Like updates for example) can use buttons.? (It could be very powerful way of interaction with the user)
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.1.0

Post by Boolean263 » Sun Sep 03, 2017 3:03 pm

Neytrino-OnLine wrote:Very coolplugin, but I have found several bugs:
• If I have chosen *.ico-file for costum icon
Image
The notification is shown with a standard app icon...
Image
If the icon is chosen from library - it is displayed correctly...
The standard app icon is shown as a fallback when something goes wrong with loading the icon. I've tested with icons from .EXE and .DLL files, but not from .ICO files, so I probably honked something up there. I'll look into it.
Neytrino-OnLine wrote: • If I open Icon choice window,
Image
And without having made a choice - I will press Ok (in notices settings window),
Image
It crushes EG...
Please don't do that. (: Seriously, I'll see what I can do to prevent this, but I don't know that it's possible.
Neytrino-OnLine wrote: Also: I think it would be very useful, to have control which would allow to a notification - stay in the notification center (while it will be seen by user), and maybe it is possible: not only system notices (Like updates for example) can use buttons.? (It could be very powerful way of interaction with the user)
I haven't found a way to make the notification persist in the notification center yet, nor a way of adding buttons to a notification. If you find examples of how to do that, it'd be a great help!

Thanks for your feedback!
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.1.1

Post by Boolean263 » Sun Sep 03, 2017 3:51 pm

Verson 0.1.1 is released! Download is in the first post. This release fixes both issues that Neytrino-OnLine reported: .ICO files now load properly, and the configuration dialog gets hidden while you're choosing an icon (so you can't close the configuration dialog and crash EventGhost).
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 90
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TrayTip plugin - v0.1.1

Post by Neytrino-OnLine » Sun Sep 03, 2017 4:05 pm

I confirm, Thanks!
Sin©erely yours, Neytrino.

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.1.2

Post by Boolean263 » Sun Sep 03, 2017 7:27 pm

I'm glad to hear it! Thanks for finding those bugs!

Version 0.1.2 adds a patch from topic2k (thanks!) that allows you to use path variables (like %SystemPath%) in the path to the icon. It's attached to the first post of this thread.
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

User avatar
Neytrino-OnLine
Experienced User
Posts: 90
Joined: Tue Aug 20, 2013 7:14 pm
Location: Moscow, Russia

Re: TrayTip plugin - v0.1.2

Post by Neytrino-OnLine » Mon Sep 04, 2017 5:32 pm

Hi, one more problem:
So, I make a sleep timer and I want to get notifications each 10 minutes that the PC will be switch off in XX min's... Also, if I click one of these notices - the timer should be stopped. I have set: Event payload = Sleep Timer,
Image
And if I click the notice - it is displayed in llog as event: TrayTip.Clicked u"Sleep Timer",
Image
But if I drag this event in a macro, it loses the identifier in a name - so the click according to any similar notice - will stop the timer...
Image
Sin©erely yours, Neytrino.

User avatar
topix
Experienced User
Posts: 381
Joined: Sat May 05, 2007 3:43 pm
Location: Germany
Contact:

Re: TrayTip plugin - v0.1.2

Post by topix » Mon Sep 04, 2017 7:40 pm

Thats because "Sleeptimer" is just a payload to the event "TrayTip.Clicked". You need to use a PythonScript to evaluate the payload and then do things if the right value was found.

Code: Select all

if eg.event.payload == "Sleeptimer":
I've made a pull request with changes to select between event suffix and event payload. If the pull request gets accepted, you won't need above scripting. (let's cross fingers :wink: )

User avatar
Boolean263
Plugin Developer
Posts: 81
Joined: Sat Aug 12, 2017 7:52 pm
Location: Ottawa, Canada
Contact:

Re: TrayTip plugin - v0.2.0

Post by Boolean263 » Tue Sep 05, 2017 12:50 pm

Thank you for your code contribution! I like the event suffix idea. I still like the payload, though, so I figured, why not both?

Version 0.2.0 of TrayTip is out, and attached to the top post of this thread. It leverages topic's changes to add a separate field for naming the events generated by TrayTip.

This changes the function signature for ShowTip(), so you'll probably have to delete and recreate your TrayTip actions (again). Hopefully it'll be worth it!
Windows 10 Home, version 1703, build 15063.540 · EventGhost 0.5.0-rc4 · wxPython 3.0.2.0
Python programmer for fun and profit. Dabbler in EventGhost plugin writing. Wiki gardener. General geek.

Post Reply