Master script for NetStumbler 0.4

Take a script, leave a script - Like the penny tray only different

Postby supermanwah » Tue Nov 15, 2005 8:04 am

Sorry about that Thorn, spaced the "edit" function. My apologies and it won’t happen again. I’ll try to remember my own pooper scooper next time.
Speaking of which,
you should learn why the “Edit” button is ON the page.
would be the proper way to chastise me :) .

I appreciate your guys’ stringent policy on filtering out the hopeless ones (what did you guys call it, the clotii?) from this site as it makes for easy navigating and pretty entertaining reading as well. I’ll try not to clump myself into that hopeless category. Sorry again Thorn.
User avatar
supermanwah
Mini Stumbler
 
Posts: 4
Joined: Sun Nov 06, 2005 6:50 pm

Postby Thorn » Tue Nov 15, 2005 8:08 am

supermanwah wrote:Sorry about that Thorn, spaced the "edit" function. My apologies and it won’t happen again. I’ll try to remember my own pooper scooper next time.
Speaking of which, would be the proper way to chastise me :) .

I appreciate your guys’ stringent policy on filtering out the hopeless ones (what did you guys call it, the clotii?) from this site as it makes for easy navigating and pretty entertaining reading as well. I’ll try not to clump myself into that hopeless category. Sorry again Thorn.

No problem. (By the way, I fixed my post. See? The EDIT button does work. ;))
Thorn
Stop the TSA now! Boycott the airlines.
Thorn
 
Posts: 10340
Joined: Sat Apr 13, 2002 3:00 am
Location: Villa Straylight

Postby supermanwah » Tue Nov 15, 2005 8:11 am

Me too! I forgot the '?' at the end and added some 'edit:' remarks. Thanks again.
User avatar
supermanwah
Mini Stumbler
 
Posts: 4
Joined: Sun Nov 06, 2005 6:50 pm

Postby foz11 » Mon Jan 02, 2006 12:53 pm

[quote="goldfndr"]Anyone else here with Mappoint (Europe or 2004 or not) care to report success/failure with positioning? If failure, I'm interested in the coordinates it chooses]

Im having this problem with me being put in the atlantic ocean when using const CentreVehicle = 1 if this is set to 0 then obvioulsy you lose the vehicle being centred on the map but you can move to were you are currently located.

Location in Atlantic Ocean it seems to lock too.

Latitute 0.01570

Longitute 0.00154

Bit more info for you...im using 20050630.zip, and mappoint euro 2004

Have just tested with 20041124.zip and this feature works ok, opens on position set in settings then updates when you get GPS fixed.
foz11
Mini Stumbler
 
Posts: 1
Joined: Sun Jan 01, 2006 1:50 pm

Postby goldfndr » Mon Jan 16, 2006 12:21 am

foz11 wrote:Im having this problem with me being put in the atlantic ocean when using const CentreVehicle = 1 if this is set to 0 then obvioulsy you lose the vehicle being centred on the map but you can move to were you are currently located.
This was addressed in postings 65 and 66 of this thread. Check it out!

I've added the [thread=18601]Chris H's database[/thread] stuff into another module (with syntax for other databases, e.g. MySQL, SQL Server [just in case someone's doing that, heh]; cleaned/optimized of course) but it needs some testing. Project isn't dead but I've been using Kismet a lot more.
goldfndr
 
Posts: 181
Joined: Sat Aug 28, 2004 3:30 am
Location: Bellevue, WA, USA

Postby goldfndr » Tue Feb 28, 2006 9:53 pm

Finally an update after a frenzy of coding this month. Several new capabilities:
  • Filtering (based on SSID or BSSID)
  • Database writing ([thread=18601]GPS positions based on strongest signal for detections[/thread] and/or multiple readings; also creates database if in "Access format")
  • SubStation Alpha writing ([thread=17773]dubbing format[/thread])
And more; see the first post for details. Please report any bugs here, preferably with exact error messages.

Next up is to make kiswinsound take advantage of the file reading abilities of ns04thread.vbs (rather than shelling out to regtool to write to the registry).
goldfndr
 
Posts: 181
Joined: Sat Aug 28, 2004 3:30 am
Location: Bellevue, WA, USA

Postby Krenath » Sat Mar 11, 2006 12:07 am

Trying to use the new (20060228) Master Script on my machine, but whenever I start NetStumbler, it complains with the following message:
Code: Select all
An Error was reported in your script.

Microsoft VBScript runtime error
File not found
Line: 198: Char: 9
SCode: 800A0035

Then, immediately after that message is the following:
Code: Select all
An Error was reported in your script.

Microsoft VBScript runtime error
Type mismatch: 'Discardable'
Line: 269 Char: 2
SCode: 800A000D

The first error appears to be flagging the following line:

Code: Select all
Private Sub IncludeFile(FileName)
' Includes a file in the global namespace of the current script.
' The file can contain any VBScript source code.
   Const ForReading = 1
[color="Red"]   Dim f: set f = FSO.OpenTextFile(FileName,ForReading)[/color]   
   ExecuteGlobal f.ReadAll()
   f.Close
End Sub


If I wedge in a messagebox to tell me what the value of FileName is, it returns "ns04settings.vbs" yet the file does indeed exist.

I've installed the script in a trackNS subdirectory under C:\Program Files\NetStumbler, and the WAV and CIcons folders do exist as well.

The error occurs whether or not I customize the ns04settings.vbs file. I have touched no other files from the .zip so far.

I'll keep banging on it to see what I can learn. Back in my ASP days, I used to program in VBscript for money so I should eventually be able to get this going, but it'd be nice if someone could just pop in and say something like "Hey! Stupid! You forgot to change line <x>!" and save me a few hours.
Krenath
Mini Stumbler
 
Posts: 2
Joined: Sun Nov 07, 2004 10:34 am

Postby Krenath » Sat Mar 11, 2006 12:19 am

[color="Blue"]Hey, Stupid! Put the scripts and folders in the Network Stumbler directory, not in a subfolder![/color]

I solved my own problem. Feel free to delete these messages if they're just in the way or leave them if you think it might illustrate for others the problem and its solution.
Krenath
Mini Stumbler
 
Posts: 2
Joined: Sun Nov 07, 2004 10:34 am

Postby theprez98 » Sat Mar 11, 2006 7:56 am

Krenath wrote:[color="Blue"]Hey, Stupid! Put the scripts and folders in the Network Stumbler directory, not in a subfolder![/color]

I solved my own problem. Feel free to delete these messages if they're just in the way or leave them if you think it might illustrate for others the problem and its solution.

You can edit and then delete your own messages, but you are probably correct in leaving them here as someone else will inevitably have the same problem.
[font="Courier New"]"\x74\x68\x65\x70\x72\x65\x7a\x39\x38";[/font]
User avatar
theprez98
 
Posts: 3638
Joined: Tue Jan 11, 2005 8:23 pm
Location: Maryland

Postby goldfndr » Tue Mar 14, 2006 12:07 am

Believe it or not, I already anticipated this issue a week or two ago. The newest version of the subroutine will be as follows:
Code: Select all
Private Sub IncludeFile(FileName)
' Includes a file in the global namespace of the current script.
' The file can contain any VBScript source code.
   if not FSO.FileExists(FileName) then
      MsgBox FileName & " does not exist!" & vbCRLF _
        & "Please extract to " & nameDir & "!", vbCritical, nameScript
      WScript.Quit
   end if
   set f = FSO.OpenTextFile(FileName, ForReading)
   ExecuteGlobal f.ReadAll()
   f.Close
End Sub
OTOH, maybe nameDir isn't being set to the ns04master.vbs's folder, I need to check that. It OUGHT to be able to run from any folder (as long as all are extracted there), but it sounds like something broke there. I'll test, thanks.

I've also cleaned up MapPoint (finally), I just hope I didn't break anything (but I'm confident TPEER will step in if I did). There's no longer an Initialized variable or an Initialize subroutine, it's all in-line and more modular. The previous (20060228-) code was checking Initialized in every OnGPSPosition and every OnPositionChange, which seemed horribly wasteful. I couldn't envision a reason not to just perform it once (at the start) and get it over with. Well, maybe it's too slow... but then, everyone should theoretically be starting NetStumbler while not in motion, right? ;) Even if it was slow, any event processing that isn't threaded (heh) halts all NetStumbler processing, otherwise there would've been a reentrancy problem with Initialize being called simultaneously... sorry, just rambling here, sleep deprivation...

The new code also splits ns04master.vbs into two files - a second file, ns04subcalls.vbs (I'm really not sure that that's a good name, maybe ns04events.vbs would be better? Any suggestions?) has each of the event handler subroutines called directly by NetStumbler, which each in turn call the modules' event handling subroutines. ns04master.vbs, which is much smaller without the primary event handler subroutines, does ReadAll on it then Filters it for the Usemodule statements that are False. The result is that it's effectively preprocessed. So, for example, if you aren't using SubStation support, no "If UseSubstation" checks are performed due to being filtered out. Slightly faster code!

I've also unified the GPS variables (OldLat, OldLon, NowLat, NowLon, NowAlt) - many module-specific variables are gone now, and code is simplified, although admittedly the OnGPSPosition code (which sets all five) might be a bit slower now. I'm currently working on eliminating passed arguments (e.g. OnGPSPositionmodule calls no longer pass parameters because the subroutines use the variables). OnScanCompletemodule calls will change radically due to most parameters being ignored (and thus not needing to be passed).
goldfndr
 
Posts: 181
Joined: Sat Aug 28, 2004 3:30 am
Location: Bellevue, WA, USA

Query Error

Postby valic » Wed Mar 15, 2006 7:09 am

Goldfndr,
Great job on the new scripts !!
Wondering if anyone else has seen the following error?
[ATTACH]4812[/ATTACH]
From what I see, it looks like the apostrophe hasn’t been cleaned from the SSID:
Looking at the code here is what I see.
SubRoutine “OnPositionChangeDatabase” Cleans the SSID (Position Table)
SubRoutine “OnGPSPositionDatabase” Doesn’t clean the SSID (Readings Table)
SubRoutine “OnScanResultDatabase” Doesn’t clean the SSID (Readings Table)
Attachments
error.JPG
error.JPG (12.71 KiB) Viewed 2129 times
[SIZE="1"]
APRS is ALMOST as much fun as WarDriving. [URL=http://location.n3ujj.com][color="Red"]
Click here for my last APRS location[/color][/URL]
[INDENT]WigleStats:
Total New Discovered Networks with GPS: 20,343
All Networks Recorded: 24,731
[/INDENT][/SIZE]
User avatar
valic
Mini Stumbler
 
Posts: 20
Joined: Sat Sep 25, 2004 4:42 pm
Location: http://location.n3ujj.com/

Postby streaker69 » Wed Mar 15, 2006 7:29 am

valic wrote:Goldfndr,
Great job on the new scripts !!
Wondering if anyone else has seen the following error?
[ATTACH]4812[/ATTACH]
From what I see, it looks like the apostrophe hasn’t been cleaned from the SSID:
Looking at the code here is what I see.
SubRoutine “OnPositionChangeDatabase” Cleans the SSID (Position Table)
SubRoutine “OnGPSPositionDatabase” Doesn’t clean the SSID (Readings Table)
SubRoutine “OnScanResultDatabase” Doesn’t clean the SSID (Readings Table)


There's two ways to resolve that problem in an SQL query.

Depending upon what I'm doing I either do a replace of the ' with two of them '' or I replace the ' with '. I believe the general accepted way is to replace it with two of them '', not a ".
Treat your gun like your genitals, only whip it out when it's absolutely necessary.
User avatar
streaker69
 
Posts: 11867
Joined: Thu Jul 08, 2004 10:09 am
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA

So

Postby DagNasty » Wed Mar 15, 2006 2:58 pm

You mentioned in another thread the possibility of modifying the autosave time. I didn't know you had access to it through scripting.
DagNasty
Mini Stumbler
 
Posts: 78
Joined: Fri Jan 20, 2006 10:30 am

Query Error

Postby valic » Wed Mar 15, 2006 8:39 pm

I took the "Cleaning Code" and inserted into:
[INDENT]SubRoutine “OnGPSPositionDatabase”
SubRoutine “OnScanResultDatabase” [/INDENT]
and it solved the Query Error

If you don't use the Readings Table (in ns04settings.vbs), you won't have the problem
[SIZE="1"]
APRS is ALMOST as much fun as WarDriving. [URL=http://location.n3ujj.com][color="Red"]
Click here for my last APRS location[/color][/URL]
[INDENT]WigleStats:
Total New Discovered Networks with GPS: 20,343
All Networks Recorded: 24,731
[/INDENT][/SIZE]
User avatar
valic
Mini Stumbler
 
Posts: 20
Joined: Sat Sep 25, 2004 4:42 pm
Location: http://location.n3ujj.com/

Postby DagNasty » Thu Mar 16, 2006 3:38 pm

DagNasty wrote:You mentioned in another thread the possibility of modifying the autosave time. I didn't know you had access to it through scripting.

Whoops.
DagNasty
Mini Stumbler
 
Posts: 78
Joined: Fri Jan 20, 2006 10:30 am

PreviousNext

Return to Scripts

Who is online

Users browsing this forum: No registered users and 8 guests

cron