-
Notifications
You must be signed in to change notification settings - Fork 0
/
TerminalController.wsc
171 lines (145 loc) · 4.5 KB
/
TerminalController.wsc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?xml version="1.0" encoding="UTF-8"?>
<component id="TerminalController">
<?component error="true" debug="true"?>
<registration
description="Windows Terminal Controller"
progid="Terminal.Controller"
version="1.00"
classid="{20011228-5218-767e-8d85-632171029010}"
/>
<public>
<property name="RowLength">
<get />
</property>
<property name="ColumnLength">
<get />
</property>
<property name="Printer">
<put />
</property>
<method name="SetPrinter" />
<method name="SaveCursorPosition" />
<method name="RestoreCursorPosition" />
<method name="HideCursor" />
<method name="ShowCursor" />
<method name="SaveScreen" />
<method name="RestoreScreen" />
<method name="ClearScreen" />
<method name="LimitScoll">
<PARAMETER name="lngTop" />
<PARAMETER name="lngBottom" />
</method>
<method name="ReleseScoll" />
<method name="MoveCursorToTopLeft" />
<method name="MoveCursorTo">
<PARAMETER name="lngRow" />
<PARAMETER name="lngColumn" />
</method>
<method name="MoveCursorToRow">
<PARAMETER name="lngRow" />
</method>
<method name="MoveCursorToColumn">
<PARAMETER name="lngColumn" />
</method>
<method name="MoveCursorUp">
<PARAMETER name="lngCount" />
</method>
<method name="MoveCursorDown">
<PARAMETER name="lngCount" />
</method>
<method name="MoveCursorLeft">
<PARAMETER name="lngCount" />
</method>
<method name="MoveCursorRight">
<PARAMETER name="lngCount" />
</method>
<method name="SetTextStyle">
<PARAMETER name="strStyle" />
</method>
<method name="SetTextColor">
<PARAMETER name="strForegroundColor" />
<PARAMETER name="strBackgroundColor" />
</method>
<method name="ResetTextAttributes" />
</public>
<script language="VBScript" src="TerminalController.vbs" />
<script language="VBScript">
<![CDATA[
Option Explicit
Dim objTerminalController
Set objTerminalController = New TerminalController
Public Function get_RowLength()
get_RowLength = objTerminalController.RowLength
End Function
Public Function get_ColumnLength()
get_ColumnLength = objTerminalController.ColumnLength
End Function
Public Function put_Printer(ByRef objPrinter)
Set objTerminalController.Printer = objPrinter
End Function
Public Function SetPrinter(ByRef objPrinter)
objTerminalController.SetPrinter(objPrinter)
End Function
Public Sub SaveCursorPosition()
objTerminalController.SaveCursorPosition
End Sub
Public Sub RestoreCursorPosition()
objTerminalController.RestoreCursorPosition
End Sub
Public Sub HideCursor()
objTerminalController.HideCursor
End Sub
Public Sub ShowCursor()
objTerminalController.ShowCursor
End Sub
Public Sub SaveScreen()
objTerminalController.SaveScreen
End Sub
Public Sub RestoreScreen()
objTerminalController.RestoreScreen
End Sub
Public Sub ClearScreen()
objTerminalController.ClearScreen
End Sub
Public Sub LimitScoll(ByVal lngTop, ByVal lngBottom)
objTerminalController.LimitScoll lngTop, lngBottom
End Sub
Public Sub ReleseScoll()
objTerminalController.ReleseScoll
End Sub
Public Sub MoveCursorToTopLeft()
objTerminalController.MoveCursorToTopLeft
End Sub
Public Sub MoveCursorTo(ByVal lngRow, ByVal lngColumn)
objTerminalController.MoveCursorTo lngRow, lngColumn
End Sub
Public Sub MoveCursorToRow(ByVal lngRow)
objTerminalController.MoveCursorToRow lngRow
End Sub
Public Sub MoveCursorToColumn(ByVal lngColumn)
objTerminalController.MoveCursorToColumn lngColumn
End Sub
Public Sub MoveCursorUp(ByVal lngCount)
objTerminalController.MoveCursorUp lngCount
End Sub
Public Sub MoveCursorDown(ByVal lngCount)
objTerminalController.MoveCursorDown lngCount
End Sub
Public Sub MoveCursorLeft(ByVal lngCount)
objTerminalController.MoveCursorLeft lngCount
End Sub
Public Sub MoveCursorRight(ByVal lngCount)
objTerminalController.MoveCursorRight lngCount
End Sub
Public Sub SetTextStyle(ByVal strStyle)
objTerminalController.SetTextStyle strStyle
End Sub
Public Sub SetTextColor(ByVal strForegroundColor, ByVal strBackgroundColor)
objTerminalController.SetTextColor strForegroundColor, strBackgroundColor
End Sub
Public Sub ResetTextAttributes()
objTerminalController.ResetTextAttributes
End Sub
]]>
</script>
</component>