PDA

View Full Version : Execute plugin



Patrick Dixon
2005-02-04, 12:54
Jeff,

Pending Kevin's fixes, try editing execute.pm as follows:

1) In 'selectFunctions' 'play' change the line:
system("\'$runScript\'");
to
system $runScript;

2) In 'commandCallback' change the lines like
$runScript = Slim::Utils::Prefs::clientGet($client, 'script',0); (etc)
to
$runScript = Slim::Utils::Prefs::clientGet($client, 'script'.0); (etc)

In (2) you will need to find 4 lines similar to the above - the only
difference being the numbers 0,1,2,3 - then replace the "," with a ".".

You'll need to stop and restart the server to test. HTH

-----Original Message-----
From: discuss-bounces (AT) lists (DOT) slimdevices.com
[mailto:discuss-bounces (AT) lists (DOT) slimdevices.com]On Behalf Of Jeff
Shanholtz
Sent: 04 February 2005 19:18
To: discuss (AT) lists (DOT) slimdevices.com
Subject: [slim] Execute plugin


On Fri, 04 Feb 2005 09:18:41 -0800, kdf wrote:

>> Kevin, I just grabbed your most recent version and I still can't execute
my
>> scripts (server is RH9, client is softsqueeze, scripts are owned by
>> slimserver). I've tried my scripts with and without spaces and it doesn't
>> work either way, and they do execute directly from a console. The plugin
>> does report that it is executing a script but it simply doesn't (I'm
trying
>> to run it from the plugin menu rather than on an event). Any suggestions?
>
> erk..sorry...guess I should hav read slowly :))
>
> try running from command line, temporarily chmod all the scripts to a+x
and turn
> on d_plugins and d_stdio. Make sure that you have at least once gone into
the
> plugin where it says "press PLAY to activate".
>
> other than that...there is little I can suggest.
> -kdf

I tried all of that. I even tried putting an echo statement in one of my
scripts to see if that would appear in the output (I assume I would have
seen it in d_stdio, and of course I turned on d_plugins as well). Here's
all I got:

2005-02-04 11:00:50.8791 path: /usr/local/slimserver/scripts
2005-02-04 11:00:50.8794 file: /usr/local/slimserver/scripts/LightsOff
2005-02-04 11:00:50.8797 Executing: /usr/local/slimserver/scripts/LightsOff

Too bad you are out of ideas. I was thinking you use linux but maybe not,
and maybe this plugin just works in windows. Oh well. Thanks for trying to
help. Maybe I'll again raise the issue of dedicating a button on my remote
to running a script - that's what I would really prefer to do anyway.

kdf
2005-02-04, 13:04
Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:

> Jeff,
>
> Pending Kevin's fixes, try editing execute.pm as follows:
>
> 1) In 'selectFunctions' 'play' change the line:
> system("\'$runScript\'");
> to
> system $runScript;
>
> 2) In 'commandCallback' change the lines like
> $runScript = Slim::Utils::Prefs::clientGet($client, 'script',0); (etc)
> to
> $runScript = Slim::Utils::Prefs::clientGet($client, 'script'.0); (etc)

there is another case of this around line 407:
my $list = Slim::Utils::Prefs::clientGet($client,
'script',$menuSelection{$client});

change to:

my $list = Slim::Utils::Prefs::clientGet($client,
'script'.$menuSelection{$client});

-kdf

Jeff Shanholtz
2005-02-04, 13:33
On Fri, 04 Feb 2005 12:04:09 -0800, kdf wrote:

> Quoting Patrick Dixon <patrickdixon (AT) btinternet (DOT) com>:
>
>> Jeff,
>>
>> Pending Kevin's fixes, try editing execute.pm as follows:
>>
>> 1) In 'selectFunctions' 'play' change the line:
>> system("\'$runScript\'");
>> to
>> system $runScript;
>>
>> 2) In 'commandCallback' change the lines like
>> $runScript = Slim::Utils::Prefs::clientGet($client, 'script',0); (etc)
>> to
>> $runScript = Slim::Utils::Prefs::clientGet($client, 'script'.0); (etc)
>
> there is another case of this around line 407:
> my $list = Slim::Utils::Prefs::clientGet($client,
> 'script',$menuSelection{$client});
>
> change to:
>
> my $list = Slim::Utils::Prefs::clientGet($client,
> 'script'.$menuSelection{$client});
>
> -kdf

Those changes didn't help, but I'll wait until the next revision of
Execute.pm is announced and try that as well.

kdf
2005-02-04, 14:04
Quoting Jeff Shanholtz <jeffsubs (AT) shanholtz (DOT) com>:

>
> Those changes didn't help, but I'll wait until the next revision of
> Execute.pm is announced and try that as well.

Jeff,
please email me a copy of your script. I have tested this with linux, and even
with the current bugs, I can easily trigger a script by pressing PLAY. I would
like to test with yrou script because I can't think of any other reasons why it
isn't working for you.

-kdf