Laptop GPS World

Laptop GPS World

GPS Navigation on Laptop, PC, TabletPC, UMPC, and CarPC

 
 

A new hotkey to place a pushpin on the map

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; Originally Posted by Marvin Hlavac Hey Toni (a.k.a. Neludok), It's great to see you here! It's ...



Go Back   Laptop GPS World > Software Discussions > Microsoft Streets and Trips > Free add-ons

Register All Albums FAQ Search Today's Posts Mark Forums Read

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old November 1st, 2007, 01:10 AM
 
Join Date: Oct 2007
Posts: 168
Arrow A new hotkey to place a pushpin on the map

Quote:
Originally Posted by Marvin Hlavac View Post
Hey Toni (a.k.a. Neludok),

It's great to see you here! It's been a long time! I'm glad you are still around!

I'm not sure about the hotkey to place a pushpin on the map. I agree it would be a very helpful feature, but even though I've on several occasions thought about it, I just simply don't know a good way of implementing it. I think it would be easily doable in MapPoint, which is programmable, but it is more complicated in AutoRoute and/or Streets & Trips :-(
Not too sure about writing the coding part in autoit but how about this idea for a pushpin hot key?
i) Ensure "keep position centered" is actived (optional if run speed allows it, if not people could activate it manually when they start S&T)
ii) Ensure the Draw toolbar is open. (optional if run speed allows it)
iii) controlclick on "create pushpin" button in the draw toolbar
iv) focus on the map pane
v) control click in the map pane (default is center for x and y coordinates)

In theory, I think that should insert a pushpin at the center of the map pane. If the GPS position is centered in the map, that should create a pushpin at the desired location. What do you think? You have much more experience in this.

Edit:
Did some testing with the draw toolbar open. This code inserts a pushpin in the center of the map pane in my 2006 version where
$createpushpin = 58202
$AfxControlbar702 = 59422

Func create_pushpin()
ControlFocus($productname, "", $AfxControlbar702) ;maybe repeat this line twice for increased reliability.
Sleep(100)
ControlClick($productname, "", $createpushpin)
Sleep(100)
ControlFocus($productname, "", "AfxWnd702") ;maybe repeat this line twice for increased reliability.
Sleep(100)
ControlClick($productname, "", "AfxWnd702")
Sleep(100)
EndFunc

I assigned it F10 temporarily to test. (F10 is assigned to Find nearby places in the 2006 version). If a user keeps the draw toolbar open and Keep position centered, this code might work. Sleep time will have to be adjusted and field testing done. If it's too slow to respond, the pushpin will be off by several meters at 50 km/hr. I noticed the mouse pointer has to be over any point in the map pane for it to click reliably in the center.

Last edited by toyfountain; November 1st, 2007 at 09:06 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2  
Old November 1st, 2007, 02:55 PM
Laptop GPS World
www.laptopgpsworld.com
 
Join Date: Sep 2007
Location: ON, Canada
Posts: 2,029
Default Re: A new hotkey to place a pushpin on the map

toyfountain, that's indeed a clever idea. I've been playing with it this morning. In the past I've tried to attack the problem from a different angle. I think I still may have the old script somewhere on another hard drive. I'll try to look for it. But your idea may be better, I think. But still it is frustrating that accuracy of this will be affected by the inability of the GPS icon to be pinned to one location on the map.

I will still play with it a bit, too.
__________________
Marvin Hlavac

Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3  
Old November 1st, 2007, 08:30 PM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

Quote:
Originally Posted by Marvin Hlavac View Post
toyfountain, that's indeed a clever idea. I've been playing with it this morning. In the past I've tried to attack the problem from a different angle. I think I still may have the old script somewhere on another hard drive. I'll try to look for it. But your idea may be better, I think. But still it is frustrating that accuracy of this will be affected by the inability of the GPS icon to be pinned to one location on the map.

I will still play with it a bit, too.
I was thinking of accuracy too, especially in a moving vehicle. I noticed that once the push pin is created it's placement can be adjusted easily by clicking on the up, down, left and right arrow keys. If a user travels 19m/s (approx 50km/hr) and the push pin needs 2 secs to create it should be off in front by 38m. Maybe creating a routine where after the push pin is created it is moved backwards one, two or three clicks (user preference selectable in options). The push pin accuracy should be close enough. You could also use the same trick you used for auto-reroute. If at a given speed, a known pixel is black you could automatically determine the approximate speed (say in 10km/hr increments) and automatically move back a push pin one or many clicks depending on speed ((((( edit and zoom level)))))).

This is the code I used to test an automatic 4 click down where $b = 4

reset_hotkeys()
ControlFocus($productname, "", $AfxControlbar702)
Sleep(100)
ControlFocus($productname, "", $AfxControlbar702)
Sleep(100)
ControlClick($productname, "", $createpushpin)
Sleep(100)
ControlFocus($productname, "", "AfxWnd702")
Sleep(100)
ControlClick($productname, "", "AfxWnd702")
Sleep(100)
Send("{Down "& $b &"}")

edited to add:
I figure the number of clicks down should be user selectable in page with radio buttons or something similar to set the value of $b. The zoom level of the map affects the distance of each click and I figure the speed should too. Left and right can be adjusted manually on the keyboard should a user make a sharp turn.

I haven't had time to test it on the road to see how it performs. Before doing any extensive codes I think this should be done to check theory with practise.

Last edited by toyfountain; November 4th, 2007 at 11:21 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4  
Old November 6th, 2007, 11:32 PM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

I added a hot key pushpin function to Keys 2006 2.42.2 french/english and Keys 2007 2.42.2 french.

I don't have version 2007, so I had to assume S&T 2007 uses the same code for the pushpin tool bar in the bottom left of the screen.
I used AfxControlbar702 = 59422 and the corresponding pushpin button $createpushpin = 58202
Please tell me if it works for 2007, since I can not test it myself.

The routine will move the mouse over the map, insert a pushpin right in the center of the map. Keep GPS position centered to keep the pushpin close to the desired position.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5  
Old November 7th, 2007, 09:01 AM
Laptop GPS World
www.laptopgpsworld.com
 
Join Date: Sep 2007
Location: ON, Canada
Posts: 2,029
Default Re: A new hotkey to place a pushpin on the map

Nice work! I don't have the 2007 version on this PC, but I looked at the 2008 version, and I see both of the values identical to what you see in v.2006.

S&T 2008:

Create_Pushpin = 58202
Drawing_toolbar = 59422

So I'd say more than likely 2007 is the same in this respect.
__________________
Marvin Hlavac

Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6  
Old November 19th, 2007, 10:37 PM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

Marvin or anyone that wishes to test it.

Is the pushpin created in the center when F6 is pressed?
I used :
$find_nearby = 35311
$panbutton = 35005

Can you test the added hot keys (Z,X,C,V and F10)?

I'll be buying S&T 2008 soon. I've prepared a beta french version of Keys 2008 and added some hot keys, but I can't test it myself.

I've joined a zip file of the french Keys 2008 with the source codel

thanks

Dec 1 edit: File removed since it's been replaced in post #14 below.

Last edited by toyfountain; December 2nd, 2007 at 01:30 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7  
Old November 20th, 2007, 08:58 AM
Laptop GPS World
www.laptopgpsworld.com
 
Join Date: Sep 2007
Location: ON, Canada
Posts: 2,029
Default Re: A new hotkey to place a pushpin on the map

I just downloaded your version and I'm running it now for the first time (S&T 2008 & Vista).

* I love the desktop icon & system tray icon! For those who haven't seen it, the icon is the same as the new favicon.ico you may see in your web browser's address bar. Toyfountain recently created ICO file out of the laptop logo of Laptop GPS World site .

* Wow, you really did translate everything into French! That's a lot of hard work. Will there be an English version released, too?

* F6-key works as designed. It places a pushpin in the centre of visible map area. It doesn't work in the full-screen mode (but it wasn't designed to do so). Users have to keep position centered for the pushpin to be placed approximately at their GPS location.

* I'll be driving with your version the whole day today, and I may give more feedback later in the evening. I will have to re-read your other post to find out what the other hotkeys (Z,X,C,V and F10) do. I'll test them, too.
__________________
Marvin Hlavac

Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8  
Old November 20th, 2007, 10:29 AM
 
Join Date: Oct 2007
Posts: 168
Smile Re: A new hotkey to place a pushpin on the map

F10 is to toggle "Find Nearby".

___Z__X__C__V (they say a picture is worth 1000 words)
Attached Images
File Type: jpg ZXCV.jpg (1.6 KB, 381 views)

Last edited by toyfountain; November 20th, 2007 at 10:32 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9  
Old November 20th, 2007, 10:40 AM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

Quote:
Originally Posted by Marvin Hlavac View Post

* Wow, you really did translate everything into French! That's a lot of hard work. Will there be an English version released, too?
If you want one, I'll do it. It's not that hard to add the code. You did all the hard work already by making the program.

Edit: It's done. I uploaded the file for the english beta. Added the source code and the logo icon too in the zip file.

One note, you'll find you'll need to wait a second between pressing F4 and a hotkey of ZXCV . If its typed too fas, it won't catch the second key. Removing all the line breaks and comments fixes this when compiling the code. Since this is only a beta I left it like this for the moment for testing purposes.

Dec 1 edit: File removed since it's been replaced in post #14 below.

Last edited by toyfountain; December 2nd, 2007 at 01:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10  
Old November 21st, 2007, 01:28 PM
Laptop GPS World
www.laptopgpsworld.com
 
Join Date: Sep 2007
Location: ON, Canada
Posts: 2,029
Default Re: A new hotkey to place a pushpin on the map

I just noticed you edited your post and already attached the English language version. You are too fast . I have been busy with other stuff, and I apologize I haven't had much time doing anything new to S&T Keys lately. But it's great to see that you are working on it!

I've driven several hours yesterday with your French version. The pushpin hotkey works as designed. I like the concept. And I wonder if it would make sense to take it one step further to make it usable even for users who like to drive in full-screen mode, and who don't necessarily drive with "Keep position centered" enabled. But I know it could get quite complicated, and I'm not sure if it would be worth it at the end.

The Z, X... hotkeys I noticed tend to crash S&T Keys in full-screen mode, but I know you didn't design it for full-screen mode. It's not a biggie, and the hotkeys could be easily disabled in full-screen mode. But I think those features do have hotkeys already built into Streets & Trips, for example GPS Task pane has a keyboard shortcut Ctlr+A.

The pushpin idea of yours is very intriguing.
__________________
Marvin Hlavac

Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11  
Old November 22nd, 2007, 12:09 AM
 
Join Date: Oct 2007
Posts: 168
Smile Re: A new hotkey to place a pushpin on the map

Thanks for trying it out.

I did notice the Ctrl+A hotkeys too. The problem I find it's sometimes difficult to press the two keys together one handed while driving. I find it's more suited for the planning at home part. While with the F4 menu keys, one can press F4, concentrate on the road and then press the other key while always keeping one eye on the road.

It's good to know it crashes S&T in full screen mode. The keys can be easily reprogrammed to send the Ctrl+A keys instead of clicking on the button command code. This should make it stable in full screen mode if it is when using the shorcut Ctrl+ A keys. If I were to program it this way using the same letters as S&T it could even assist in remembering the keyboard shortcuts when planning. There is one small problem, S&T has assigned D and R to other functions than Keys.

Edit: One question, can you open a pane in full screen mode using the Ctrl shorcuts? Is it stable if positive? I have 2006 and it does not have true full screen mode. Can't tell how it is in 2007/2008.

For the pushpin, I was thinking it would be best if it could find a pixel like you did in the autoreroute of Keys 2006/2007. If it could be able to find the position of a pixel of the GPS arrow, then the pushpin could be right on target every time in any mode. Unfortunately, I know nothing of this technique you used.

Last edited by toyfountain; November 22nd, 2007 at 12:21 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12  
Old November 22nd, 2007, 08:58 PM
Laptop GPS World
www.laptopgpsworld.com
 
Join Date: Sep 2007
Location: ON, Canada
Posts: 2,029
Default Re: A new hotkey to place a pushpin on the map

* Keyboard shortcuts, such as Ctrl+A, don't work in full-screen navigation mode. But sending a "control click" to the respective buttons does work. However, I don't see too much practical reason to open any of the panes in full-screen mode. I did play with it some time ago, but I decided against it. It created other issues. For example if you open Route Planner in full-screen mode, and if you allow users to enter addresses into RoutePlanner in full-screen mode, it may interfere with the single key shortcuts of S&T Keys.

* Even in windowed mode I have found it more reliable to send "control clicks" to various buttons, rather than sending Ctrl+A, or Ctrl+R, etc.

* The rerouting with the pixel search was quite easy, because all it was doing was looking for a red pixel in a specific area on the screen when Driving Guidance pane was open. However, I don't know how I would go about implementing the pixel search function into the idea you are talking about. I think it would be very complicated.

* Thursday till Sunday I'm w/my wife & daughter some 1000 km away from home, and my online activity will be kept to minimum. I may not be able to reply immediately.
__________________
Marvin Hlavac

Laptop GPS software reviews | Stores offering discounts to our members: Semsons & Co. Inc. and Deluo Electronics
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13  
Old November 23rd, 2007, 11:19 PM
Member
 
Join Date: Nov 2007
Posts: 1
Default Hi Toyfountain

I have been a user of Marv Hlavac's S&T Keys since early this year. I used S&T to plan Trucking related trips and found it a real pain to get my road type prefs the same for each trip template that I set up. It was important to me to have the EXACT same prefs for each and every trip. I approched Marv through the gpspassion forum and to my amazement he was able to pull off exactly what I needed the road prefs to do.

I tossed another feature need at him and he bounced me over to you 'cause you're already working on it.

Pushpin Hot Keys. Here's an excerpt of what I wrote to Marv...

The ability to create a Pushpin from a hotkey that marks the spot that you're at while using GPS Tracking. I'd like to take it just a bit further than Neludok though and suggest Custom Pushpins with different symbols associated to different hotkeys. I'd like to also associate some sort of sound cue to each type that will sound when tracking comes near a previously created pushpin. Here's the reason...


In my new line of work there are various hazards to watch out for along the route as I'm plowing. Thin shoulders, low overhead wires, sleuce pipes, rocks jutting up in dirt roads, etc. I would like to be able to make a "dry run" and mark all of those hazards as I go along. This way I'll know what's coming up and where everything is when it's snow covered or dark out, so that I can react properly for the hazard at hand. It would have been nice to have a marking feature as well when I was running Over the Road.

As Bugs Bunny once said, "Ain't I a Stinker!"

I know this one's a toughie. If it can't be done, just say so and I'll leave ya alone.

Happy Holidays!

So Toyfountain, whatcha think? Can it be done?

Oh, and I downloaded the English version and then tried to run it. It stated that it couldn't find S&T or AutoRoute 2008. Did I grab the wrong version or something? I'm running S&T 2007.

Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14  
Old November 25th, 2007, 10:58 PM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

I don't know if what you ask is possible with S&T. I think some GPS will warn you of an upcoming POI (radar and red light cameras). To be honest , this is a subject I haven't researched much. You can visit POI Loader
for more information on this using a Garmin product.

With S&T 2007, I would try out version 2.42.4 I've posted in the thread for 2006 and 2007.
See: MS Streets & Trips 2006 Keys v2.42.2 english and S&T 2006 2007 Keys v2.42.2 french

The method 2006/2007 inserts a pushpin is slightly different than 2008. I should be updating in a few days to a week, but they both work on the same principal. It inserts a pushpin in the center of the map. GPS should be set to keep it centered. Since it's not always centered, the pushpin will be created near the GPS position, depending on close to the true center it is.

I'm kinda stuck with a cold right now and working on a project for my brother in law. I've been down since Friday. I'll keep your suggestion in mind and see if I can learn if what you ask is possible or not.


Edit: I've added a warning in the F4 menu not to use the ZXCV hotkeys when in full screen mode with S&T 2007-2008 and uploaded new files below.

Last edited by Marvin Hlavac; February 6th, 2008 at 01:55 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15  
Old December 2nd, 2007, 02:25 AM
 
Join Date: Oct 2007
Posts: 168
Default Re: A new hotkey to place a pushpin on the map

Quote:
Originally Posted by Driven1 View Post
I'd like to also associate some sort of sound cue to each type that will sound when tracking comes near a previously created pushpin.

Thanks!
Marvin, I was thinking if a unique colour like turquoise is used for a pushpin (or any colour not found in the map), can a pixel search scan of an area similar to that of the yellow section be possible? If the GPS is kept centered and with map rotated to follow travel direction, when the turquoise pixel enters in the scanned area as one drives along, a wav file could be played. It could warn of an incoming speed zone or camera, road hazard etc. Is this feasible? What do you think?
Attached Images
File Type: jpg pushpin.jpg (51.0 KB, 12 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
BRING BACK FULL PUSHPIN LIBRARY SpadesFlush Wish List 3 October 15th, 2008 08:32 AM
Destination ETA/Data all in one place cooknkpl Wish List 1 August 28th, 2008 03:22 PM
Can I Create CUSTOM "show place" map icons in Streets & Trips? bikerjoe Microsoft Streets and Trips 9 August 7th, 2008 07:48 PM
Export pushpin data from Streets and Trips? JeepGuy Microsoft Streets and Trips 1 July 27th, 2008 08:35 PM
Pushpin links to files and folders Marvin Hlavac Microsoft Streets and Trips 1 January 4th, 2008 06:51 AM


All times are GMT -4. The time now is 02:15 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
Copyright © 2007 - 2008 Laptop GPS World. All Rights Reserved.