Thread: Guide me help.
View Single Post
Old 05-27-2003   #2 (permalink)
Madhadder
General "Noob Basher"
 
Madhadder's Avatar
 
Join Date: Apr 2002
Location: Munich, Germany
Posts: 1,620
Here is the Default NS Script
----------------------------------------------------
Default event handler script

'Sub OnEnableScan
' PlaySound "SSROAM.WAV"
'End Sub

'Sub OnDisableScan
' PlaySound "SSROAM.WAV"
'End Sub

'Sub OnScanStart
' PlaySound "Windows XP Balloon.WAV"
'End Sub

'Sub OnScanResult(SSID, BSSID, CapFlags, Signal, Noise, LastSeen) ' NOT YET
' SSID : String : SSID (Network name)
' BSSID : String : BSSID (MAC address)
' CapFlags : Integer : 802.11 capability flags
' Signal : Integer : signal level (dBm)
' Noise : Integer : noise level(dBm)
' LastSeen : Time : When this BSSID was last seen
'End Sub

Sub OnScanComplete(FoundNew, SeenBefore, LostContact, BestSNR) ' NOT YET
' FoundNew : Integer : Count of new BSSIDs
' SeenBefore : Integer : Count of not-new BSSIDs
' LostContact : Integer : Count of BSSIDs missed since last scan
' BestSNR : Integer : SNR of strongest signal (dBm)

' MsgBox "OnScanComplete " & FoundNew & " " & SeenBefore & " " & LostContact & " " & BestSNR
If FoundNew>0 Then
PlaySound "ns-aos-new.WAV"
ElseIf LostContact>0 Then
PlaySound "ns-los.WAV"
ElseIf SeenBefore>0 Then
' Still seeing some
If BestSNR >= 60 Then
PlaySound "ns-signal-6.WAV"
ElseIf BestSNR >= 50 Then
PlaySound "ns-signal-5.WAV"
ElseIf BestSNR >= 40 Then
PlaySound "ns-signal-4.WAV"
ElseIf BestSNR >= 30 Then
PlaySound "ns-signal-3.WAV"
ElseIf BestSNR >= 20 Then
PlaySound "ns-signal-2.WAV"
ElseIf BestSNR >= 10 Then
PlaySound "ns-signal-1.WAV"
Else
PlaySound "ns-signal-0.WAV"
End If
Else
' Nothing seen
' PlaySound "ns-tick.WAV"
End If
End Sub

Dim GPSOk
GPSOk = True

Sub OnGPSTimeout
If GPSOk Then
GPSOk = False
PlaySound "ns-gps-err.WAV"
End If
End Sub

Sub OnGPSNoFix
If GPSOk Then
GPSOk = False
PlaySound "ns-gps-err.WAV"
End If
End Sub

Sub OnGPSPosition (Lat, Lon, Alt)
' Lat : double : Latitude, degrees east
' Lon : double : Longitude, degrees north
' Alt : double : Altitude above sea level, meters
GPSOk = True
End Sub

'Sub OnGPSSpeed (Speed)
' Speed : double : Speed, knots
'End Sub
------------------------------------------------------------------
For more info check the NS FAQ on scripting. There isn't
alot of info, but there should be enough. Write your Script
with any of the following: VB/WSH/JAVA/PERL and maybe
a few others. Whatever language is installed on your PC
can be used.
Madhadder is offline   Reply With Quote