Agent for launching random programs?

Please post general questions about MainLobby here
chuck99z28
Intermediate
Intermediate
Posts: 346
Joined: Mon Aug 27, 2012 2:10 pm
Contact:

Agent for launching random programs?

Postby chuck99z28 » Sat Dec 08, 2012 11:40 am

Is there an agent which wil launch a program on an agent host?

Like avagent launches VLC with command line options.

I use Luxriot for security cameras, and it has a client which can launch in full screen mode.
I'd like to be able to luanch it to a remote monitor.

The other option is to use the IPCamera method, but I have seven cameras recording to Luxriot.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Agent for launching random programs?

Postby CinemarDave » Sat Dec 08, 2012 11:53 am

Yes, send the command through the AVDriver to the remote Agent with
AV|<<id>>~Run~PathToTheProgram~OptionalParameters

chuck99z28
Intermediate
Intermediate
Posts: 346
Joined: Mon Aug 27, 2012 2:10 pm
Contact:

Re: Agent for launching random programs?

Postby chuck99z28 » Sun Dec 09, 2012 1:37 pm

Cool, thanks.

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Agent for launching random programs?

Postby albright_family » Sat Dec 29, 2012 6:00 pm

CinemarDave wrote:Yes, send the command through the AVDriver to the remote Agent with
AV|<<id>>~Run~PathToTheProgram~OptionalParameters


So I just created a few EXE files in VB that grab the VLC window that the AV Agent creates and then use SendKeys to send the hotkeys Ctrl+Left or Ctrl+Right to that window, in effect jumping forward/backwards 1 minute in the currently playing show. It works wonderfully when I am physically launching the apps from the computer, but I have tried the above code and it doesn't seem to work.

Here is how it is programmed in:
AV|{{movies_activeplayer_{{clientname}}}}~Run~C:\VLC_Move\mediumForward.exe
or
AV|{{movies_activeplayer_{{clientname}}}}~Run~C:\VLC_Move\mediumBackward.exe

The {{movies_activeplayer_{{clientname}}}} translates to vlc.

However when run through the client or server I show no record of the command reaching the AV Agent. Do I have something typed incorrectly?

Thank you for the help. (And the programs I created I will freely give out to whomever wants them.)

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Agent for launching random programs?

Postby CinemarDave » Sat Dec 29, 2012 6:06 pm

You are sending the commands to the VLC driver. You need to send commands to the AVDriver. Do not use {{movies_activeplayer_{{clientname}}}} you have to use the ID of the AVDriver device on that PC.

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Agent for launching random programs?

Postby albright_family » Sat Dec 29, 2012 6:23 pm

CinemarDave wrote:You are sending the commands to the VLC driver. You need to send commands to the AVDriver. Do not use {{movies_activeplayer_{{clientname}}}} you have to use the ID of the AVDriver device on that PC.


So using the command builder I came up with the following command:
AV|1~Run~C:\VLC_Move\mediumBackward.exe

Would this be correct? I tried running it from the command builder however it doesn't seem to work.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Agent for launching random programs?

Postby CinemarDave » Sat Dec 29, 2012 6:51 pm

Does AV|1 equate to a AVDriver type device in Family Manager?

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Agent for launching random programs?

Postby albright_family » Sat Dec 29, 2012 7:02 pm

CinemarDave wrote:Does AV|1 equate to a AVDriver type device in Family Manager?

No I just found AVDriver in the Family Manager. I am setting it up as AV|5. The MoviesPC (the one playing the movies), is located at 192.168.2.10, what port would I use to set this up?
Last edited by albright_family on Sat Dec 29, 2012 7:11 pm, edited 2 times in total.

User avatar
CinemarDave
Site Admin
Site Admin
Posts: 10535
Joined: Fri Feb 07, 2003 8:56 am
Location: Planet Earth
Contact:

Re: Agent for launching random programs?

Postby CinemarDave » Sat Dec 29, 2012 7:05 pm

You do not need to define the port for any on the Cinemar AV Drivers.

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Agent for launching random programs?

Postby albright_family » Sat Dec 29, 2012 7:11 pm

CinemarDave wrote:You do not need to define the port for any on the Cinemar AV Drivers.


So I have the AVDriver set up as follows:
AV5 | AVDriver | AV Driver | Living Room | [blank] | 192.168.2.10 | Default IP Port

I then try sending the command as follows:
AV|5~Run~C:\Move_VLC\mediumForward.exe

In the AVAgent on the other computer under Sessions, I have 2 sessions. And in the logs I now get this:
12/29/2012 4:04:47 PM ProcessCommand Cmd=[AVDriver~Run~C:\Move_VLC\mediumForward.exe~] Client=[AV5]
12/29/2012 4:04:47 PM SystemCmd Error at SystemCmd at line #4250 - The system cannot find the file specified
12/29/2012 4:04:52 PM ProcessCommand Cmd=[AVDriver~Run~C:\Move_VLC\mediumForward.exe~] Client=[AV5]
12/29/2012 4:04:52 PM SystemCmd Error at SystemCmd at line #4250 - The system cannot find the file specified

Although the file is at that exact location on the remote PC, what am I missing

User avatar
albright_family
Intermediate
Intermediate
Posts: 456
Joined: Sat Oct 22, 2005 9:41 pm
Location: Lakewood, WA
Contact:

Re: Agent for launching random programs?

Postby albright_family » Sun Dec 30, 2012 12:03 am

For whatever reason, I did a copy and paste of the command line for the programs and now it works. (I must have had an extra space in there somewhere.) And it works quite well, if any of you would like copies of the programs I made (they are quite simple ones I made in VB.Net.

Enjoy!!
You do not have the required permissions to view the files attached to this post.


Return to “MainLobby Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest