Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Keyboard Shortcut - Open Google Maps from a Selected Address
#1
Lightbulb 
How are you using Google Maps? Do you have to select an address, copy it to the clipboard, start Google Maps, paste the address, and finally hit "Enter" to get the location? If you are doing this again and again, you may find the following AutoHotkey script useful. Simply select the address and then press the keyboard hotkey. This will bring the address up in Google Maps.

Need help creating a keyboard shortcut with ShortKeeper using the following AutoHotkey code? This 5-minute tutorial will help!
ClipSaved := ClipboardAll
Clipboard =
SendInput, ^c
ClipWait, 2
if ErrorLevel
{
  MsgBox % "Failed attempt to copy text to clipboard."
}
else
{
  SelectedAddress := Trim(Clipboard)
  StringReplace,SelectedAddress,SelectedAddress,`n,%A_SPACE%,A
  StringReplace,SelectedAddress,SelectedAddress,`r,,A
  run % "https://www.google.com/maps/search/" . SelectedAddress . "/"
}
Clipboard := ClipSaved

The selected address can be on several lines. New lines will be replaced with spaces.

This script is optimized to be used with ShortKeeper. As such, there is no "Return" at the end and variable(s) don’t need to be cleared. ShortKeeper will do this automatically. Just copy/paste this code in the PARAM field in ShortKeeper, set your hotkey, save, and you’re ready to use your new keyboard shortcut.
Enterpad: For those who need more than a few shortcuts.

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)