Author Topic: How To: Launch VoxCommando minimized and XBMC from Eventghost  (Read 6542 times)

0 Members and 1 Guest are viewing this topic.

stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
VoxCommand .884, Eventghost 0.3.7.r1486, Windows 7 x64 (though should work for x32)

Desired:
- You want voxcommando and xbmc to be launched from Eventghost automagically.
- But, sometimes, Eventghost gets hung up.  If you make a macro in VoxCommando, you can kill and relaunch Eventghost. But you want to NOT launch VoxCommando and XBMC if they are already launched.
-If Voxcommando is launched, you want it to be minimized so as to not pop-up in front of XBMC.

Problem:  Normally, you could use Eventghost's Find Window so as to Bring XBMC to the front.  But it turns out that the FindWindow command has a chronic bug/glitch in it that's thoroughly documented that stops FindWindow from working.

Solution- using Auto Hot Key:
1.  Make a shortcut to VoxCommando starting as minimized on your desktop.  (Right-click, go to properties, change as shown).


2. Download and install AHK - autohot key.

3.  Download and load the attached vc xbmc eventghost.xml file into EventGhost.  Or don't, and just add a couple of Action/Eventghost/Start Program actions to the default AutoStart Macro of Eventghost.  You might have to change the path to the xbmc_start.exe and voxcommando_start.exe.


4. Download and install the attached .ahk scripts into your Eventghost Program Files Window.  Open them up, and  change the paths to where your VoxCommando shortcut and XBMC.exe are located.  Right-click on the ahk's, and chose Compile script on them.    This will make same named .exe files: xbmc_start.exe and voxcommando_start.exe in the same location.
 
You might have to change the location/ names of those exes as listed in step 3 above.

5.  Save the Eventghost config.  BTW - sometimes, eventghost loses it's config file on starting up.  Just a make a shortcut with this as the target:
"C:\Program Files (x86)\EventGhost\EventGhost.exe" -hide -file "C:\Program Files (x86)\EventGhost\vc xbmc eventghost tree.xml"

If you put this shortcut in your startup folder, then you'll have flawless startup of VoxCommando, XBMC and Eventghost.

Anyway, it should now be working.

Hope it helps!

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #1 on: April 14, 2011, 09:42:19 PM »
Thanks for the info stepped up.  I don't think any of this applies to me, but maybe it'll help someone else.

I'm wondering, what is the reason for using auto hot key?  I know I could install it and open the scripts, but asking seems easier. :-\

I'd just like to say that EventGhost doesn't hang for me (hasn't for ages anyway), nor have I ever lost my eventghost config file on startup.  It may be that you are using a dodgy plugin, or maybe I have just been lucky.

what kind of problems do you have with findwindow?  I have had problems with focusing windows but not with finding them afaik.  Can you please provide links to some of this well documented info on the subject.  I am interested in learning more about this subject.  :)


stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #2 on: April 14, 2011, 11:04:31 PM »
No aspersions on EventGhost - fantastic app.

But the AHK scripts avoid the eventGhost FindWindow issue by using the Process Exist function.

The Find Window issue is a recurring one most likely based on some sort of memory leak - http://www.eventghost.org/forum/viewtopic.php?f=4&t=879

There are other links out there as well, but that's a reasonable summation.  Read all the way down the forum as they thought it was fixed, but turns out to not be, including with the same version of eventghost that I'm using. 

I actually didn't have the issue at first, and had everything written and blasting away in a plugin script within Eventghost.  But then FindWindow in Eventghost stopped finding the windows.

While trying a couple of things, it seems there can also be issues with FindWindow finding TrayIcon'd programs (there is a TrayIcon eventghost plugin if anyone's googling this that can be adapted).

Anyway, at that point, I figured that I'm already running AHK to handle the Green Microsoft start button on my Amulet Remote, am actually more comfortable with AHK, ....time to try an AHK solution.

Done in about 30 seconds :)





jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #3 on: April 14, 2011, 11:32:29 PM »
good stuff.  thanks for the info.

btw vox has a "if process running" feature, but obviously it can't be used on itself!

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #4 on: April 15, 2011, 08:26:32 AM »
Hello friends, the Last Version Eventghost is 0.3.7 r1494, download new version here:

http://www.eventghost.com/downloads/EventGhost_0.3.7.r1494_Setup.exe
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

Wanilton

  • $upporter
  • Hero Member
  • *****
  • Posts: 559
  • Karma: 6
    • View Profile
    • XBMC Brazil Forum
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #5 on: April 15, 2011, 07:56:59 PM »
Stepppedup,

Look the image for understand my MP for you,

Wanilton
www.xbmcbrasil.net
XBMC  Brazilian Community Forum - Admin
Windows 8.1 - XBMC Gotham Custom Plus - Aeon MQ 5
My Room Entertaiment´s
About me

stepppedup

  • $upporter
  • Jr. Member
  • *****
  • Posts: 48
  • Karma: 0
    • View Profile
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #6 on: April 16, 2011, 04:10:23 PM »
Re: Frog -looks like image shack pulled a sneaky one.  I'll start using another image source.  In the meantime, Wanilton, it looks like you could register at imageshack to immediately view the images.  Or Jitterjames can register the website at imageshack.  Source:  http://guidesandstuff.com/imageshack_picture_photo_problem_issue.html

Personally, I think imageshack just pissed off a bajillion blogs and tech forums.  Stupid PR move. 

Anyway - back to Eventghost getting hung - I updated to the latest version of Eventghost, and it still gets hung.

But not entirely hung - the Alternate MCE Remote service  is dying unexpectedly per eventvwr.  I'm not seeing any antecedent events. 

Rather than waste too much time trying to run down what's probably some sort of obscure resource conflict, I simply made a quick script that restarts the service.

Since others might run into this as well....

VoxCommando:Make an Eventghost action, with the parameter of RestartRemoteService.

Eventghost script (I also put the script into my AutoStart macro of Eventghost  - this is to guarantee the service is started).

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1494">
    <Macro Name="RestartRemoteService" Expanded="True">
        <Event Name="Broadcast.RestartRemoteService" />
        <Action>
            EventGhost.PythonScript(u'import sys\nfrom eg.WinApi.Service import Service\n\nservice = Service(u"AlternateMceIrService")\nservice.Stop()\nservice.Start()')
        </Action>
    </Macro>
</EventGhost>

jitterjames

  • Administrator
  • Hero Member
  • *****
  • Posts: 7713
  • Karma: 116
    • View Profile
    • VoxCommando
Re: How To: Launch VoxCommando minimized and XBMC from Eventghost
« Reply #7 on: April 16, 2011, 04:16:36 PM »
thanks for the new word.  we'll see if I can remember it though... :D

http://www.thefreedictionary.com/antecedent