INTERACT FORUM

Please login or register.

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

Author Topic: JRiver isPlaying expression to trigger Autohotkey  (Read 3150 times)

soundgals

  • Recent member
  • *
  • Posts: 27
JRiver isPlaying expression to trigger Autohotkey
« on: April 22, 2014, 11:24:47 am »

I'm not at all sure if this is possible; but here's what I'm looking for:

Trigger an AutoHotKey Script if the J River "isPlaying" expression evaluates to "0"

The script would then make XBMC the front most (active application) and do a mouse click within its window.

Any help with this would be greatly appreciated.

Thanks,

Geoff
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4580
Re: J River isPlaying expression to trigger Autohotkey
« Reply #1 on: April 22, 2014, 11:37:00 am »

I don't think you can do that with expressions. but maybe you find something usefull here: http://wiki.jriver.com/index.php/Media_Center_Automation#Basics
im not sure how yet. but the thought is interesting..
when I have some time im gonna puzzle a bit  :P

 :)
gab
Logged

soundgals

  • Recent member
  • *
  • Posts: 27
Re: J River isPlaying expression to trigger Autohotkey
« Reply #2 on: April 22, 2014, 11:44:33 am »

Thanks Gab, I'll take a look.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: J River isPlaying expression to trigger Autohotkey
« Reply #3 on: April 22, 2014, 11:44:40 am »

Right.  You'll either have to develop a plug-in or software to use Automation, or use MCWS to poll.  Here's a script which shows how you can poll MCWS:

  http://yabb.jriver.com/interact/index.php?topic=87932.msg603900#msg603900

It sends an MCWS command to get the playback state periodically, so that it can post track change announcements.
Logged
The opinions I express represent my own folly.

soundgals

  • Recent member
  • *
  • Posts: 27
Re: J River isPlaying expression to trigger Autohotkey
« Reply #4 on: April 22, 2014, 12:01:12 pm »

Thanks! This is getting me on the right track.

geoff
Logged

soundgals

  • Recent member
  • *
  • Posts: 27
Re: J River isPlaying expression to trigger Autohotkey
« Reply #5 on: April 23, 2014, 12:31:36 pm »

Managed to get the mc_notifier perl script running in windows. I stripped out all the Mac notification stuff and ran it in debug mode.

When the condition is met that playing has stopped I want to send a mouse click to dismiss a window in XBMC. I was hoping to do this by asking Perl to run an Autohotkey that would trigger the mouse click.

...or maybe Perl itself could send a mouse click to dismiss this window in XBMC. Does anybody know if this is possible?

I know where in the Perl script the condition is met, where I would want to trigger this action; but have no idea how to do it.

Thanks,

Geoff
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: J River isPlaying expression to trigger Autohotkey
« Reply #6 on: April 23, 2014, 01:37:21 pm »

Great.

Perl has no idea about the UI, mice, or other HID devices.  There are modules that allow doing Win32 types of things, but I'm not sure this is the route to take.

What you'd want to do is to have the Perl run a command, or post some notification to Autohotkey, if it has such a capability.  It probably has the capability of being called by (and invoking a script via) command line, and it can do your mousey-thing.
Logged
The opinions I express represent my own folly.

soundgals

  • Recent member
  • *
  • Posts: 27
Re: JRiver isPlaying expression to trigger Autohotkey
« Reply #7 on: April 23, 2014, 01:56:05 pm »

Thanks again. I'll write an Autohotkey and see if I can get Perl to run it. I'll also check if there's a possibility of aun scripting hooks into XBMC, which might be a more sophisticated way of achieving dismisal of this window at the appropriate times.

geoff
Logged
Pages: [1]   Go Up