Elevate Your Flight Sim Experience

Quick Access to Real-World Airport Data with AppleScript

Welcome, flight sim enthusiasts! If you’re a fan of immersive flying experiences in games like Microsoft Flight Simulator 2020 or X-Plane, you know how crucial accurate airport information can be to enhance your virtual flights. Today, I’m thrilled to share a simple yet effective AppleScript that can elevate your flight simulation experience. This script enables you to quickly pull up detailed airport information from FlightAware just by entering an ICAO airport code. Ideal for virtual pilots who want to plan realistic routes or explore new airports in their simulator, this easy-to-use tool seamlessly integrates real-world aviation data into your flight sim setup. Join me as we dive into how you can create this handy script on your Mac, blending the lines between simulation and reality for a more enriched flying experience.

-- Start of the script
tell application "System Events"
    -- Prompt the user to enter the airport code in ICAO format
    display dialog "Enter the Airport code in ICAO format (e.g., KLAX, KJFK):" default answer "" buttons {"Cancel", "OK"} default button "OK" with icon note
    -- Store the user input in a variable
    set airportCode to text returned of result
    -- Check if the user entered a code
    if airportCode is equal to "" then
        display dialog "No airport code was entered. Please try again." buttons {"OK"} default button "OK" with icon stop
        return
    end if
end tell

-- Construct the URL using the provided airport code
set baseURL to "https://www.flightaware.com/resources/airport/"
set fullURL to baseURL & airportCode & "/IAP/all/pdf"

-- Open the URL in Google Chrome
tell application "Google Chrome"
    -- Check if Chrome is running, and start it if not
    if not (exists window 1) then reopen
    activate
    -- Open a new tab with the URL
    open location fullURL
end tell
-- End of the script

After copying the AppleScript above, open the Script Editor on your Mac, which you can find in the /Applications/Utilities folder. Paste the script into a new document. You can run the script directly from the Script Editor to test its functionality. Once you’re satisfied with how it works, you can easily convert it into a standalone application. To do this, go to the File menu in Script Editor and select ‘Save.’ In the dialog box that appears, choose a name for your application, and importantly, set the File Format to ‘Application.’ Save it to your desired location. Now, you have a fully functional app that you can launch with a click! This app will prompt you for an ICAO airport code and automatically open the corresponding FlightAware page in your browser. It’s a handy tool for flight sim enthusiasts, pilots, or anyone interested in aviation, and a great example of the practical uses of AppleScript on your Mac.

In conclusion, this simple yet powerful AppleScript is more than just a quick way to access airport codes and charts; it’s a bridge between the real world of aviation and the virtual skies of flight simulation games. By seamlessly integrating real-world airport data into your flight sim experience, you’re not only enhancing the realism of your virtual flights but also gaining valuable insights into the intricacies of airport layouts and operations. Whether you’re meticulously planning a virtual flight in Microsoft Flight Simulator 2020, exploring new destinations in X-Plane, or just curious about aviation, this tool brings a wealth of real-time information to your fingertips. It exemplifies how a small script can significantly enrich your gaming experience, making every takeoff and landing more authentic and informed.

After putting it off, for a while, I finally decided to re-do my website.  No templates, no Front Page… just me and some html & css.  Except for the Javascript that I used to switch styles.  Turned out decent.  Still working on it though, need to alter the background on a few, and get a good color scheme down.  Feel free to let me know what you think.