INTERACT FORUM

Please login or register.

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

Author Topic: Can I close the UI via an API?  (Read 1742 times)

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Can I close the UI via an API?
« on: June 11, 2011, 08:26:27 am »

Is there an API (MCC, command line or MCWS) mechanism that is equivalent to closing the main window - something that will make the UI disappear, but leave the service still running?

All I have found so far is:
  • Command line /Close - which also kills the service
  • Minimize and stop, which leaves too much context

Thanks

Brian
Logged

Mike Noe

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 792
Re: Can I close the UI via an API?
« Reply #1 on: June 11, 2011, 08:48:37 am »

I use these:

cmdMinimize := "10014"
cmdShowWindow := "10013"

Logged
openSUSE TW/Plasma5 x86_64 | Win10Pro/RX560
S.M.S.L USB-DAC => Transcendent GG Pre (kit) => Transcendent mono OTLs (kit)
(heavily modded) Hammer Dynamics Super-12s (kit)
(optionally) VonSchweikert VR8s

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Can I close the UI via an API?
« Reply #2 on: June 11, 2011, 08:54:10 am »

That's basically what I am doing now - but it's not quite right and I would like to do better. A minimized application still has a "Playing Now" and a position that is not reset when I re-open it.

If I were not trying to remote control everything, the Windows "close box" on the UI does just what I want and leaves the service running for other uses. But the Close API mechanism I have found also close the service.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Can I close the UI via an API?
« Reply #3 on: June 11, 2011, 09:13:57 am »

Would it work to run Media Server (Options > Startup), and then just close the program?  The web service and SDK will remain available.
Logged
Matt Ashland, JRiver Media Center

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Can I close the UI via an API?
« Reply #4 on: June 11, 2011, 09:22:24 am »

I want to use MC for *some* but not all HTPC activities. And when I need to use another program I would like to close MC. But later I will reopen MC to (e.g.) watch a movie or listen to some music with onscreen visualization.

But when I close MC through an API, then the web service etc all disappear too (and the DLNA service).

I can live with minimizing. But I know the software is capable of something close to my needs through the UI. So I hoped that I had missed the key MCC code or command line option.
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: Can I close the UI via an API?
« Reply #5 on: June 11, 2011, 09:58:52 am »

This is what Media Server (Options > Startup) is for.
Logged
Matt Ashland, JRiver Media Center

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Can I close the UI via an API?
« Reply #6 on: June 11, 2011, 10:13:03 am »

I *am* using Media Server, which starts when Windows starts.

But "mc16 /close" closes both any open UI application AND the server. All API calls sensibly go to the server and are acted on there. But I have been unable to find a way to close the UI application and leave the server running - other than by manually interacting with the application. And I need to server to serve other clients.

Maybe I just need to stick with minimizing - a shame though. One thing I haven't tried is sending the Alt+F4 KEY over MCWS. And maybe a "Clear" will avoid some of the problems I have with minimizing. There are always *lots* of ways of doing things with this program!

Brian
Logged

avid

  • Regular Member
  • World Citizen
  • ***
  • Posts: 180
  • MC user since 2003
Re: Can I close the UI via an API?
« Reply #7 on: June 13, 2011, 03:52:50 am »

Just for closure (no pun intended), and in case someone searches the forum for something similar, I found that sending an Alt;F4 KEY over MCWS did the trick. It closes the displayed UI but leaves the sevice running. Perfect!

Thanks all for suggestions.

Brian
Logged
Pages: [1]   Go Up