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.

Make it stay focused?? Use EG to open on another screen

If you have a question or need help, this is the place to be.
Post Reply
pettergulbra
Posts: 7
Joined: Mon Jun 15, 2009 7:57 pm

Make it stay focused?? Use EG to open on another screen

Post by pettergulbra »

Hi

I think I have made this work.
I have got it to change the resolution, but can`t get it to move to the other screen.

I tried to follw this:
I have this working without ultramon. My setup is windows 7 RC with my primary monitor a dell 24' and my 2nd is my Sharp LCD TV. No ultamon, just EventGhost.

Using EventGhost & an MCE Remote I created a macro that does the following..
Event: MCE.RemoteStart (Green Button)
Event: Keyboard.F12 (F12 Hotkey to trigger the same action in case the remote isn't handy)
Action: SetDisplayPreset (Fixes an issue I have with hdmi losing it's knowledge of my TV sometimes causing a black screen)
Action: Start xbmc.exe using -fs switch
Action: Find window XBMC
Action: Move window x:1280 y:0
Action: Emulate Keystrokes "\"
Action: Emulate Keystrokes "\"
Action: Find window XBMC (sometimes I would lose focus on the app after the keystrokes. This sets it back)

Voila -> works everytime XBMC launches flawlessly on my TV full screen with the click of a button.

The only problem. I can`t get it to move to the other screen. Like they says in this tried.

Hope someone can help me.

Kindly

Petter
Last edited by pettergulbra on Tue Jun 16, 2009 9:58 pm, edited 1 time in total.
pettergulbra
Posts: 7
Joined: Mon Jun 15, 2009 7:57 pm

Re: Use eventghost to open on another screen?

Post by pettergulbra »

My first setup(down under), just used the options in the EG user display, and choosed the things from there. But nothing workd liked planed.
But I got the last setup from a member on another forum, like the one in the bottom. But now the problem is that the window do not get in the spotlight. So I can`t use my remote control. It is not focused.

Is there a way to fix this?


<Macro Name="Start Program: XBMC.exe" Expanded="True">
<Event Name="MceRemote.Start" />
<Action>
System.SetDisplayPreset((u'\\\\.\\DISPLAY1', 1280, 0, 1280L, 768L, 60L, 32L, True, False, 0L), (u'\\\\.\\DISPLAY2', 0, 0, 1360L, 768L, 60L, 32L, True, True, 0L))
</Action>
<Action>
System.Execute(u'C:\\Programfiler\\XBMC\\XBMC.exe' , u'-fs', 0, False, 2, u'C:\\Programfiler\\XBMC')
</Action>
<Action>
Window.FindWindow(u'XBMC.exe', None, None, None, None, None, False, 5.0, 0)
</Action>
<Action>
Window.MoveTo(1280, 0)
</Action>
<Action>
Window.SendKeys(u'\\', False)
</Action>
<Action>
Window.SendKeys(u'\\', False)
</Action>
<Action>
Window.FindWindow(u'XBMC.exe', u'XBMC Media Center', u'SDL_app', None, None, None, False, 5.0, 0)
</Action>

Old setup:

<Macro Name="Start Program: XBMC.exe" Expanded="True">
<Event Name="MceRemote.Start" />
<Action>
System.SetDisplayPreset((u'\\\\.\\DISPLAY1', 0, 0, 1280L, 768L, 60L, 32L, True, True, 0L), (u'\\\\.\\DISPLAY2', 1280, 0, 1360L, 768L, 60L, 32L, True, False, 0L))
</Action>
<Action>
System.Execute(u'C:\\Programfiler\\XBMC\\XBMC.exe' , u'-fs', 0, False, 2, u'')
</Action>
<Action>
Window.FindWindow(None, u'XBMC', None, None, None, None, False, 0.0, 0)
</Action>
<Action>
Window.MoveTo(1366, 768)
</Action>
<Action>
Window.SendKeys(u'\\', False)
</Action>
<Action>
Window.SendKeys(u'\\', False)
</Action>
<Action>
Window.FindWindow(None, u'XBMC', None, None, None, None, False, 0.0, 0)
</Action>
stottle
Plugin Developer
Posts: 636
Joined: Sun Apr 26, 2009 10:59 pm

Re: Make it stay focused?? Use EG to open on another screen

Post by stottle »

There's the "Window->Bring to Front" action. Have you tried that?

Brett
pettergulbra
Posts: 7
Joined: Mon Jun 15, 2009 7:57 pm

Re: Make it stay focused?? Use EG to open on another screen

Post by pettergulbra »

Looks like I got it to work now. A little bit more testing, and I will post if it works.

Thanks
Post Reply