INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Using core commands when MC not running  (Read 2065 times)

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Using core commands when MC not running
« on: December 23, 2008, 03:56:12 am »

Hi All!

Is there a way to fire up MC when not running, when executing one of MC core commands?

I have a couple of shortcuts switch to Theater View Audio, Video etc, and use these on my remotes "My Music" and so on. But these does not work when MC is not running. I tried also to make a bat file which first tries to launch MC then execute the particular command, but this did not work either.

Any tips greatly appretiated. I do not have Girder, and have a Imon remote that I assign the keyboard shortcuts to keys. If there is a better way to use this...


Merry Christmas to everybody, btw  :)
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1598
Re: Using core commands when MC not running
« Reply #1 on: December 23, 2008, 05:11:49 am »

Hi Zirum,

You could try HiP from http://byremote.com.au to run a command to open MC. It's free and works a treat  :)

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Using core commands when MC not running
« Reply #2 on: December 23, 2008, 05:48:10 am »

Tried to install HIP, but not sure how to set up this? Could not find support for Imon remotes. And do I need to disable imon (use 3rd party...)? Or do I need to configure it as a generic device?

Lots of question there, sorry for beeing a remote noob. :)
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...

JONCAT

  • Guest
Re: Using core commands when MC not running
« Reply #3 on: December 23, 2008, 10:17:29 am »

Sorry to butt in....have core commands changed from 12 to 13?

I have a rating shortcut that works to apply 5-star rating in MC12, but not in MC13.

happy holidays,
DC
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: Using core commands when MC not running
« Reply #4 on: December 23, 2008, 10:44:50 am »

Hi All!

Is there a way to fire up MC when not running, when executing one of MC core commands?

I have a couple of shortcuts switch to Theater View Audio, Video etc, and use these on my remotes "My Music" and so on. But these does not work when MC is not running. I tried also to make a bat file which first tries to launch MC then execute the particular command, but this did not work either.

Any tips greatly appretiated. I do not have Girder, and have a Imon remote that I assign the keyboard shortcuts to keys. If there is a better way to use this...


Merry Christmas to everybody, btw  :)
have you tried putting a 'timer' in the bat file.
this works for me:

mc13.exe /start
ping -n 2 127.0.0.1 >NUL
MC13.exe /mcc 22001,2

 :)
gab
Logged

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Using core commands when MC not running
« Reply #5 on: December 23, 2008, 04:27:35 pm »

Thanks Gap!

I made a bat-file, which also avoids the delay if MC is already running. I am really bad at batch writing, so bear with me if I have done something outragious  ;)

And if someone wonders why I check for caption in stead of the actuall application name, it's beacuse I was not able to clear out the carracter return...  ::)

It passes arguments for the command to launch. That should fix the limitation IMON remote software had, so I do not need a file for each command, like the shortcuts solution used.

One last thing, it uses the WMIC library, but I hope most XP machines has that installed. It autoinstalled the first time for me...

Here is it
Code: [Select]
@echo off

REM *** Edit this as necessary *************
set processToFind=Media Center 13.exe
REM *********************************

set MCRunning=0

FOR /F "tokens=1 delims==" %%A IN ('WMIC PROCESS Where "Caption='%processToFind%'" get Caption /Format:list ^| FINDSTR /R /C:"=."') DO (
IF /I "%%A"=="Caption" (
SET MCRunning=1
)
)

IF %MCRunning%==1 GOTO ExecuteCoreCommand
ECHO Starting Media Center since not detected running
MC13.exe /start
ping -n 2 127.0.0.1 >NUL

:ExecuteCoreCommand
ECHO Execute command: MC13.exe /mcc %1,%2
START MC13.exe /mcc %1,%2

Feel free to improve if necessary :)
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...
Pages: [1]   Go Up