-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdscan_photon.ts
More file actions
110 lines (95 loc) · 2.05 KB
/
Copy pathdscan_photon.ts
File metadata and controls
110 lines (95 loc) · 2.05 KB
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
#dscan phot
:vars
setVar $count 1
setVar $script "(foton'Z!)"
setvar $count1 1
setvar $count2 1
setVar $scancount 1
:main
getWord CURRENTLINE $location 1
if ($location <> "Command")
echo ansi_12 "*not at command prompt*"
halt
else
goto :chk
end
:chk
send "/"
waitFor "Command"
send "d"
waitFor "Sector"
getWord CURRENTLINE $sector 3
setVar $warpcount SECTOR.WARPCOUNT[$sector]
setArray $warptotal $warpcount
setArray $arraydens $warpcount
setArray $arraydens2 $warpcount
send "'" $script " [d_scan] : active my TA*"
goto :eval
:eval
while ($count <= $warpcount)
setVar $warptotal[$count] SECTOR.WARPS[$sector][$count]
add $count 1
end
goto :getinitial
:getinitial
send "sd"
waitFor "Select"
goto :denstriggers
:denstriggers
setTextLineTrigger 1 :setsector "==>"
setTextTrigger 2 :doneinitial "Command "
pause
:setsector
killtrigger 1
killtrigger 2
getWord CURRENTLINE $initialdens 4
striptext $initialdens ","
getWord CURRENTLINE $adjsector 2
setVar $arraydens[$count1] $initialdens
add $count1 1
goto :denstriggers
:doneinitial
add $scancount 1
if ($scancount = 40)
goto :sendss
else
killTrigger 1
setVar $count1 0
setVar $count2 0
end
:scan
send "sd"
waitFor "Select"
# pause
goto :denstriggers2
:denstriggers2
# pause
killAllTriggers
setTextLineTrigger 4 :checksector "==>"
setTextTrigger 5 :doneinitial "[TL=00"
pause
:checksector
killtrigger 4
killtrigger 5
add $count1 1
add $count2 1
getWord CURRENTLINE $dens 4
striptext $dens ","
getWord CURRENTLINE $adjsector1 2
setVar $arraydens2[$count2] $dens
if ($arraydens2[$count2] <> $arraydens[$count1])
goto :fire
else
goto :denstriggers2
end
:fire
killalltriggers
echo ansi_11 "**density change noticed**"
send "c p y " $adjsector1 "* q "
send "'" $script " " $sector " -> " $adjsector1 "*"
halt
:sendss
killalltriggers
send "'" $script " [d_scan] : active my TA*"
setVar $scancount 1
goto :doneinitial