Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Start Application - Command line option help MCE

If you have a question or need help, this is the place to be.
Post Reply
iGBH
Posts: 5
Joined: Tue Oct 27, 2009 2:17 am

Start Application - Command line option help MCE

Post by iGBH »

I'm trying to have EG run the following command on the press of MCE Start...

C:\Windows\ehome\ehshell.exe /entrypoint:{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}

The intention is to open MCE on the MediaBrowser home page. This command works elsewhere however i am unsure how to input this correctly into EG without it giving me syntax errors.

I have tried:
Executable: C:\Windows\ehome\ehshell.exe
Command line options: "/entrypoint:{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}"

Executable: C:\Windows\ehome\ehshell.exe
Command line options: /entrypoint:{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}

Executable: C:\Windows\ehome\ehshell.exe /entrypoint:{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}
Command line options:

and pretty much every variation thereof. Each time, EG comes up with the following error...

Error in Action: "Start Program: {fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}""
Traceback (most recent call last) (1194):
File "C:\Program Files\EventGhost\eg\Classes\ActionBase.py", line 168, in CallWrapper
File "C:\Program Files\EventGhost\plugins\System\Execute.py", line 84, in __call__
File "C:\Program Files\EventGhost\eg\Utils.py", line 204, in ParseString
File "<string>", line 1
ce32c570-4bec-4aeb-ad1d-cf47b91de0b2
^
SyntaxError: invalid syntax

I'm really not sure what i'm doing wrong. Any help would be greatly appreciated.

Running W7 with correct plugins and services installed.

Thanks :)
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: Start Application - Command line option help MCE

Post by stottle »

ParseString is a function that let's you put things like {eg.result} into the OSD. What it does is see if there are any angle brackets in a string, and if so, it will look the values up in EG's dictionary. You bracketed expressions aren't in the dictionary, so you get the error back.

I'm not sure what the fix is. Are there any other command line options that don't use angle brackets? Other than that, the only thing I can think of is to make a copy of the start app function (.py files are just text files that python compiles into code at runtime) which doesn't call ParseString.

Brett
iGBH
Posts: 5
Joined: Tue Oct 27, 2009 2:17 am

Re: Start Application - Command line option help MCE

Post by iGBH »

Thanks. I've never used python before but made the below script which seems to do what i want.

import os
os.system('start C:\Windows\ehome\ehshell.exe /entrypoint:{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}""')
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Start Application - Command line option help MCE

Post by jinxdone »

There is a function named ParseString in eg\Utils.py on that skips evaluating the next chunk of text if it encounters a opening double curly brace.

So for example if you have a literal string '{something}', you should write it as '{{something}', if you want to skip evaluating it in one of the eg actions like showosd, run application etc.

In your case the parameter should be:
/entrypoint:{{ce32c570-4bec-4aeb-ad1d-cf47b91de0b2}\{{fc9abccc-36cb-47ac-8bab-03e8ef5f6f22}

-jinxdone
Todd Wainio
Posts: 1
Joined: Tue Feb 02, 2010 2:52 pm

Re: Start Application - Command line option help MCE

Post by Todd Wainio »

It should look something like this.

Image

it took me a bit to figure it out. thanks to jinx for explaining the bracket issue.

for the life of me i cant understand why anyone would choose to pay for any of the remote keymapping applications out there. eventghost is fantastic.
Post Reply