Auto run program when media center starts

Post Reply
Webbe

Posts: 4
Joined: Mon Feb 25, 2013 7:52 am
Location:

HTPC Specs: Show details

Auto run program when media center starts

#1

Post by Webbe » Tue Mar 12, 2013 8:26 pm

So I use an autohotkey script (converted to exe) to allow me to use my Xbox 360 controller as a remote for media center. I also added it to the extras library to make it easier to run.

The problem is, I still need to be at my keyboard to run the app... What I'm looking for is some type of solution that will automatically run the exe as soon as I start media center. Is it possible? Any thoughts?

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#2

Post by barnabas1969 » Tue Mar 12, 2013 9:51 pm

Couldn't you just create a new task in Task Scheduler to start your exe at logon? This would work fine as long as the exe doesn't cause undesirable effects when you are not using Media Center.

If you truly need the key reassignments to only run when Media Center is running, then I would recommend Event Ghost instead of AutoHotKey.

Webbe

Posts: 4
Joined: Mon Feb 25, 2013 7:52 am
Location:

HTPC Specs: Show details

#3

Post by Webbe » Tue Mar 12, 2013 11:43 pm

Ill have to check out event ghost (autohotkey was suggested for my keyboard, and it seems to work well)

I thought about task scheduling, however there are some issues with the script that cause it to crash when exiting media center (I haven't quite been able to pinpoint it...)

Thanks though, I'll check out event ghost.

barnabas1969

Posts: 5738
Joined: Tue Jun 21, 2011 7:23 pm
Location: Titusville, Florida, USA

HTPC Specs: Show details

#4

Post by barnabas1969 » Wed Mar 13, 2013 1:05 am

OK, but I don't think you'll want to run EG and AHK at the same time. They might interfere with each other. EG can detect which application is in the foreground, and your macros can use that ability to decide if they should do something or not.

You'll have to figure out what "keys" (events) are sent from your XBox 360 controller, and create a macro in EG (triggered by an event that happens when you press a button on the controller) for each button. Then, in that macro, you can determine if Media Center is the foreground application, and send the corresponding Media Center command if it's in the foreground. If Media Center isn't the foreground application, then your macro should do nothing (if you configure it correctly).

Post Reply