-
Notifications
You must be signed in to change notification settings - Fork 2
/
TAB功能键测试.au3
246 lines (176 loc) · 2.7 KB
/
TAB功能键测试.au3
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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
HotKeySet("{ESC}", "Terminate")
HotKeySet("{F2}", "Togglepause")
#Include <Date.au3>
Local $Paused,$a,$H = 1
$i = 0
Do
ShellExecute("NetViewer.exe","","C:\Program Files\NetViewer")
WinWait("NetViewer")
WinActivate("NetViewer")
ControlClick("NetViewer","","Edit1")
Send("172.18.6.14")
ControlClick("NetViewer","","Edit2")
Send("2053")
ControlClick("NetViewer","","Edit3")
Send("admin")
ControlClick("NetViewer","","Edit4")
Send("")
sen(4)
;Sen(5)
$j = 0
Do
sen1(7)
$j = $j + 1
Until $j = 5
Send("{tab 5}")
Send("{enter}")
WinWait("NetViewer","","Static17")
Sleep(5*1000)
ControlClick("NetViewer","Remote Setting","Button3")
Sleep(500)
;#cs
;display setup
WinActivate("NetViewer")
sen3()
sen(9)
Sleep(500)
sen4()
sen2()
;record setup
sen3()
sen(13)
Sleep(500)
sen4()
sen2()
;alarm parameters
sen3()
sen(5)
Sleep(500)
sen4()
sen2()
;basic
sen3()
sen(6)
Sleep(500)
sen4()
sen2()
;pppoe
sen3()
sen(3)
Sleep(500)
sen4()
sen2()
;ddns
sen3()
sen(7)
Sleep(500)
sen4()
sen2()
;email setting
sen3()
sen(10)
Sleep(500)
sen4()
sen2()
;hdd
sen3()
sen(2)
Sleep(500)
sen4()
sen2()
;ptz
sen3()
sen(11)
Sleep(500)
sen4()
sen2()
;mobile
sen3()
sen(4)
Sleep(500)
sen4()
sen2()
;motion
sen3()
sen(7)
Sleep(500)
sen4()
sen2()
;system
sen3()
sen(3)
Sleep(500)
sen4()
sen2()
;user
sen3()
sen(6)
Sleep(500)
sen4()
sen2()
;dst
sen3()
sen(13)
Sleep(500)
sen4()
sen2()
;information
sen3()
sen(10)
sen4()
;#ce
Sleep(3000)
ProcessClose ( "NetViewer.exe")
;ControlClick("NetViewer","Logout","Button5")
;WinWait("NetViewer","User Login")
;Sleep(3000)
_write($H)
$H+=1
Sleep(1000)
$i = $i + 1
Until $i = 100000000000000000000000000000000000000
Func _write($H)
$file = FileOpen(@ScriptDir & '\TAB¹¦ÄÜ.ini', 1)
FileWrite($file , $H & 'ʹÓÃTAB¹¦ÄÜ: ' & @year & "/" & @MON & "/" & @mday & " " & @HOUR & ":" & @MIN & ":" & @SEC & @CRLF)
FileClose($file )
EndFunc
func sen($num)
for $k = 1 to $num
winActivate("NetViewer")
Send("{tab}")
Sleep(800)
next
endfunc
func sen2()
WinActivate("NetViewer")
Send("{tab}")
Sleep(10*1000)
endfunc
func sen3()
WinActivate("NetViewer")
send("^{RIGHT}")
Sleep(500)
endfunc
func sen4()
WinActivate("NetViewer")
send("^{left}")
Sleep(500)
endfunc
func sen1($num)
for $k = 1 to $num
WinActivate("NetViewer")
Send("{tab}")
;Sleep(100)
next
endfunc
Func Terminate()
Exit 0
EndFunc
Func Togglepause()
$Paused = NOT $Paused
While $Paused
tooltip("ÔÝÍ£Ò»»á",0,0)
sleep(100)
tooltip("")
WEnd
EndFunc