GPS Navigation on Laptop, PC, TabletPC, UMPC, and CarPC
This is a discussion on POI Scanner 1.1 Beta for S&T and Autoroute 2006-2008 within the Free add-ons forums, part of the Microsoft Streets and Trips category; An image makes it easier to understand. The code above is of my test scanner. It repeats the wav sounds ...
|
|||||||
| Register | All Albums | FAQ | Search | Today's Posts | Mark Forums Read |
|
#31
|
|||
|
|||
![]() An image makes it easier to understand. The code above is of my test scanner. It repeats the wav sounds faster than 20 seconds after the initial 5 wav plays. I'll zip up a copy of the regular timed code once you have a chance to test the CPU usage. In the meantime, I've zipped up a copy of the test code scanner for S&T2008 and S&T2006-2007. Code:
$versionnumber = "1.2.3"
;$versionyear = 2008
;$REG_versionnumber = "15.0"
Opt("WinTitleMatchMode", 2)
Opt("WinTextMatchMode", 2)
Opt("MouseClickDelay", 250)
Opt("SendKeyDelay", 250)
Global Const $GUI_EVENT_CLOSE = -3
Global Const $GUI_EVENT_RESTORE = -5
Global Const $GUI_CHECKED = 1
Global Const $GUI_UNCHECKED = 4
Global Const $GUI_SHOW = 16
Global Const $GUI_HIDE = 32
Global Const $GUI_ENABLE = 64
Global Const $GUI_DISABLE = 128
Global Const $GUI_FOCUS = 256
Global Const $ES_READONLY = 0x0800
Global Const $BS_DEFPUSHBUTTON = 0x0001
Global Const $WS_SYSMENU = 0x00080000
Global Const $WS_CAPTION = 0x00C00000
Global Const $WS_POPUP = 0x80000000
Global Const $WS_EX_TOPMOST = 0x00000008
Global Const $LVS_SORTASCENDING = 0X0010
Global Const $LVS_SINGLESEL = 0x0004
Global Const $LVS_NOCOLUMNHEADER = 0x4000
Global Const $LVS_SHOWSELALWAYS = 0x0008
Global Const $LVS_EX_GRIDLINES = 0x00000001
Global Const $LVS_EX_FULLROWSELECT = 0x00000020
Global Const $TCS_MULTILINE = 0x0200
Global Const $TCS_FOCUSNEVER = 0x8000
Global Const $LVM_SETCOLUMNWIDTH = 0x101E
Global Const $LVM_SETEXTENDEDLISTVIEWSTYLE = 0x1036
#Include <GuiSlider.au3>
TraySetToolTip("POI Scanner " & $versionnumber & " for MS S&&&T and Autoroute 2008")
$productname = "- Microsoft Streets & Trips"
$titlebarhight = 30 ;$windowframehight = 4 ;$windowframewidth = 4
Opt("TrayMenuMode", 1)
Opt("TrayOnEventMode", 1)
$exititem = TrayCreateItem("Exit - Quitter")
TrayItemSetOnEvent($exititem, "HandleTray")
TraySetState()
ProcessSetPriority(@ScriptName, 1)
$STpath = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Automap\" & "\15.0" & "\USA", "InstallTo")
$ARpath = RegRead("HKEY_CURRENT_USER\Software\Microsoft\Automap\" & "\15.0" & "\EUR", "InstallTo")
$scan = 0
While 1
If WinExists($productname, "Task Panel") Then
$Zoom_pixel_1 = 310
$Zoom_pixel_2 = 109
$Zoom_pixel_3 = 37
$Zoom_pixel_4 = 15
EndIf
If Not WinExists($productname, "Task Panel") Then
$Zoom_pixel_1 = 350
$Zoom_pixel_2 = 126
$Zoom_pixel_3 = 42
$Zoom_pixel_4 = 17
EndIf
$counter_zoom = 0
Do
if WinActive($productname, "Map Control") Then
Opt("WinTitleMatchMode", 2)
WinActivate("- Microsoft Streets & Trips")
$h_slider = ControlGetHandle("- Microsoft Streets & Trips", "", "msctls_trackbar321")
$x_coord_zoom = _GUICtrlSliderGetPos($h_slider)
$counter_zoom = $counter_zoom + 1
EndIf
Sleep(300)
Until $counter_zoom > 0
$counter_GPS = 0
Do
If WinActive($productname, "Map Control") Then
$pos_AfxWnd802 = ControlGetPos($productname, "", "AfxWnd802")
$left_GPSsearch = $pos_AfxWnd802[0]
$top_GPSsearch = $pos_AfxWnd802[1]
$right_GPSsearch = $pos_AfxWnd802[0] + $pos_AfxWnd802[2]
$bottom_GPSsearch = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
$coord_GPS = PixelSearch($left_GPSsearch, $top_GPSsearch, $right_GPSsearch, $bottom_GPSsearch, 0x800000, 0, 1 )
If Not @error Then
$coord_xGPS = $coord_GPS[0] - $left_GPSsearch - 8
$coord_yGPS = $coord_GPS[1] - $top_GPSsearch - $titlebarhight + 12
$counter_GPS = $counter_GPS + 1
EndIf
EndIf
Sleep(300)
Until $counter_GPS > 0
If WinActive($productname, "Map Control") Then
If $x_coord_zoom <= 100 and $x_coord_zoom > 90 Then ; 100 = 1 km
$left_MaroonTackScan = $pos_AfxWnd802[0]
$top_MaroonTackScan = $pos_AfxWnd802[1]
$right_MaroonTackScan = $pos_AfxWnd802[0] + $pos_AfxWnd802[2]
$bottom_MaroonTackScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
$coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 1 ) ;0x1DA21B FF00FF
If @error Then
$scan = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\ding.wav", 1)
$scan = $scan + 1
EndIf
If $scan > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 90 and $x_coord_zoom > 80 Then ; 100 = 1 km ; 90 = 3 km
$left_MaroonTackScan = $coord_GPS[0] - $Zoom_pixel_1
$top_MaroonTackScan = $coord_GPS[1] - $Zoom_pixel_1
if $top_MaroonTackScan < $top_GPSsearch Then
$top_MaroonTackScan = $pos_AfxWnd802[1]
endif
$right_MaroonTackScan = $coord_GPS[0] + $Zoom_pixel_1
$bottom_MaroonTackScan = $coord_GPS[1] + $Zoom_pixel_1
if $bottom_MaroonTackScan > $bottom_GPSsearch Then
$bottom_MaroonTackScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 1 )
If @error Then
$scan = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\ding.wav", 1)
$scan = $scan + 1
EndIf
If $scan > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 80 and $x_coord_zoom > 70 Then ; 90 = 3 km ; 80 = 8 km
$left_MaroonTackScan = $coord_GPS[0] - $Zoom_pixel_2
$top_MaroonTackScan = $coord_GPS[1] - $Zoom_pixel_2
if $top_MaroonTackScan < $top_GPSsearch Then
$top_MaroonTackScan = $pos_AfxWnd802[1]
endif
$right_MaroonTackScan = $coord_GPS[0] + $Zoom_pixel_2
$bottom_MaroonTackScan = $coord_GPS[1] + $Zoom_pixel_2
if $bottom_MaroonTackScan > $bottom_GPSsearch Then
$bottom_MaroonTackScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 1 )
If @error Then
$scan = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\ding.wav", 1)
$scan = $scan + 1
EndIf
If $scan > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 70 and $x_coord_zoom > 60 Then ; 80 = 8 km ; 70 = 24 km
$left_MaroonTackScan = $coord_GPS[0] - $Zoom_pixel_3
$top_MaroonTackScan = $coord_GPS[1] - $Zoom_pixel_3
if $top_MaroonTackScan < $top_GPSsearch Then
$top_MaroonTackScan = $pos_AfxWnd802[1]
endif
$right_MaroonTackScan = $coord_GPS[0] + $Zoom_pixel_3
$bottom_MaroonTackScan = $coord_GPS[1] + $Zoom_pixel_3
if $bottom_MaroonTackScan > $bottom_GPSsearch Then
$bottom_MaroonTackScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 1 )
If @error Then
$scan = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\ding.wav", 1)
$scan = $scan + 1
EndIf
If $scan > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 60 and $x_coord_zoom > 50 Then ; 70 = 24 km ; 60 = 70km 50 = 175 km
$left_MaroonTackScan = $coord_GPS[0] - $Zoom_pixel_4
$top_MaroonTackScan = $coord_GPS[1] - $Zoom_pixel_4
if $top_MaroonTackScan < $top_GPSsearch Then
$top_MaroonTackScan = $pos_AfxWnd802[1]
endif
$right_MaroonTackScan = $coord_GPS[0] + $Zoom_pixel_4
$bottom_MaroonTackScan = $coord_GPS[1] + $Zoom_pixel_4
if $bottom_MaroonTackScan > $bottom_GPSsearch Then
$bottom_MaroonTackScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 1 )
If @error Then
$scan = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\ding.wav", 1)
$scan = $scan + 1
EndIf
If $scan > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 50 Then ; 50 = 200 km ; 40 = 600 km ; 30 = 1750 km ; 20 = 4750 km
Sleep(100)
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Begin DarkBlue scan
If $x_coord_zoom <= 100 and $x_coord_zoom > 90 Then ; 100 = 1 km
$left_DarkBlueScan = $pos_AfxWnd802[0]
$top_DarkBlueScan = $pos_AfxWnd802[1]
$right_DarkBlueScan = $pos_AfxWnd802[0] + $pos_AfxWnd802[2]
$bottom_DarkBlueScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
$coord_DarkBlueScan = PixelSearch($left_DarkBlueScan, $top_DarkBlueScan, $right_DarkBlueScan, $bottom_DarkBlueScan, 0x000080, 0, 1 ) ;dark blue colour of the pushpin, flag, tack
If @error Then
$scan_DarkBlue = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\chimes.wav", 1)
$scan_DarkBlue = $scan_DarkBlue + 1
EndIf
If $scan_DarkBlue > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 90 and $x_coord_zoom > 80 Then ; 100 = 1 km ; 90 = 3 km
$left_DarkBlueScan = $coord_GPS[0] - $Zoom_pixel_1
$top_DarkBlueScan = $coord_GPS[1] - $Zoom_pixel_1
if $top_DarkBlueScan < $top_GPSsearch Then
$top_DarkBlueScan = $pos_AfxWnd802[1]
endif
$right_DarkBlueScan = $coord_GPS[0] + $Zoom_pixel_1
$bottom_DarkBlueScan = $coord_GPS[1] + $Zoom_pixel_1
if $bottom_DarkBlueScan > $bottom_GPSsearch Then
$bottom_DarkBlueScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_DarkBlueScan = PixelSearch($left_DarkBlueScan, $top_DarkBlueScan, $right_DarkBlueScan, $bottom_DarkBlueScan, 0x000080, 0, 1 )
If @error Then
$scan_DarkBlue = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\chimes.wav", 1)
$scan_DarkBlue = $scan_DarkBlue + 1
EndIf
If $scan_DarkBlue > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 80 and $x_coord_zoom > 70 Then ; 90 = 3 km ; 80 = 8 km
$left_DarkBlueScan = $coord_GPS[0] - $Zoom_pixel_2
$top_DarkBlueScan = $coord_GPS[1] - $Zoom_pixel_2
if $top_DarkBlueScan < $top_GPSsearch Then
$top_DarkBlueScan = $pos_AfxWnd802[1]
endif
$right_DarkBlueScan = $coord_GPS[0] + $Zoom_pixel_2
$bottom_DarkBlueScan = $coord_GPS[1] + $Zoom_pixel_2
if $bottom_DarkBlueScan > $bottom_GPSsearch Then
$bottom_DarkBlueScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_DarkBlueScan = PixelSearch($left_DarkBlueScan, $top_DarkBlueScan, $right_DarkBlueScan, $bottom_DarkBlueScan, 0x000080, 0, 1 )
If @error Then
$scan_DarkBlue = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\chimes.wav", 1)
$scan_DarkBlue = $scan_DarkBlue + 1
EndIf
If $scan_DarkBlue > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 70 and $x_coord_zoom > 60 Then ; 80 = 8 km ; 70 = 24 km
$left_DarkBlueScan = $coord_GPS[0] - $Zoom_pixel_3
$top_DarkBlueScan = $coord_GPS[1] - $Zoom_pixel_3
if $top_DarkBlueScan < $top_GPSsearch Then
$top_DarkBlueScan = $pos_AfxWnd802[1]
endif
$right_DarkBlueScan = $coord_GPS[0] + $Zoom_pixel_3
$bottom_DarkBlueScan = $coord_GPS[1] + $Zoom_pixel_3
if $bottom_DarkBlueScan > $bottom_GPSsearch Then
$bottom_DarkBlueScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_DarkBlueScan = PixelSearch($left_DarkBlueScan, $top_DarkBlueScan, $right_DarkBlueScan, $bottom_DarkBlueScan, 0x000080, 0, 1 )
If @error Then
$scan_DarkBlue = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\chimes.wav", 1)
$scan_DarkBlue = $scan_DarkBlue + 1
EndIf
If $scan_DarkBlue > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 60 and $x_coord_zoom > 50 Then ; 70 = 24 km ; 60 = 70km 50 = 175 km
$left_DarkBlueScan = $coord_GPS[0] - $Zoom_pixel_4
$top_DarkBlueScan = $coord_GPS[1] - $Zoom_pixel_4
if $top_DarkBlueScan < $top_GPSsearch Then
$top_DarkBlueScan = $pos_AfxWnd802[1]
endif
$right_DarkBlueScan = $coord_GPS[0] + $Zoom_pixel_4
$bottom_DarkBlueScan = $coord_GPS[1] + $Zoom_pixel_4
if $bottom_DarkBlueScan > $bottom_GPSsearch Then
$bottom_DarkBlueScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_DarkBlueScan = PixelSearch($left_DarkBlueScan, $top_DarkBlueScan, $right_DarkBlueScan, $bottom_DarkBlueScan, 0x000080, 0, 1 )
If @error Then
$scan_DarkBlue = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\chimes.wav", 1)
$scan_DarkBlue = $scan_DarkBlue + 1
EndIf
If $scan_DarkBlue > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 50 Then ; 50 = 200 km ; 40 = 600 km ; 30 = 1750 km ; 20 = 4750 km
Sleep(100)
EndIf
;;;;;;;;;;;;;;;;Begin Yellow pushpin scan
If $x_coord_zoom <= 100 and $x_coord_zoom > 90 Then ; 100 = 1 km
$left_YellowPushpinScan = $pos_AfxWnd802[0]
$top_YellowPushpinScan = $pos_AfxWnd802[1]
$right_YellowPushpinScan = $pos_AfxWnd802[0] + $pos_AfxWnd802[2]
$bottom_YellowPushpinScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
$coord_YellowPushpinScan = PixelSearch($left_YellowPushpinScan, $top_YellowPushpinScan, $right_YellowPushpinScan, $bottom_YellowPushpinScan, 0x808000, 0, 1 ) ;0x1DA21B FF00FF
If @error Then
$scan_YellowPushpin = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\notify.wav", 1)
$scan_YellowPushpin = $scan_YellowPushpin + 1
EndIf
If $scan_YellowPushpin > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 90 and $x_coord_zoom > 80 Then ; 100 = 1 km ; 90 = 3 km
$left_YellowPushpinScan = $coord_GPS[0] - $Zoom_pixel_1
$top_YellowPushpinScan = $coord_GPS[1] - $Zoom_pixel_1
if $top_YellowPushpinScan < $top_GPSsearch Then
$top_YellowPushpinScan = $pos_AfxWnd802[1]
endif
$right_YellowPushpinScan = $coord_GPS[0] + $Zoom_pixel_1
$bottom_YellowPushpinScan = $coord_GPS[1] + $Zoom_pixel_1
if $bottom_YellowPushpinScan > $bottom_GPSsearch Then
$bottom_YellowPushpinScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_YellowPushpinScan = PixelSearch($left_YellowPushpinScan, $top_YellowPushpinScan, $right_YellowPushpinScan, $bottom_YellowPushpinScan, 0x808000, 0, 1 )
If @error Then
$scan_YellowPushpin = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\notify.wav", 1)
$scan_YellowPushpin = $scan_YellowPushpin + 1
EndIf
If $scan_YellowPushpin > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 80 and $x_coord_zoom > 70 Then ; 90 = 3 km ; 80 = 8 km
$left_YellowPushpinScan = $coord_GPS[0] - $Zoom_pixel_2
$top_YellowPushpinScan = $coord_GPS[1] - $Zoom_pixel_2
if $top_YellowPushpinScan < $top_GPSsearch Then
$top_YellowPushpinScan = $pos_AfxWnd802[1]
endif
$right_YellowPushpinScan = $coord_GPS[0] + $Zoom_pixel_2
$bottom_YellowPushpinScan = $coord_GPS[1] + $Zoom_pixel_2
if $bottom_YellowPushpinScan > $bottom_GPSsearch Then
$bottom_YellowPushpinScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_YellowPushpinScan = PixelSearch($left_YellowPushpinScan, $top_YellowPushpinScan, $right_YellowPushpinScan, $bottom_YellowPushpinScan, 0x808000, 0, 1 )
If @error Then
$scan_YellowPushpin = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\notify.wav", 1)
$scan_YellowPushpin = $scan_YellowPushpin + 1
EndIf
If $scan_YellowPushpin > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 70 and $x_coord_zoom > 60 Then ; 80 = 8 km ; 70 = 24 km
$left_YellowPushpinScan = $coord_GPS[0] - $Zoom_pixel_3
$top_YellowPushpinScan = $coord_GPS[1] - $Zoom_pixel_3
if $top_YellowPushpinScan < $top_GPSsearch Then
$top_YellowPushpinScan = $pos_AfxWnd802[1]
endif
$right_YellowPushpinScan = $coord_GPS[0] + $Zoom_pixel_3
$bottom_YellowPushpinScan = $coord_GPS[1] + $Zoom_pixel_3
if $bottom_YellowPushpinScan > $bottom_GPSsearch Then
$bottom_YellowPushpinScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_YellowPushpinScan = PixelSearch($left_YellowPushpinScan, $top_YellowPushpinScan, $right_YellowPushpinScan, $bottom_YellowPushpinScan, 0x808000, 0, 1 )
If @error Then
$scan_YellowPushpin = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\notify.wav", 1)
$scan_YellowPushpin = $scan_YellowPushpin + 1
EndIf
If $scan_YellowPushpin > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 60 and $x_coord_zoom > 50 Then ; 70 = 24 km ; 60 = 70km 50 = 175 km
$left_YellowPushpinScan = $coord_GPS[0] - $Zoom_pixel_4
$top_YellowPushpinScan = $coord_GPS[1] - $Zoom_pixel_4
if $top_YellowPushpinScan < $top_GPSsearch Then
$top_YellowPushpinScan = $pos_AfxWnd802[1]
endif
$right_YellowPushpinScan = $coord_GPS[0] + $Zoom_pixel_4
$bottom_YellowPushpinScan = $coord_GPS[1] + $Zoom_pixel_4
if $bottom_YellowPushpinScan > $bottom_GPSsearch Then
$bottom_YellowPushpinScan = $pos_AfxWnd802[1] + $pos_AfxWnd802[3] + $titlebarhight
endif
$coord_YellowPushpinScan = PixelSearch($left_YellowPushpinScan, $top_YellowPushpinScan, $right_YellowPushpinScan, $bottom_YellowPushpinScan, 0x808000, 0, 1 )
If @error Then
$scan_YellowPushpin = 0
EndIf
If Not @error Then
SoundPlay(@WindowsDir & "\media\notify.wav", 1)
$scan_YellowPushpin = $scan_YellowPushpin + 1
EndIf
If $scan_YellowPushpin > 4 Then
Sleep(4500)
EndIf
EndIf
If $x_coord_zoom <= 50 Then ; 50 = 200 km ; 40 = 600 km ; 30 = 1750 km ; 20 = 4750 km
Sleep(100)
EndIf
EndIf
Sleep(200)
WEnd
Func HandleTray()
Local $TrayMsg = @TRAY_ID
Switch $TrayMsg
Case $exititem
Exit
EndSwitch
EndFunc
Last edited by toyfountain; January 2nd, 2008 at 01:40 AM. |
|
#32
|
|||
|
|||
|
Marvin
I tried adding this code to let the Scanner detect which S&T is running between 2008 and 2006-2007. It didn't work. Can you suggest an alteration to the code? I have two S&T installed on my computer and would like the POI to be the same for 2006 to 2008. It would be nice to have to avoid using two versions. Code:
If WinExists("AfxWnd802") Then
$pos_AfxWnd802 = ControlGetPos($productname, "", "AfxWnd802")
EndIf
If WinExists("AfxWnd702") Then
$pos_AfxWnd802 = ControlGetPos($productname, "", "AfxWnd702")
EndIf
|
|
#33
|
|||
|
|||
|
It would be easy (via registry) if a user had only one version installed. But some people may have two or more versions. Let me think about it a bit. Now I'm on the road. I just pulled over on the side of the road for a minute to wish you Happy New Year 2008
.
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#34
|
|||
|
|||
|
That's exactly my case. For testing it's best to have both version installed. I have come up with a new way for the wave sound and also found an alternative to scanning for the dark blue. In 2006, they use dark blue for gas stations in the map among several other things. I simply don't want to have to disable the nearby places.
I use the light grey in the tacks and surrounding the black circles-square-triangle. Can not use the yellow and maroon tacks tough because they set off two pixel detection. I have it for done for 2008. As always you need to avoid the POI with the dark burgundy pixels. Here's an image of the pins you should use with it. Do not use the one's surrounded in burgundy with a slash across them. ![]() The ones surrounded in grey play the windows\media\chimes.wav The ones surrounded in yellow play the windows\media\notify.wav The flag surrounded in pink plays the windows\media\ding.wav Happy New Year to you, family and all others too. I'll be hitting the road very soon also. Last edited by toyfountain; January 2nd, 2008 at 01:39 AM. |
|
#35
|
|||
|
|||
|
Quote:
I have good news on the task at hand. There is a way. It can even switch from 2006 to 2008 and vice versa without needing to restart the scanner. It looks for the Connected services button ID position in the 2008 S&T. It even works when the button is hidden with the navigation toolbar closed. All I need to test now is the full screen mode (I think it will work from what I can test at the desk). $pos = ControlGetPos($productname, "", 35332) If @error Then $pos_AfxWnd802 = ControlGetPos($productname, "", "AfxWnd702") Else $pos_AfxWnd802 = ControlGetPos($productname, "", "AfxWnd802") EndIf Last edited by toyfountain; February 17th, 2008 at 06:37 PM. |
|
#36
|
|||
|
|||
|
Ha ha, that's clever! It will not work for Streets & Trips 2009, though
. For S&T Keys I just don't bother. When a new version of Streets & Trips comes out, I just stop working on the existing version. S&T is sooo inexpensive ...
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#37
|
|||
|
|||
|
toyfountain's newest version of POI Scanner is now available at: POI Scanner for Microsoft Streets & Trips
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MS Streets & Trips 2006 Keys v2.42.2 english and S&T 2006 2007 Keys v2.42.2 french | toyfountain | Free add-ons | 19 | August 30th, 2008 10:51 AM |
| POI Scanner for Microsoft Streets & Trips | toyfountain | Free add-ons | 43 | March 10th, 2008 12:03 PM |
| MapPoint Keys and POI Scanner, Please test for bugs. | toyfountain | Microsoft Streets and Trips | 0 | March 5th, 2008 09:40 AM |
| [Beta] S&T Keys version 2.53.1 | Marvin Hlavac | Free add-ons | 0 | November 8th, 2007 02:15 PM |
| New: S&T Keys version 2.52.7.0 (Beta) | Marvin Hlavac | Free add-ons | 0 | October 14th, 2007 05:30 PM |