INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: soundgals on April 22, 2014, 11:24:47 am

Title: JRiver isPlaying expression to trigger Autohotkey
Post by: soundgals 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
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: gappie 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
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: soundgals on April 22, 2014, 11:44:33 am
Thanks Gab, I'll take a look.
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: MrC 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.
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: soundgals on April 22, 2014, 12:01:12 pm
Thanks! This is getting me on the right track.

geoff
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: soundgals 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
Title: Re: J River isPlaying expression to trigger Autohotkey
Post by: MrC 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.
Title: Re: JRiver isPlaying expression to trigger Autohotkey
Post by: soundgals 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