The Soundsys Selector event seems kind of long but looks like this:

BEGINIF SoundSys Selected Is LT SoundSys Before    ->Check to see if SoundSys Selected has changed
Or SoundSys Selected Is GT SoundSys Before
Do Event-Call Set SS, Yamaha, On                   ->Make sure the receiver is on
If SoundSys Selected Is 0                          ->Make sure SoundSys Selected is a valid number
Or SoundSys Selected Is GT 7
Then SoundSys Selected Set SoundSys Before
Do SoundSys Before Set SoundSys Selected
ENDIF
;
BEGINIF SoundSys Selected Is 1                     ->CD is selected
Then Selected T1<-T1 Text, CD                      ->Display text in item "Text, CD" (CD)
Then IR Yamaha CD Set Send->0                      ->Change input selector on receiver to CD
Then Event-Call Set SoundSys CD                    ->Call the event to turn on the CD Changer
Then IR Sony Play Set Send->1                      ->Insure the changer plays the current CD
ENDIF
If SoundSys Selected Is Not Now 1                  ->If the current SoundSys is no longer CD,
Then Event-Call Set SS, CD, Off                    ->turn off the CD changer
;
If SoundSys Selected Is 2                          ->Tuner is selected
Then Selected T1<-T1 Text, Tuner                   ->Display text in item "Text, Tuner" (Tuner)
Then IR Yamaha Tuner Set Send->0                   ->Change input selector on receiver to Tuner
;
If SoundSys Selected Is 3                          ->DVD is selected
Then Selected T1<-T1 Text, DVD                     ->Display text in item "Text, DVD" (DVD)
Then IR Yamaha DVD/LD Set Send->0                  ->Change input selector on receiver to DVD
Then Event-Call Set SoundSys DVD                   ->Call the event to turn on the DVD Player
If SoundSys Selected Is Not Now 3                  ->If the current SoundSys is no longer DVD,
Then Event-Call Set SS, DVD, Off                   ->turn off the DVD player
;
If SoundSys Selected Is 4                          ->VCR is selected
Then Selected T1<-T1 Text, VCR                     ->Display text in item "Text, VCR" (VCR)
Then IR Yamaha VCR Set Send->0                     ->Change input selector on receiver to VCR
Then Event-Call Set SoundSys VCR                   ->Call the event to turn on the VCR
BEGINIF SoundSys Selected Is Not Now 4             ->If the current SoundSys is no longer VCR,
If Movie Player Is 4                               ->And "Movie Player" = 4
Then Timer, VCR REW Set 300                        ->Rewind the tape and turn off the VCR when finished
Then Movie Player Set 0                            ->Reset "Movie Player"
Else Event-Call Set SS, VCR, Off                   ->If "Movie Player" != 4, turn off the VCR
ENDIF
;
If SoundSys Selected Is 5                          ->Tape is selected
Then Selected T1<-T1 Text, Tape                    ->Display text in item "Text, Tape" (Tape)
Then Status, Tape Set On                           ->Show tape is selected with item "Status, Tape"
Then IR Yamaha Tape Set Send->0                    ->Turn on Tape Monitor
If SoundSys Selected Is Not Now 5                  ->If the current SoundSys is no longer Tape
Then Status, Tape Set Off                          ->Show tape is no longer selected
Then IR Yamaha Tape Set Send->0                    ->Turn off Tape Monitor
;
If SoundSys Selected Is 6                          ->TV is selected
Then Selected T1<-T1 Text, TV/DBS                  ->Show this in the display
Then IR Yamaha TV/DBS Set Send->0                  ->Change input selector on receiver to TV
;
If SoundSys Selected Is 7                          ->Phono is selected
Then Selected T1<-T1 Text, Phono                   ->Show this in the display
Then IR Yamaha Phono Set Send->0                   ->Change input selector on receiver to Phono
;
If Status, VCR Is Off                              ->Since the TV turns itself on, we watch the
And Status, DVD Is Off                             ->DVD Player and the VCR for queues to turn off
Then Event-Call Set SS, Hitachi, Off               ->the TV.
;
If Status, DVD Is Off                              ->Same as above
And Status, VCR Is Off
Then Event-Call Set SS, Hitachi, Off