OSM (On Screen Menu)

Questions and comments specific to a particular plugin should go here.
User avatar
WharfRat
Experienced User
Posts: 159
Joined: Wed Dec 25, 2013 11:56 am

Re: OSM (On Screen Menu)

Post by WharfRat » Fri Sep 19, 2014 8:35 am

Thanks Pako...

I can think of an example where that could be useful: displaying the menus of other computers on the LAN.

I have set up a configuration before where I can control one computer from another.
But what always bothered me is that I had to be able to see the menu on the other computer.
That is not ideal, because it might not always be possible to do so.

I want to explore this scenario further.
Since it involves other plugins as well, I think a separate topic will be more suitable.
I will leave a link to that topic here once it is established.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)

User avatar
WharfRat
Experienced User
Posts: 159
Joined: Wed Dec 25, 2013 11:56 am

Re: OSM (On Screen Menu)

Post by WharfRat » Sat Sep 20, 2014 12:33 pm

Pako,

I created a topic in the General Forum about OSM over a LAN.

Another benefit of creating the menu this way is it saves me from having to place menus in contexts.

This Action seems to have a lot of potential.
EventGhost 0.4.1.r1640
PHX01RN plugin v3.0.1
Windows XP 32bit (v5.1 Build 2600 Service Pack 2)
Windows7 64bit (v6.1 Build 7601 Service Pack 1)

ttplayer
Posts: 4
Joined: Tue Sep 24, 2013 7:58 am

Re: OSM (On Screen Menu)

Post by ttplayer » Sun Dec 21, 2014 9:35 am

Hello,
I'm using the osm-Plugin for a Long time without any Problems. Since I've switched my operating System from Win7 (x386) to Win 8.1 (x64) osm didn't work anymore with this error-message in the eventghost log.
I've reinstalled eventghost 3 times, with no luck. Has everyone an idea what's going wrong?
Thanks in advance. TTPlayer
Traceback (most recent call last) (1669):
File "C:\Program Files (x86)\EventGhost\plugins\OSM\__init__.py", line 687, in OnButton
focus.GetValue(),
AttributeError: 'bool' object has no attribute 'GetValue'

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

Re: OSM (On Screen Menu)

Post by Pako » Sun Dec 21, 2014 5:28 pm

I do not have the opportunity to try 8.1 yet.
As soon as I will have it available, I'll try it.

Pako
You know flattr ? You can Image

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

Re: OSM (On Screen Menu)

Post by Pako » Tue Dec 23, 2014 3:04 pm

I found that this bug is not tied to the operating system 8.1.
And I also found that it does not prevent the normal function of the plugin.
This causes only that the Test button in the dialog "Show menu" does not work.
But even so, I thank you for reporting this issue.

Pako
You know flattr ? You can Image

ttplayer
Posts: 4
Joined: Tue Sep 24, 2013 7:58 am

Re: OSM (On Screen Menu)

Post by ttplayer » Sun Dec 28, 2014 12:11 pm

Thank you for your answer Pako. Now I've found my Problem.
There was an unusual behaviour of my Harmony Remote which prevents osm from working regularly. My first thougt was, that this is an osm Problem while Pressing the osm-test-button in EG Shows this error. So I hadn't done further investigations.

ttplayer

jonib
Plugin Developer
Posts: 1280
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: OSM (On Screen Menu)

Post by jonib » Sun Feb 01, 2015 2:15 pm

So I'm trying "OS Menu: Show menu, created from expression" for the first time and of course I'm trying to use in a way it wont work. :cry:

When I select a entry in the menu I would like to get this URL: "plugin://plugin.video.youtube/play/?video_id=JvK0Q17808g" in a payload.

Problem is whatever I try, I get this as an event and payload: plugin://plugin.video u"youtube/play/?video_id=JvK0Q17808g"
Anyway to escape the periods in the URL but still get the proper URL in the payload?

Thanks
jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

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

Re: OSM (On Screen Menu)

Post by Pako » Sun Feb 01, 2015 5:52 pm

Yes, it works exactly as specified in the description:

Code: Select all

*Basic rules for the compilation of event string:*

1) Join **Front of event string** and **Back part(s) of event string**
2) If the string contains more than three parts, truncated to three parts.
3) Truncating is performed by slicing the front parts
4) The third part is applied either as a suffix or as a payload
But I agree, it's not very practical.
So I made some changes in the code ...
I added the fifth rule:
The Back part is divided only by the first found dot
You can download it from the SVN repository.

Pako
You know flattr ? You can Image

jonib
Plugin Developer
Posts: 1280
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: OSM (On Screen Menu)

Post by jonib » Sun Feb 01, 2015 6:36 pm

Pako wrote:Yes, it works exactly as specified in the description:
Yes I read the great documentation, just didn't see a way to make it work, other then to remove the dots from the url.
But I agree, it's not very practical.
So I made some changes in the code ...
I added the fifth rule:
The Back part is divided only by the first found dot
You can download it from the SVN repository.
Works great, hopefully it didn't introduce any problems for others using it. :wink:

Just want to thank you Pako for everything you do, you are an inspiration. :D

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

copota
Posts: 32
Joined: Sat Mar 27, 2010 4:08 pm

Re: OSM (On Screen Menu)

Post by copota » Sat Sep 10, 2016 4:58 am

I have a question regarding the "Trigger an event if the user has moved..." option.

When I tick that option, the following event gets logged for an action item I have configured as suffix, Label: notepad, Front event: OSM, Backpart: notepad22 ...

Code: Select all

OSM.SelectionMoved (u'notepad', u'notepad22', 1)
When I drag the event to my macro, only a portion of the event gets copied, as such...

Code: Select all

OSM.SelectionMoved
So I basically lose the unique event name that was shown in the log. I'm assuming the part of the event in parenthesis is ignored by Eventghost.

Is there a way to retain a unique event name when the option for "Trigger and event..." is ticked? I would like items in my menu to immediately fire the moment I click on them with my mouse, and I would need unique event names for that to happen.

Just curious if this is possible, or if there's a better solution. Since I have about 12 items in my menu, I would prefer using OSM over Multitap.

Thanks a bunch for any advice and help.

jonib
Plugin Developer
Posts: 1280
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: OSM (On Screen Menu)

Post by jonib » Sat Sep 10, 2016 10:01 am

copota wrote:When I tick that option, the following event gets logged for an action item I have configured as suffix, Label: notepad, Front event: OSM, Backpart: notepad22 ...

Code: Select all

OSM.SelectionMoved (u'notepad', u'notepad22', 1)
The last part is called the payload and it's a bit more advanced to use. Basically you need to use some Python or have a action that is aware of the format.
Is there a way to retain a unique event name when the option for "Trigger and event..." is ticked? I would like items in my menu to immediately fire the moment I click on them with my mouse, and I would need unique event names for that to happen.
But luckily you can change it to an event suffix, then you can access it directly via dragging it to a macro.
In OS Menu change the "The third part applied as" to "event suffix", so it becomes the third part of the event instead of the payload.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

copota
Posts: 32
Joined: Sat Mar 27, 2010 4:08 pm

Re: OSM (On Screen Menu)

Post by copota » Sat Sep 10, 2016 12:41 pm

jonib wrote:
copota wrote:When I tick that option, the following event gets logged for an action item I have configured as suffix, Label: notepad, Front event: OSM, Backpart: notepad22 ...

Code: Select all

OSM.SelectionMoved (u'notepad', u'notepad22', 1)
The last part is called the payload and it's a bit more advanced to use. Basically you need to use some Python or have a action that is aware of the format.
Thanks for the quick reply. So if I want to use the payload, I need some python.

I think I found a different workaround for what I want to achieve.

I'm using an OSM menu with my mouse. In order for a menu option to activate, you need to double click a menu item.

As lazy as this sounds, I'm trying to make a menu, so when I click once on a menu item, it will activate, thereby eliminating the need for a double click.

To achieve a single click menu item activation, I configured my menu as follows...

1. I created a macro that includes an "OSM.SelectionMoved" event and a left mouse button double-click action. This will do the double-clicking for me.

2. I have "Trigger an event if the user has moved..." option ticked.

3. Each menu item macro includes the "OS Menu: OK" action to close the menu after a menu item has been clicked.

The one problem with this method, is the first item in the menu needs to be blank so I can trigger the "OSM.SelectionMoved" event for any menu item I want to activate.

Here's a screenshot and a Gif of what I'm trying to achieve. If there's a better method, please let me know, thanks!

Image


http://i.imgur.com/h8X4mto.gifv

jonib
Plugin Developer
Posts: 1280
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: OSM (On Screen Menu)

Post by jonib » Sat Sep 10, 2016 1:51 pm

copota wrote:Thanks for the quick reply. So if I want to use the payload, I need some python.
Did you read the rest of my post? as you can change so it doesn't use a payload.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

copota
Posts: 32
Joined: Sat Mar 27, 2010 4:08 pm

Re: OSM (On Screen Menu)

Post by copota » Sun Sep 11, 2016 3:32 am

jonib wrote:
copota wrote:Thanks for the quick reply. So if I want to use the payload, I need some python.
Did you read the rest of my post? as you can change so it doesn't use a payload.

jonib
Yes, I read it, thank you for the reply.

I set OSM as suffix. However, suffix doesn't help me eliminate the need to double-click a menu item when using a mouse, which is what I was ultimately looking to achieve. That's why I was origianlly asking if OSM.SelectionMoved can be uniquely generated and used as action events to trigger macros.

Image

jonib
Plugin Developer
Posts: 1280
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: OSM (On Screen Menu)

Post by jonib » Sun Sep 11, 2016 10:41 am

copota wrote:Yes, I read it, thank you for the reply.
OK, just making sure as it wasn't clear from your post.
I set OSM as suffix. However, suffix doesn't help me eliminate the need to double-click a menu item when using a mouse, which is what I was ultimately looking to achieve. That's why I was origianlly asking if OSM.SelectionMoved can be uniquely generated and used as action events to trigger macros.
Sorry can't help with the double-click, I only use the menu with a remote.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image

Post Reply