Here's a very simply perl script that allows you to pass a single
command line to the SlimServer CLI interface on your localhost.  Change
to suit your needs:

test.pl
----------
use Net::Telnet ();

my $cmd;
my $result;

$cmd = $ARGV[0];
$t = new Net::Telnet (Timeout => 10);
$t->open(Host => "localhost", Port => 9090);
$t->print($cmd);
$result = $t->getline;
$t->print("exit");
print $result;

test with:

perl test.pl 'version ?'

and it will return the version of slimserver.  One Windows, you can
download and install ActivePerl or the cygwin environment to get a perl
interpretor.


-- 
MrC
------------------------------------------------------------------------
MrC's Profile: http://forums.slimdevices.com/member.php?userid=468
View this thread: http://forums.slimdevices.com/showthread.php?t=26293

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to