LOL Benny \:\)
You forgot:
 Code:
$C=$J.CallLocalEmployeeToToggle


;\)

729:
 Code:
; ChangeLamp.kix
;	Automated lightbulb changer
;! 
Dim $R,$O,$N,$S,$I,$M,$
"Please enter lightbulb maintenance reference:" Gets $R
$=Lamp
$O=GetObject($+"://"+$R)
$S=GetObject("Switch://"+$R)
If $O.Illuminated | $S.Toggle | $O.Illuminated
  Do
    $O.Push
    $O.Rotate(-90)
    $O.Pull
  Until $O.Released
  If $O.Type="Bayonet"
    Do
      $N=CreateObject($+".Bayonet")
      $N.Push
      If $N.IsHot
        $S.Toggle
        $=RunFingersUnderColdWater(@WKSTA)
      EndIf
    Until NOT $N.Broken
    $O.Rotate(90)
  Else
    Do
      $N=CreateObject($+".Screw")
      While $N.Loose
        $N.Rotate(180)
        If $N.IsHot
          $S.Toggle
          $=RunFingersUnderColdWater(@WKSTA)
        EndIf
      Loop
    Until Not $N.Broken
  EndIf
  $S.Toggle
  If $OState | $O.Illuminated
    $+"successfully changed and tested"+@CRLF
  Else
    $+"still not working. Please try running FixFuse.kix then retry ChangeLamp.kix"+@CRLF
  EndIf
  $S.Toggle
Else
  $+"is OK, no need to change"+@CRLF
EndIf
;!


Edited by apronk (2007-07-20 03:00 PM)