Switched IPFind.ahk to OpenStreetMap.org for Reliable AutoHotkey GUI Map Embedding

Forget Google Maps for Embedding Simple Maps in an AutoHotkey Graphical User Interface (GUI)—OpenStreetMap Supports iFrame Embedding…and It’s Free!

If you only want a simple reference map for your AutoHotkey GUI, then Google has just made that impossible. Google Maps no longer supports embedding maps in an HTML iFrame. (I wish Google had taken this action before I wrote my last two blogs.) Now, to do anything with Google Maps you must get the API (credit card number required) for even the simplest of things. For many professionals needing the extra features, the API may be worth it. (Google credits $200 each month to low quantity users…at least for now.) But why even bother when OpenStreetMap.org, a public source, offers map embedding free under an open license. Plus, it’s likely to remain free forever.

Last week, I wrote about how to embed a Google map into an AutoHotkey GUI, “Embedding Google Maps in the IPFind.ahk GUI.” Within a day or two, Google blocked all iFrame HTML embedding. (Go figure! I don’t think I’m the only one who might be a little disappointed.) However, that action prompted me to take a closer look at OpenStreetMap.org.

To my delight, I discovered that in my earlier perusal I had overlooked the same type of HTML iFrame embedding that Google once offered (only a week ago)—plus, I found other features that eliminated all of my earlier misgivings about OpenStreetMap.org. Since I had already written the code for adding maps to the IPFind.ahk script using Google, I quickly modified it to use the alternate resource.

While the IPFindGoogleMap.ahk script won’t load any maps, the techniques I introduced in my blogs remain valid. (I plan to leave those blogs intact for future reference.) In this blog, I talk about how to alter the Google Maps IPFind.ahk script to support OpenStreetMap.org.

Continue reading

Embedding Google Maps in the IPFind.ahk GUI (AutoHotkey Web Trick)

Write a Local File to Load HTML iFrame Embedding Code into the ActiveX Control

May 26, 2021, Alert: Wow! That was fast! Google has already disabled this iFrame map embedding technique…at least for Google Maps. Oh, well, I’ve already reverted to using the original IPFindMap.ahk script using OpenStreetMap.org (“Use ActiveX Control to Embed World Maps in AutoHotkey GUI” May 10, 2021). The technique remains valid. I’ll offer another iFrame embedding application soon—this time probably with a weather forecast.

Last time “Embed Google Maps in an AutoHotkey GUI (No API Required!)” I discussed how you can bypass much of the clutter on Web pages by embedding the map, video, or image in an HTML iFrame read directly into the AutoHotkey ActiveX GUI control from a local file. Sites offering this service often supply HTML code generators for copying the appropriate link. Sometimes, as in the case of Google Maps, you will only find the legacy code by searching the Web. (Google wants you to signup for the API.)

I don’t know how long this Google Map feature will work, but for now, it provides a reasonable solution for AutoHotkey users wanting to embed a simple map into an application.

This time, I modified the IPFindMap.ahk script to write the HTML iFrame code to a separate .html file, then use that filename as the destination URL for the AutoHotkey ActiveX GUI control. This allows AutoHotkey to load an interactive Google map for each IP address found in the selected text.

I appreciate this solution because the embedded Google map looks cleaner than the previous OpenStreetMap.org map and displays the foreign map names in English.

Continue reading

Embed Google Maps in an AutoHotkey GUI (No API Required!)

While Not Commonly Advertised, You Can Add a Google Map (YouTube Video or Weather Forecast) to a GUI Without Using an API

May 26, 2021, Alert: Wow! That was fast! Google has already disabled this iFrame map embedding technique…at least for Google Maps. Oh, well, I’ve already reverted to using the original IPFindMap.ahk script using OpenStreetMap.org (“Use ActiveX Control to Embed World Maps in AutoHotkey GUI” May 10, 2021). The technique remains valid. I’ll offer another iFrame embedding application soon—this time probably with a weather forecast.

In my blog “Build a Barebones Web Browser Using the AutoHotkey ActiveX GUI Control,” I discuss a method for viewing Web pages using an ActiveX GUI control. It works fine for my Free AutoHotkey Scripts page, but as soon as I started viewing other common pages such as Google Maps, I ran into problems. If you want to embed a map in your AutoHotkey GUI, then Google wants you to sign up for an Application Programming Interface (API) using a valid credit card. When you register Google effectively gives you the API key free since it offers a $200 monthly credit for each account. Google wants the credit card number just in case…

As part of this initiative, Google has advised that from 16th July 2018, websites using Google Maps are now required to have a valid API key and a linked Google Cloud Platform Account with enabled credit card billing.

Changes to Google Maps API and Google’s New Billing Structure

You can access an extensive amount of information when using APIs and, for many people, that’s the way to go. Although I’ve never ventured into using APIs with AutoHotkey, Joe Glines has published an extensive amount of information—including the tutorial “Connecting to API / Web services.” I’ve considered digging into the topic and may do so in the future.

For now, I plan to demonstrate a trick for displaying a Google Map in an AutoHotkey GUI without signing up for an API. The trick may prove useful in other apps such as playing YouTube videos or embedding weather forecasts in AutoHotkey GUIs without all the extra clutter.

Continue reading

Use ActiveX Control to Embed World Maps in AutoHotkey GUI

By Directly Loading a Map from OpenStreetMap.org into Your AutoHotkey Graphical User Interface (GUI) Pop-up Window, You Can Add Interactive Geographic Locations to All Your Apps

I have some good news and some bad news about using AutoHotkey tools to directly access Web data through the Internet. First the bad news. Since the AutoHotkey tools for downloading and reading Web pages use Internet Explore (built into Windows but no longer supported by Microsoft), Web providers can effectively block access by identifying that user browser. For the good news, you rarely need to use those sites blocking simple little personal apps such as my IPFind.ahk script. So many other sites support location data for IP addresses that I don’t have a problem keeping the script up and running.

For a quick glance at the geographic location of an IP address, insert an OpenStreetMap.org Web window into an AutoHotkey GUI. Hold the mouse cursor over a map and scroll in or out to zoom in or out.

Previously, I had repaired other issues caused by changes in the source Web page and converted the IPFind.ahk script to use a GUI window rather than a MsgBox command. This upgrade facilitated adding links to the app, see “Adding Web Links to the AutoHotkey IPFind.ahk Script,” as well as making the current insertion of interactive maps using the ActiveX GUI control possible. I fixed the IPFind.ahk script problems by switching to another source Web page and added an interactive map from OpenStreetMap.com.

Continue reading

Build a Barebones Web Browser Using the AutoHotkey ActiveX GUI Control

Want to Add a Web Page to a Graphical User Interface (GUI) Window? Use the ActiveX GUI Control!

I’ve often seen the ActiveX GUI control sitting in the AutoHotkey online documentation without investigating it. Only recently when I contemplated adding maps to my IPFind.ahk GUI did my curiosity reactivate my interest. The ActiveX control adds a stripped-down version of an Internet Explorer window to your GUI pop-ups.

The ComputorEdgeScript.ahk Graphical User Interface (GUI) demonstrates a barebones AutoHotkey Web browser without all of the features of today’s bloated software.
Continue reading