OSM (On Screen Menu)

Questions and comments specific to a particular plugin should go here.
Post Reply
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 May 24, 2011 5:33 pm

Probably you're doing something wrong.
But I can not tell what is wrong if I do not have enough information.
Best if you attach here your configuration file (which does not work).

Pako
You know flattr ? You can Image

altainta
Posts: 29
Joined: Sun Nov 28, 2010 5:58 am

Re: OSM (On Screen Menu)

Post by altainta » Thu Jun 09, 2011 5:11 pm

can u simple post a xml sheet explaining the funtions of this plugin...
Will this plugin help me to choose different programs and also execute different file if yes than how...
It seems a little complicated without guide.. Sorry for noob question...

please use calc.exe, notepad.exe, wordpad.exe in ur example...also please use little parameters too... I really appreciate a video... Which was the only thing which explained me how to use eventghost at first... it teaches a lot of thing... or a wiki (still not updated)... thank you sir.. i know u don't much of English but still forcing u too...


Hmm i am not able to understand what payload is ?
Payload = parameters right ?

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 » Fri Jun 10, 2011 9:43 am

Here is an example to the OSM plugin.
I think that it is quite simple.
I used your example for OSE plugin, so there are also prepared the events for the IgorPlug-USB.
I think that there can be only one problem: it is possible that you have in your computer, other paths to the programs.
You may need to adjust settings in actions "Start Program".

You know that I have difficulty with English. Why do you write then so incomprehensible?
I sometimes do not know where is the beginning and end of a sentence.
You do have to understand that I prefer short sentences and pure language.
But I guess that I want from you too much.

Find a payload keyword here: http://www.eventghost.net/docs/genindex.html

Pako
Attachments
test.xml
(10.31 KiB) Downloaded 286 times
You know flattr ? You can Image

altainta
Posts: 29
Joined: Sun Nov 28, 2010 5:58 am

Re: OSM (On Screen Menu)

Post by altainta » Sat Jun 11, 2011 9:54 am

Sorry for the english pako. It is not my native language either. Like you i also face trouble with english.
It is my problem i can't control what i type i just go on...
will check it.. thx for the efforts.

PS: (test.xml) thank you very much now i can understand better...very very interesting plugin thank you.. Now i do not need to Put a Program on a Button rather i will select from list.
:oops: One more thing, how to use the 'Numeric Hot key' and the 'Get Value'.
:oops: Please don't get mad at me for asking so many question. thank you very much :D

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 Jun 12, 2011 5:45 am

altainta wrote: :oops: One more thing, how to use the 'Numeric Hot key' ...
If your remote has a numeric key, and provides events like IgorPlugUSB.RC5.Phono.Num1, you can try. I'm done modifications the file test.xml.
altainta wrote: :oops: ... and the 'Get Value'
This makes sense only for people who can write scripts. Is possible that nobody had the need to use it.

Pako
Attachments
test.xml
(11.04 KiB) Downloaded 231 times
You know flattr ? You can Image

altainta
Posts: 29
Joined: Sun Nov 28, 2010 5:58 am

Re: OSM (On Screen Menu)

Post by altainta » Sun Jun 12, 2011 6:35 am

Thank you very much pako

Learned about Get Value.
It gets the Value of Currently Selected (or Selector ON) value and pass it to {eg.result}. because of this we can create complex system.
so here it is my example

Any other command does it support or variable/ constant ?
like {eg.result} any other exists?
Learning this it is very new to me in eventghost (never used it before) Awesome thing
Attachments
OSM get value.JPG
OSM get value.JPG (5.93 KiB) Viewed 6571 times

skat
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am

Re: OSM (On Screen Menu)

Post by skat » Thu Jun 23, 2011 12:00 pm

Hi Pako,

I am having an issue that might be related to the OSM plugin. When I trigger the following macro multiple times (about 4) in a row, EG will hang/freeze. I suspect the problem may be in the use of EmulateKeystroke for some of the special keys together with OSM.ShowMenu.

The following snippet is the code I use:

Code: Select all

<Macro Name="Power" Expanded="True">
  <Event Name="Auvisio.Power" /> 
  <Action>Window.SendKeys(u'{Win}', False)</Action> 
  <Action Enabled="False">OSM.ShowMenu([(u' Close', u'Close'), (u' Sleep', u'Sleep'), (u' Hibernate', u'Hibernate'), (u' Shut down', u'Shutdown')], (235, 235, 235), (180, 180, 180), u'0;-32;0;0;0;700;0;0;0;0;3;2;1;34;Arial', u'PowerMenu', 0, 0, (255, 255, 255), (0, 0, 160))</Action> 
</Macro>
Thanks in advance for any help.

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 » Thu Jun 23, 2011 2:22 pm

I tried your snipet, but I did not find any problem.
Maybe I'm missing the greater part of your configuration file.
What is the significance of the action Emulate Keystrokes: {Win} before displaying the menu?

Pako
You know flattr ? You can Image

skat
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am

Re: OSM (On Screen Menu)

Post by skat » Thu Jun 23, 2011 4:11 pm

I do have a larger config that handles my VRC 1100 remote with Windows 7 Media Center.
The idea is that the Power button should bring up a shutdown menu, however, with WMC in the full screen mode the OSM would not appear. So the trick is to first open and close the Win Start menu. I removed as much as I could from the code so as to isolate the problem.

I have now put some debug prints in and noticed EG freezes when calling SendKeys after the macro has been triggered 3-4 times in a row. If I remove either ShowMenu or SendKeys from the macro, there is no freeze. If I SendKey "K" instead of {Win}, there is no freeze either.

skat
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am

Re: OSM (On Screen Menu)

Post by skat » Fri Jun 24, 2011 4:34 am

After some more testing: If an OSM menu stays open and in the background some other event is triggered that emulates keystrokes forcing a change of active window (for example SendKeys {Win}), EG may become unstable and possibly freeze.

I have put together a short test case that demonstrates the crash/freeze. All you need to do is run the "Run crashtest" macro manually.

OS: Win7 64bit Home Premium
EDIT: EG 0.4.1.r1529
Attachments
osmcrashtest.xml
Test case to demonstrate the freeze of EG when combining OSM and SendKeys.
(978 Bytes) Downloaded 224 times

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 » Fri Jun 24, 2011 4:59 am

Great job :D .
This is an ideal way to report an error.
I hope that I can as well quickly find and fix bug.

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 » Fri Jun 24, 2011 12:37 pm

Fixed.
Until a new version will be released you can download the corrected plugin here.

Pako
You know flattr ? You can Image

skat
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am

Re: OSM (On Screen Menu)

Post by skat » Fri Jun 24, 2011 7:09 pm

Great! Thanks a lot. No freezing anymore.

skat
Posts: 48
Joined: Thu Jun 23, 2011 10:11 am

Re: OSM (On Screen Menu)

Post by skat » Sun Jun 26, 2011 7:50 pm

Although very rarely now, I still get the following error when I call OS Menu: Cursor Down: 1 immediately after OS Menu: Show menu: XYZ.

Code: Select all

      OS Menu: OK
         Error in Action: "OS Menu: OK"
         Traceback (most recent call last) (1529):
           File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
             return self(*args)
           File "C:\Program Files (x86)\EventGhost\plugins\OSM\__init__.py", line 1005, in __call__
             self.plugin.menuDlg.SendEvent()
           File "C:\Program Files (x86)\EventGhost\plugins\OSM\__init__.py", line 1260, in SendEvent
             row = self.eventChoiceCtrl.GetSelection()
         AttributeError: 'Menu' object has no attribute 'eventChoiceCtrl'

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 » Mon Jun 27, 2011 3:26 pm

Thank you for reporting.
Fixed since version r1534.

Pako
You know flattr ? You can Image

Post Reply