NetStumbler.org Forums

Go Back   NetStumbler.org Forums > NetStumbler Community > Scripts
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 08-30-2004   #1 (permalink)
FunkyChicken
Sharp MM10 Lover
 
FunkyChicken's Avatar
 
Join Date: Aug 2004
Location: Wales
Posts: 58
Range Sounder

hi guys

im trying to create a script that when an access point is in range i here audiable beeps deepending on the current SNR. I rarely have more then 1 ap active at anyone time.

im new to net stumbler so im not sure the functions that i can use

i want there to be a pause inbetween the beeps relating to the current SNR

instead of OnScanResult will need to use something like OnAPActive

i will want this to run constantly whilst im running ns, in a way it will help me to locate the best snr quickly and easily

Sub OnScanResult(BestSNR)
If BestSNR >= 60 Then
PlaySound "beep.WAV"
ElseIf BestSNR >= 50 Then
WAIT(NOW()+"00:00:00.2")
PlaySound "beep.WAV"
ElseIf BestSNR >= 40 Then
WAIT(NOW()+"00:00:00.4")
PlaySound "beep.WAV"
ElseIf BestSNR >= 30 Then
WAIT(NOW()+"00:00:00.6")
PlaySound "beep.WAV"
ElseIf BestSNR >= 20 Then
WAIT(NOW()+"00:00:00.8")
PlaySound "beep.WAV"
ElseIf BestSNR >= 10 Then
WAIT(NOW()+"00:00:01")
PlaySound "beep.WAV"
Else
End If
End Sub



p.s. do i simply put paste this into notepad and save as *.txt
__________________
Why play deathmatch when you can play dominoes?
FunkyChicken is offline   Reply With Quote
Old 08-30-2004   #2 (permalink)
wrzwaldo
I amuse you?
 
Join Date: Dec 2003
Posts: 9,124
Have you tried the default script?
wrzwaldo is offline   Reply With Quote
Old 08-30-2004   #3 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,000
Quote:
Originally Posted by wrzwaldo
Have you tried the default script?
wrzwaldo knows. The default script and sounds do this already.
__________________
Thorn
Sex and Violence. You can't enjoy one, if you don't survive the other. (And that works both ways...)
Thorn is offline   Reply With Quote
Old 08-31-2004   #4 (permalink)
FunkyChicken
Sharp MM10 Lover
 
FunkyChicken's Avatar
 
Join Date: Aug 2004
Location: Wales
Posts: 58
but where do i adjust this default script?

i cant find it anywhere in the ns program folder

by finding the default script i could learn how it works and slowly make adjustments to suit my preferences
__________________
Why play deathmatch when you can play dominoes?
FunkyChicken is offline   Reply With Quote
Old 08-31-2004   #5 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,000
Quote:
Originally Posted by FunkyChicken
but where do i adjust this default script? ...
It is internal, so you can't adjust it. It is possible to modify it, save it, and run it as an External Script.

Quote:
Originally Posted by FunkyChicken
...i cant find it anywhere in the ns program folder

by finding the default script i could learn how it works and slowly make adjustments to suit my preferences
You can't find it in the folder, because it is internal to the NS EXE file. However a search on the phrase "default script" would bring it up quick enough, right here in the Scripts Forum.

The first time is a freebie. After this, you'll need to figure out how to do your own searches, or you'll get flamed to death.

Code:
' 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
__________________
Thorn
Sex and Violence. You can't enjoy one, if you don't survive the other. (And that works both ways...)
Thorn is offline   Reply With Quote
Old 09-02-2004   #6 (permalink)
goldfndr
Knight Tooth Puller
 
goldfndr's Avatar
 
Join Date: Aug 2004
Location: Bellevue, WA, USA
Posts: 182
Another (arguably better) alternative would be to enable MIDI (last tab of Options). Many modern sound cards support it, and the pitch will change depending on how near/far you are, and it's quicker than playing a sound file - check it out!
goldfndr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 10:13 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.