GPS Navigation on Laptop PC, TabletPC, UMPC
This is a discussion on A new hotkey to place a pushpin on the map within the Free add-ons forums, part of the Microsoft Streets and Trips category; I think it would work the way you are describing it, but I'm not sure if it would work ...
|
|||||||
| Register | All Albums | FAQ | Search | Today's Posts | Mark Forums Read |
|
#16
|
|||
|
|||
|
I think it would work the way you are describing it, but I'm not sure if it would work satisfactorily for most users. In order for it to work properly, the GPS position would indeed need to be kept centered - users wouldn't be able to use the Dynamic Turn View feature. Also the problem would be the zoom level - at each different zoom level the feature would give POI alerts at completely different distances
![]()
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#17
|
|||
|
|||
|
Marvin
I'm working on it and wrote a code for the pushpin to follow the GPS icon. The GPS will no longer need to kept centered to add a pushpin. This is the new code for 2006 if you wish to try it out early: Func push_pin() reset_hotkeys() Sleep(250) ControlClick($productname, "", $panbutton) ControlClick($productname, "", $panbutton) Sleep(250) MouseMove(600, 400, 0 ) ControlClick($productname, "", $createpushpin) Sleep(250) $pos_AfxWnd702 = ControlGetPos($productname, "", "AfxWnd702") $left_pushpin = $pos_AfxWnd702[0] $top_pushpin = $pos_AfxWnd702[1] $right_pushpin = $pos_AfxWnd702[0] + $pos_AfxWnd702[2] $bottom_pushpin = $pos_AfxWnd702[1] + $pos_AfxWnd702[3] + $titlebarhight $coord_pushpin = PixelSearch($left_pushpin, $top_pushpin, $right_pushpin, $bottom_pushpin, 0x800000, 0, 1 ) If Not @error Then $coord_xpushpin = $coord_pushpin[0] - $left_pushpin - 8 $coord_ypushpin = $coord_pushpin[1] - $top_pushpin - $titlebarhight + 12 ControlFocus($productname, "", "AfxWnd702") Sleep(250) ControlClick($productname, "", "AfxWnd702", "left", 1, $coord_xpushpin, $coord_ypushpin ) EndIf ControlClick($productname, "", $selectbutton) EndFunc I also figured out how to scan for a unique pixel and play a beep sound when it appears, but I'm getting into difficulties there. I'm getting into a loop if I use the while command and it is keeping the other functions from working. If I use processexist it beeps once, but does not scan anymore. How did you manage it for the autoreroute? If figure once this is solved, a routine can be added to shrink or expand the scanned area depending on the zoom level detected. Thinking of using pixelsearch to determine the position of the green tip of the tracker bar. Once the value is known, the scanned area around the GPS icon can be reduced or increased. Last edited by toyfountain; December 8th, 2007 at 05:34 PM. |
|
#18
|
|||
|
|||
|
1. Wow! I suspected you were working on something really hard since you haven't posted in the past few days! If your code is able to follow the GPS icon on the screen, then I think you've done more than I thought was possible using AutoIt. Now it's just a question of how reliable the pushpin function can be in real life usage.
2. I suspect you will figure out how to solve the "stuck-in-the-loop" issue yourself, but feel free to e-mail me your code (and indicate which line it seems to get stuck at). The auto-rerouting code was in the main While loop. If needed it would press F3, and if there was no action required, it did nothing. 3. If I understand correctly, for the purpose of the "beep" function, you are going to be scanning area around the GPS icon, instead of around the centre of the map pane?
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#19
|
|||
|
|||
|
1) Marvin if you want to try it, just replace the pushpin func section in the source code for the beta 2008 in the first post of this thread. Take care to modify AfxWnd702 if it is not the same in 2007 or 2008. It works by recognizing the dark burgundy colour in the center of the GPS icon. I hope 2007 and 2008 uses the same colour in the GPS icon. For 2006, this colour is great because it is not used in any other place I could find on the map except one. The red tack that has it too. Avoid using it in the map, and you can track the GPS icon even in dynamic mode. I've included close ups of the icons.
2) If it can't be done without disrupting Keys, then I was thinking of a separate application that could be started by Keys and it's sole function would be to scan for a unique pixel (light pink) entering a given area (around the coordinates of the GPS icon). Once detected a beep can be sounded until it exits the area. I tried it a half sec beep with a 5 sec sleep mode to have the beep turn on and off. I'll post the code so you can look at it in the following post. 3) Yes, I used the maroon tack because it contains a unique pixel too. It is the light pink one. A custom pushpin could be used, but the colour code would have to be entered in the application by the user. For testing, I tried it with the Map Control pane, but the area could be shrunk to fit aroung the GPS icon. The scanned area could even be shrunk or expanded depending on the zoom level. |
|
#20
|
|||
|
|||
|
Here's the code I used to detect a light pink pixel in a maroon tack. It is named While 10 just to not enter in conflict with any of the other codes you wrote.
While 10 If WinActive($productname, "Map Control") Then $pos_AfxWnd702 = ControlGetPos($productname, "", "AfxWnd702") $left_pushpinscan = $pos_AfxWnd702[0] $top_pushpinscan = $pos_AfxWnd702[1] $right_pushpinscan = $pos_AfxWnd702[0] + $pos_AfxWnd702[2] $bottom_pushpinscan = $pos_AfxWnd702[1] + $pos_AfxWnd702[3] + $titlebarhight $coord_pushpinscan = PixelSearch($left_pushpinscan, $top_pushpinscan, $right_pushpinscan, $bottom_pushpinscan, 0xFF00FF, 0, 1 ) If Not @error Then Beep(500, 200) Sleep(5000) EndIf EndIf WEnd You'll notice I haven't set it to use a small area around the GPS icon yet, nor detect the zoom level. It is a very early idea so far. I'm leaning toward a separate .exe to run in parallel to keys. I used SI ColorPicker t determine the correct Hex code of the pixels in case someone wants to know. It's free ware at Software Institute » Pick pixel colors as HTML, HEX or RGB values Last edited by toyfountain; December 8th, 2007 at 05:09 PM. |
|
#21
|
|||
|
|||
|
That sounds good. I see what you mean by it preventing other functions working. But that's a minor issue. That can either be solved later, or it could be a separate exe. As long as it works reliably
.
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#22
|
|||
|
|||
|
Marvin
Can you write the code for a separate .exe that would run at the same time of Keys? I keep getting script paused when I try it. I'm missing something and do not see what even with the help files. Once the start of the program is done, I can add the script to scan near the GPS icon. |
|
#23
|
|||
|
|||
|
How about inserting the following line within S&T Keys:
If FileExists(@DesktopDir & "\toyfountain.exe") Then Run(@DesktopDir & "\toyfountain.exe") (The @DesktopDir could be substituted for something else.)
__________________
Marvin Hlavac Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics |
|
#24
|
|||
|
|||
|
I got it to work with a separate application, but so far only for the full map pane. As soon as I try to reduce the area, it stops detecting the maroon POI tack I use for the unique pixel.
I suspect it's double looping. It needs to search for the GPS then search for the maroon tack. I am thinking of having Keys write the coords to the ini file. The having the S&T Scanner.exe read the coords from the ini file, then search a cropped area. It might prevent the double looping. Here's beta the code I've set up in S&T Scanner.exe (this is the name of the new application). While 1 If WinActive($productname, "Map Control") Then $pos_AfxWnd702 = ControlGetPos($productname, "", "AfxWnd702") $left_MaroonTackScan = $pos_AfxWnd702[0] $top_MaroonTackScan = $pos_AfxWnd702[1] $right_MaroonTackScan = $pos_AfxWnd702[0] + $pos_AfxWnd702[2] $bottom_MaroonTackScan = $pos_AfxWnd702[1] + $pos_AfxWnd702[3] + $titlebarhight $coord_MaroonTackScan = PixelSearch($left_MaroonTackScan, $top_MaroonTackScan, $right_MaroonTackScan, $bottom_MaroonTackScan, 0xFF00FF, 0, 2 ) ;careful here, the html inserted a line break If Not @error Then Beep(500, 200) Sleep(1000) EndIf EndIf WEnd --------------------------------------------------------------- Here's the beta code I use for the GPS search in Keys.exe unc push_pin() reset_hotkeys() Sleep(250) ControlClick($productname, "", $panbutton) ControlClick($productname, "", $panbutton) Sleep(250) MouseMove(600, 400, 0 ) ControlClick($productname, "", $createpushpin) Sleep(250) $pos_AfxWnd702 = ControlGetPos($productname, "", "AfxWnd702") $left_GPSsearch = $pos_AfxWnd702[0] $top_GPSsearch = $pos_AfxWnd702[1] $right_GPSsearch = $pos_AfxWnd702[0] + $pos_AfxWnd702[2] $bottom_GPSsearch = $pos_AfxWnd702[1] + $pos_AfxWnd702[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 ControlFocus($productname, "", "AfxWnd702") Sleep(250) ControlClick($productname, "", "AfxWnd702", "left", 1, $coord_xGPS, $coord_yGPS ) EndIf ControlClick($productname, "", $selectbutton) EndFunc |
|
#25
|
|||
|
|||
|
Marvin
If you wish to try it out I think this should work in S&T 2008 if the tacks and GPS icons use the same colours as in 2006. Remember use the maroon tack for the Scanner.exe and do NOT use the red tack in the map when tracking the GPS icon to add a pushpin. I joined a file you can download. I took the liberty of renaming the file, build 2.53.2 The scanner should beep 5 times when it finds the maroon tack in the map pane, then it will beep once every 20 seconds. If it fails to detect the pink pixel in the next 20 seconds, the beep resets and the next time it detects the pink pixel, it beeps 5 times again. I think this can be useful to warn of nearby red light cameras or preferred radar areas. I'll work on getting the search area around the GPS icon smaller if this can be done later. Last edited by toyfountain; December 12th, 2007 at 10:39 AM. |
|
#26
|
|||
|
|||
|
Quote:
Please try the file 2.42.5 for 2007 (other thread) and give us feedback on the new pushpin feature. I need to know if the same colour is use as in year 2006 for the GPS icon. If it works and follows the GPS icon, than it's the same. If it doesn't work, we'll have to determine the HEX code for it. You can also try out the new Scanner.exe but only to detect a maroon tack so far, no custom pushpin for now. I can only test year 2006 of S&T. |
|
#27
|
|||
|
|||
|
Marvin
I have a new one to try. Fixed hotkeys ZXCV in full screen, F10 for find nearby should work. The push_pin works in normal mode only. In true full screen it looks like the draw tools are disabled by S&T 2008. The pointer becomes an arrow. BTW: Santa came early this year. I bought the stand alone version 2008. I just installed it. |
|
#28
|
|||
|
|||
|
Hi toyfountain,
J'ai écrit: "J'ai un problème d'affichage aussi bien avec la version anglaise que française des Keys: le texte est trop gros pour les fenêtres et j'en perd une partie ( sur les deux portables)... C'est probablement un problème de résolution d'écran !" Ta réponse: "Est-ce que la résolution du portable est au moins de 800X600? Pourriez-vous prendre une image de votre écran lorsque le texte est trop gros?" La résolution est de 1440 X 900 pixels sur mon Dell Inspiron 640m et de 1400 x 1050 sur mon Dell Inspiron 5160. Je n'ai pas ton adresse de courriel pour t'envoyer des photos, aussi j'utilise ce forum... ![]() Je n'ai pas utilisé les Keys avec Autoroute 2006 et je n'ai pas 2007. ![]() Les 3 fichiers ci-joint te donne une idée de l'affichage avec S&T 2008 sur le Dell Inspiron 5160, c'est à peu près identique avec le 640m. Les 2 ordi utilisent XP familiale. La version française a sensiblement les mêmes problèmes. ![]() Je te reviendrai plus tard si je pense avoir de bonnes suggestions pour les termes de la version française des Keys... ![]() Mes connaissances limitées de l'anglais ne me permettrent pas d'écrire rapidement dans cette langue et les outils de traduction automatique sont pas très fidèles ? ![]() Sorry for this tread in French but my English is limited... And the automatic translators are horrible ! ![]() Alain |
|
#29
|
|||
|
|||
|
nialag
Essaie celui-ci pour le problème du texte. http://www.laptopgpsworld.com/attach...ys_english.zip |
|
#30
|
|||
|
|||
|
Bonjour,
Exactement le même affichage... aucune différence ! Merci Alain |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pushpin links to files and folders | Marvin Hlavac | Microsoft Streets and Trips | 1 | January 4th, 2008 05:51 AM |