Help Optimizing PLAY MOVIE command

Discuss topics related to the plugins and uses for MLServer beta
Randy
Newbie
Newbie
Posts: 17
Joined: Tue Jan 23, 2007 10:27 pm
Contact:

Help Optimizing PLAY MOVIE command

Postby Randy » Tue Oct 26, 2010 12:39 am

This is my PLAY MOVIE command which works but is not optimized. Some commands are common to all zones and some are zone specific. I could leave it this way but I would like to see the proper way to write this with fewer conditional statements. The order is important.

MLServeCmd.Macro|
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLTCPSend|Send~Denon~PWON!##!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLTCPSend|Send~Denon~MV60!##!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLTCPSend|Send~Denon~SIDVD!##!
MLGenericSerial|Send~V11D~2!
MLCX777ES|PowerOn~<<CHANGERNUMBER>>!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLGenericSerial|Send~PON~3!##!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLLighting|On~TheaterMainLights~25!##!
MLPause|13!
MLCX777ES|DiscDirect~<<CHANGERLOCATION>>~1~1~<<CHANGERNUMBER>>!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLGenericSerial|Send~V1<<CHANGERNUMBER>>D~2!##!
MLConditional|IsEqual##<<CLIENTNAME>>##bedroom##MLGenericSerial|Send~V2<<CHANGERNUMBER>>D~2!##!
MLConditional|IsEqual##<<CLIENTNAME>>##kitchen##MLGenericSerial|Send~V3<<CHANGERNUMBER>>D~2!##!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLPause|10!##!
MLConditional|IsEqual##<<CLIENTNAME>>##theater##MLLighting|Off~TheaterMainLights

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: Help Optimizing PLAY MOVIE command

Postby mcascio » Tue Oct 26, 2010 8:43 am

You could create a variable that determines which room you are in before watching a movie...such as {{clientname}}_vzone = THEATER.

Then based on that variable, you call a macro you've created with the name of the room: Theater.PlayMovieCommand
which would then look more like this: {{{{clientname}}_vzone}}.PlayMovieCommand

You'd need to create a macro for each room that contains the appropriate commands desired per room.
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com


Return to “MLServer Questions & Answers”

Who is online

Users browsing this forum: No registered users and 1 guest