Professional Documents
Culture Documents
“ LIFT “
ARIF MUTTAQIN
09520244031
F 3.2
FAKULTAS TEKNIK
TAHUN 2010
Script dari program :
Dim lift As Integer
Dim pintu As Integer
Dim pintu1 As Integer
Dim A, B, C, D, E, F, G, H, I, P As Integer
A=0
If Command1.Caption = "A" Then
Command1.Caption = "^"
A=1
ElseIf Command1.Caption = "^" Then
Command1.Caption = "A"
A=0
Timer1.Enabled = True
End If
End Sub
B=0
If Command2.Caption = "A" Then
Command2.Caption = "^"
B=1
ElseIf Command2.Caption = "^" Then
Command2.Caption = "A"
B=0
Timer1.Enabled = True
End If
End Sub
C=0
If Command3.Caption = "A" Then
Command3.Caption = "^"
C=1
ElseIf Command3.Caption = "^" Then
Command3.Caption = "A"
C=0
Timer1.Enabled = True
End If
End Sub
D=0
If Command4.Caption = "A" Then
Command4.Caption = "^"
D=1
ElseIf Command4.Caption = "^" Then
Command4.Caption = "A"
D=0
Timer1.Enabled = True
End If
End Sub
E=0
If Command5.Caption = "V" Then
Command5.Caption = "v"
E=1
ElseIf Command5.Caption = "v" Then
Command5.Caption = "V"
E=0
Timer1.Enabled = True
End If
End Sub
F=0
If Command6.Caption = "V" Then
Command6.Caption = "v"
F=1
ElseIf Command6.Caption = "v" Then
Command6.Caption = "V"
F=0
Timer1.Enabled = True
End If
End Sub
G=0
If Command7.Caption = "V" Then
Command7.Caption = "v"
G=1
ElseIf Command7.Caption = "v" Then
Command7.Caption = "V"
G=0
Timer1.Enabled = True
End If
End Sub
H=0
If Command8.Caption = "V" Then
Command8.Caption = "v"
H=1
ElseIf Command8.Caption = "v" Then
Command8.Caption = "V"
H=0
Timer1.Enabled = True
End If
End Sub
Private Sub Command12_Click()
End Sub
Private Sub Command11_Click()
End Sub
Private Sub Command9_Click()
End Sub
If lift = 0 Then
If A = 1 Then
Shape1.FillColor = &HFF&
Shape2.FillColor = &H0&
Shape3.FillColor = &H0&
Shape4.FillColor = &H0&
Shape5.FillColor = &H0&
lift = 1
Timer1.Enabled = False
Shape6.FillColor = &HFFFF&
Shape7.FillColor = &HFF00&
Shape8.FillColor = &HFF00&
Shape9.FillColor = &HFF00&
Shape10.FillColor = &HFF00&
H=0
Shape12.FillColor = &H0&
Command1.Caption = "A"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &HFF&
Shape2.FillColor = &H0&
Shape3.FillColor = &H0&
Shape4.FillColor = &H0&
Shape5.FillColor = &H0&
lift = 1
Shape6.FillColor = &HFFFF&
Shape7.FillColor = &H0&
Shape8.FillColor = &H0&
Shape9.FillColor = &H0&
Shape10.FillColor = &H0&
Shape12.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
B=0
A=0
H=0
Shape11.FillColor = &H0&
Command2.Caption = "A"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &HFF&
Shape3.FillColor = &H0&
Shape4.FillColor = &H0&
Shape5.FillColor = &H0&
lift = 2
Shape6.FillColor = &H0&
Shape7.FillColor = &HFFFF&
Shape8.FillColor = &H0&
Shape9.FillColor = &H0&
Shape10.FillColor = &H0&
A=0
Shape11.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
A=0
B=0
Shape12.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
F=0
Shape13.FillColor = &H0&
Command4.Caption = "A"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &H0&
Shape3.FillColor = &H0&
Shape4.FillColor = &HFF&
Shape5.FillColor = &H0&
lift = 4
Shape6.FillColor = &H0&
Shape7.FillColor = &H0&
Shape8.FillColor = &H0&
Shape9.FillColor = &HFFFF&
Shape10.FillColor = &H0&
C=0
Shape13.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
D=0
Shape14.FillColor = &H0&
Command5.Caption = "V"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &H0&
Shape3.FillColor = &H0&
Shape4.FillColor = &H0&
Shape5.FillColor = &HFF&
lift = 5
Shape6.FillColor = &H0&
Shape7.FillColor = &H0&
Shape8.FillColor = &H0&
Shape9.FillColor = &H0&
Shape10.FillColor = &HFFFF&
C=0
D=0
Shape14.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
E=0
D=0
Shape15.FillColor = &H0&
Command6.Caption = "V"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &H0&
Shape3.FillColor = &H0&
Shape4.FillColor = &HFF&
Shape5.FillColor = &H0&
lift = 6
Shape6.FillColor = &H0&
Shape7.FillColor = &H0&
Shape8.FillColor = &H0&
Shape9.FillColor = &HFFFF&
Shape10.FillColor = &H0&
E=0
Shape15.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
F=0
C=0
Shape14.FillColor = &H0&
Command7.Caption = "V"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &H0&
Shape3.FillColor = &HFF&
Shape4.FillColor = &H0&
Shape5.FillColor = &H0&
lift = 7
Shape6.FillColor = &H0&
Shape7.FillColor = &H0&
Shape8.FillColor = &HFFFF&
Shape9.FillColor = &H0&
Shape10.FillColor = &H0&
F=0
Shape14.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
G=0
B=0
Shape13.FillColor = &H0&
Command8.Caption = "V"
Label1.Caption = "Pintu Lift Terbuka"
Label1.ForeColor = &HFF00&
Label2.Caption = "Silahkan Masuk><Keluar"
Else
Shape1.FillColor = &H0&
Shape2.FillColor = &HFF&
Shape3.FillColor = &H0&
Shape4.FillColor = &H0&
Shape5.FillColor = &H0&
lift = 0
Shape6.FillColor = &H0&
Shape7.FillColor = &HFFFF&
Shape8.FillColor = &H0&
Shape9.FillColor = &H0&
Shape10.FillColor = &H0&
G=0
Shape13.FillColor = &H0&
Label1.Caption = "Pintu Lift Tertutup (Jalan)"
Label1.ForeColor = &HFF&
Label2.Caption = ""
End If
End If
End Sub
Print screen :