Snarl

Questions and comments specific to a particular plugin should go here.
User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Tue Apr 01, 2014 4:14 pm

I think it is this:
C:\Users\<USER>\AppData\Roaming\EventGhost\gen_py\XXXXX
These are automatically generated files.
It is the result of work the module win32com.client.

Pako

joaomgcd
Posts: 17
Joined: Tue Oct 02, 2012 9:42 pm

Re: Snarl

Post by joaomgcd » Wed Apr 02, 2014 1:53 pm

So there's no chance of me getting this to work, other than to use another user? :)

User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Wed Apr 02, 2014 5:32 pm

joaomgcd wrote:So there's no chance of me getting this to work, other than to use another user? :)
I do not know if it will work, but you can try the following workaround:
At the beginning of the file pySnarl.py add the following code:

Code: Select all

# -*- coding: utf-8 -*-

from ntpath import join as _join
def join(a, *p):
    pp = []
    for b in p:
        pp.append(b.decode('utf-8'))
    return _join(a, *pp)
import ntpath
ntpath.join = join

from win32com.client import constants, gencache, Dispatch, DispatchWithEvents
Pako

Silverhawk
Posts: 16
Joined: Sun Nov 10, 2013 6:19 pm

Re: Snarl

Post by Silverhawk » Wed Apr 30, 2014 9:31 am

Finally got around to using the new Snarl plugin to update my EventGhost macro's. Running into the following issue though:

- Variables are parsed when the notification is triggered(expired/closed/invoked). However I want them to be parsed when I create the notifications instead. Any way to do this?

My old macro's use an array to keep track of all the info and link that to the notification id so I can match it when a notification is triggered. I was hoping for a solution where I would not need to use arrays anymore, and simply have the information present in the payload. However because the variables will change between creating/triggering the notification this doesn't work and I am still forced to use arrays.

Would appreciate any help on this, thanks!

User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Wed Apr 30, 2014 11:08 am

Silverhawk wrote:Variables are parsed when the notification is triggered(expired/closed/invoked). However I want them to be parsed when I create the notifications instead. Any way to do this?
Yes, the variables are evaluated at the time, when the notification is triggered.
This is by design.
However, the solution to your problem should be easy. You must use eg.event.payload or eg.result. Their values ​​are saved for each execution of the action Show notification.

Pako

Silverhawk
Posts: 16
Joined: Sun Nov 10, 2013 6:19 pm

Re: Snarl

Post by Silverhawk » Thu May 01, 2014 8:22 am

Pako wrote:
Silverhawk wrote:Variables are parsed when the notification is triggered(expired/closed/invoked). However I want them to be parsed when I create the notifications instead. Any way to do this?
Yes, the variables are evaluated at the time, when the notification is triggered.
This is by design.
However, the solution to your problem should be easy. You must use eg.event.payload or eg.result. Their values ​​are saved for each execution of the action Show notification.

Pako
Ah, that works. Thanks again.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Wed Jun 11, 2014 7:41 am

Would it be possible to make the replace parameter do an in-place replacement rather than a close and reopen for the given index, Pako? I'm working on a notification for System.Volume, and if you drag the volume slider from 0 to 100, for example, there's a lot of flickering as the notification closes and reopens 100 times.
/bw

User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Wed Jun 11, 2014 4:28 pm

It is possible that I do not understand well.
However, I believe that I have no opportunity to influence it.
Here is the API documentation for it.
You used the settings Replace UID == UID index ?

Pako

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Wed Jun 11, 2014 10:56 pm

Correct. Further investigation indicates that the replace-uid parameter currently destroys and recreates uid, while the merge-uid parameter performs an in-place modification. As a workaround, I'm now using merge-uid with the OS X style and no body text to produce the desired result.
/bw

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Sat Jun 28, 2014 3:58 am

I find that, after restarting EventGhost, I often get:

Code: Select all

Error during registration to Snarl
STATUS_CODE: ERROR_AUTH_FAILURE
Restarting Snarl whenever I restart EventGhost is my current workaround, but could the plugin be modified so this isn't necessary?
/bw

User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Sat Jun 28, 2014 5:16 am

blackwind wrote:... but could the plugin be modified so this isn't necessary ?
Yes, perhaps it would be possible.
Can you please describe the process as I can reliably induce the same situation?

Pako

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Sat Jun 28, 2014 5:58 am

End EventGhost process from Task Manager, restart EventGhost.
/bw

User avatar
Pako
Plugin Developer
Posts: 2289
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Snarl

Post by Pako » Sat Jun 28, 2014 11:17 am

blackwind wrote:End EventGhost process from Task Manager, restart EventGhost.
Yes, so unregistration is omitted.
I think that in this case I can not do anything.
This is an internal matter Snarl.
Read the section Application Passwords.
The problem is that I use the ActiveX/Com interface.
In this case, the application uses the "Application Passwords" feature by default and I can not turn it off (I do not use a password, it is done automatically - internally).
The only option is a feature request towards the author of Snarl.

Pako

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Sat Jun 28, 2014 10:50 pm

I guess this is officially dead in the water, then. The author rarely responds even to critical bug reports, and the odds of him fixing one are about on par with seeing a leprechaun riding a unicorn under a blue moon. Feature requests? Not even worth trying. :(
/bw

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Snarl

Post by blackwind » Mon Jun 30, 2014 7:38 am

Tiny addition to pySnarl.py (line 207):

Code: Select all

if icon[0] == "!" or icon[1] == ":":
This allows Snarl stock icons to be specified (such as "!system-warning").
/bw

Post Reply