HomeMicrosoftFree add-ons

POI Scanner 1.1 Beta for S&T and Autoroute 2006-2008
[EDIT] New version available at: http://www.laptopgpsworld.com/216-poi-scanner-microsoft-streets-trips

I've just finished a POI Scanner for Microsoft Streets and Trips. This Scanner functions by determining the zoom level range by locating the zoom level in the tracker bar. Then it locates the first dark burgundy pixels in the GPS icon. Once this is known it searches for a pink pixel located in the maroon tack or maroon flag.

If it detects the POI within approximately 500 meters when scanning, it will beep quickly 5 times, then beep once every 20 seconds until you have cleared the POI by 500 meters. The beep is independent of the volume control. Even when the volume is muted the beep will function.

To use this tracker:
1) You must NOT use the red tack, it contains the same colour of burgundy pixels of the GPS icon.
2) You must use the maroon tack or maroon flag for the POI.
3) Avoid using custom made POI which contains pixels of the same colour as the burgundy or pink pixels used in search.
4) Hide places that use the purple icons in Find Nearby Places to avoid false positives recognitions of the maroon tack.

Settings used in testing:
Windows XP normal colours.
This POI was made on a resolution of 1280X800 pixels. It is set to scan for a distance of approximately 500 meters. Using a larger resolution should result in reducing the distance of 500 meters since there will be more pixels.

Download POI SCanner for S&T 2008: POI Scanner for Microsoft Streets & Trips

Download POI Scanner for S&T and Autoroute 2006-2007: POI Scanner for Microsoft Streets & Trips

I do not expect it to work completely in other resolutions yet. I've tested lower resolutions and the zoom track bar appears to remain functional in all resolutions. That's good news. What changes is the scan distance. As the resolution lowers, the distance increases. I expect it to decrease as the resolution increases. I've included the source code if you are interested in modifying the scan distance settings as you wish for your personal use.
Zoom pixel are to set the distance to search for:
$Zoom_pixel_1 = 310
$Zoom_pixel_2 = 109
$Zoom_pixel_3 = 37
$Zoom_pixel_4 = 15

I made a short video of the POI Scanner to help in visualizing how it operates. It's uploaded it on Youtube.
Be sure to raise the volume on your system. It is somewhat low on this video clip. YouTube - POI Scanner for Streets & Trips 2006-2008 beta

It lasts one minute and eight seconds. In it I inserted a maroon flag to indicate a POI on the highway. I used the red tack to simulate the moving GPS icon. When it reaches a distance less than 500 meters, it beeps five times. I then approach the red tack nearer and 20 seconds after the initial quick 5 beeps, it beeps again once. I move back the tack farther than 500 meters for 20 seconds. The Beep counters resets. The next time it detects the POI, it sounds off 5 times again.

I'm sorry for the poor focus, the camera is of the cheap kind sold at Canadian Tire. It does not have a manual focus.
Will be posting modified files in the future as soon as I can. These files contain both the .exe and source (.au3) files.

Bugs to figure out so far:

1) On exit with S&T 2008, S&T 2008 creates an error report when S&T 2008 is closed before the POI Scanner.
2) On exit with S&T 2006, an AutoIt error is made if S&T 2006 is closed if the POI Scanner has not detected a POI.
Marvin Hlavac
I was sooo excited to try it , but Windows Vista doesn't have the green on the zoom slider . Also, my resolution is different.
Can you post a bmp of the slider? I'll try to see if a colour is unique in there. Might as well post a full screenshot too in the resolution you are using. I can try and see what it does to the set scan distance.

Another workaround could be to create a new user account if you can use the Windows XP parameters with Vista. I know in the user account I created for the night mode I talked about earlier, it modified the green colour pixels too.

edit: I just viewed an image with Vista, looks like all grey. I checked using the classic Windows 98 colours. It is a three tone grey. None of which are unique. Your best bet is with a second user account if you can select the Win XP colours on it.
Subject of this post moved to the first post. (video)
Marvin Hlavac
Nice demo on YouTube. And yes, the Vista slider is just a couple of shades of grey. Hmm, doesn't AutoIt have a function that can tell the position of the control? Maybe not, I'm just not sure now. But it may be worth double checking the Help file, or asking in their forum.
I have good news for you. I think I gigured hoe to do it for Vista and Win98. Can you confirm the colours for these three pixels are as shown on the pix.

I used SI ColorPicker to determine the codes
Marvin Hlavac
I'm not on the road today, and my only Vista installation is my mobile pc. But I will do it tomorrow.

I think if you replace this section in the original code, the zoom tracker should work. If you activate the second message box, it should show the pixel count. The maximum zoom should result in 419 for the x coordinate. BTW, I missed a zoom level in my original distance code section for 383 pixels = 70km zoom level. I'll be adding this later. I left three lines for the colours of Vista, XP and classic 98 colours. I left on the Vista line activated in the code below.

$counter_zoom = 0
If WinActive($productname, "Map Control") Then
ControlFocus($productname, "", "msctls_trackbar321")
$pos_msctls_trackbar321 = ControlGetPos($productname, "", 31000)
;MsgBox(0, "Window Stats:", "POS: " & $pos[0] & "," & $pos[1] & " SIZE: " & $pos[2] & "," & $pos[3] )
$left_ZoomScan = $pos_msctls_trackbar321[0]
$top_ZoomScan = $pos_msctls_trackbar321[1]
$right_ZoomScan = $pos_msctls_trackbar321[0] + $pos_msctls_trackbar321[2]
$bottom_ZoomScan = $pos_msctls_trackbar321[1] + $pos_msctls_trackbar321[3] + $titlebarhight

$coord_zoom = PixelSearch($left_ZoomScan, $top_ZoomScan, $right_ZoomScan, $bottom_ZoomScan, 0x958889, 0, 1 ) ; Win Vista
;$coord_zoom = PixelSearch($left_ZoomScan, $top_ZoomScan, $right_ZoomScan, $bottom_ZoomScan, 0x1DA21B, 0, 1 ) ; Win XP style
;$coord_zoom = PixelSearch($left_ZoomScan, $top_ZoomScan, $right_ZoomScan, $bottom_ZoomScan, 0x404040, 0, 1 ) ; classic win 98

If Not @error Then
;MsgBox(0, "X and Y are:", $coord_zoom[0] & "," & $coord_zoom[1]) ;activate this message box to view the pixel count
$x_coord_zoom = $coord_zoom[0]
$counter_zoom = $counter_zoom + 1
Until $counter_zoom > 0

Can you tell me if this exists in Vista
HKEY_LOCAL_MACHINE\Software\Microsoft\Updates\Windows Vista

while not
HKEY_LOCAL_MACHINE\Software\Microsoft\Updates\Windows XP
while not
HKEY_LOCAL_MACHINE\Software\Microsoft\Updates\Windows 98

If this is the case, it might be a way for the scanner to detect on which system it is running and adapting the pixelsearch of the zoom tracker accordingly.
Marvin Hlavac
... or you could use:

If @OSVersion = "WIN_VISTA" Then

Great, even better. I'll try to find a difference when Win XP runs in Win 98 style or XP style.

Plus I just noticed in the help files these, @DesktopWidth
and @DesktopHeight . This could be used to set up different resolution settings for the scan distance.
Marvin Hlavac
I just looked at the pixel values. In RGB format, from left to right, they are 193,193,193 112,112,112 141,141,141
So if I understand correctly. You used RGB dec. I had used RGB hex.
If we are aiming for the far right one which had the RGB hex colour 95,88,89
the line should be?
$coord_zoom = PixelSearch($left_ZoomScan, $top_ZoomScan, $right_ZoomScan, $bottom_ZoomScan, "141141141", 0, 1 )

Can you test it with Vista? You just need to alter the pixelsearch line with the correct code for the far right pixel. You can read the values given by activating the second message box line.

Your values should be

Edit: Or can you post or email an unmodified BITMAP screen capture of the zoom tracker button (or the whole page if need be) using PAINT. When the tracker button is in GIF format it seems to modify the pixels. I have about 4 MB of space left in my email account.
Attached Images
Marvin Hlavac
Here's the screenshot from Vista (in .tif).


I'm going to search to see if there is some function in AutoIt that could tell us the position of the zoom slider. It would make your work easier.
laptopgpsworld.com About