#178117 - 2007-07-20 02:00 PM
Re: How Many Members
[Re: Lonkero]
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
733:
; ChangeLamp.kix
; Automated lightbulb changer
;!
Dim $R,$O,$N,$S,$I,$M,$,$W
"Please enter lightbulb maintenance reference:" Gets $R
$W=@WKSTA
$=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($W)
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($W)
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
;!
|
Top
|
|
|
|
#178118 - 2007-07-20 02:37 PM
Re: How Many Members
[Re: Arend_]
|
Benny69
Moderator
Registered: 2003-10-29
Posts: 1036
Loc: Lincoln, Ne
|
You folks in Europe are always pushing the technological boundaries and coming up with fantastic new ways of doing things, we in the States do things a little different and often takes a different approach.
263
; ChangeLamp.kix
; Automated lightbulb changer
;!
Dim $, $R, $L, $T, $H, $C
$=Lamp
"Please enter lightbulb maintenance reference: " Gets $R
$L=GetObject($+"://"+$R)
If Not($L.Illuminated)
$T=$L.HireSomeOneFromIndiaForTechnicalSupport
$H=$T.HireSomeOneFromChinaToChangeBulb
$C=$H.EatDoughnutAndDrinkCoffeeWhileBulbIsBeingChanged
;EndIf
;!
|
Top
|
|
|
|
#178119 - 2007-07-20 02:53 PM
Re: How Many Members
[Re: Benny69]
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
LOL Benny You forgot:
$C=$J.CallLocalEmployeeToToggle
729:
; 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)
|
Top
|
|
|
|
#178161 - 2007-07-23 09:00 AM
Re: How Many Members
[Re: Lonkero]
|
Arend_
MM club member
Registered: 2005-01-17
Posts: 1895
Loc: Hilversum, The Netherlands
|
The logical error would be that the script assumes a Bayonet type for unscrewing
Logical version for a score of 755
; 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
If $O.Type="Bayonet"
Do
$O.Push
$O.Rotate(-90)
$O.Pull
Until $O.Released
Do
$N=CreateObject($+".Bayonet")
$N.Push
$O.Rotate(90)
If $N.IsHot
$S.Toggle
$=RunFingersUnderColdWater(@WKSTA)
EndIf
until 0=$N.Broken
Else
Do
$O.Rotate(-180)
Until $O.Released
Do
$N=CreateObject($+".Screw")
While $N.Loose
$N.Rotate(180)
If $N.IsHot
$S.Toggle
$=RunFingersUnderColdWater(@WKSTA)
EndIf
Loop
Until 0=$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
;!
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 369 anonymous users online.
|
|
|