I’ve been playing around with the files in “/usr/share/misc/” for fun. So I tried running this script to see if I could extract Air Port Codes. It works, but…
repeat
display dialog "Enter the Name of a Major City, State, or Country to Display it's Airport Codes" default answer "St.\ Louis"
set airCode to (text returned of result)
try
do shell script "grep -i " & airCode & " /usr/share/misc/airport"
display dialog result buttons {"OK"} default button "OK"
on error
display dialog "I Couldn't Find an Airport Code for "" & airCode & "". Sorry About That!" buttons {"Cancel", "OK"} default button "OK"
end try
end repeat
how do I get it to show a larger window so that doesn’t truncate the list of airport codes displayed? For instance, type in “USA” or “Canada” and you’ll see that the last codes displayed are cut short in the dialog window.
btw, if you want to enter a name that has spaces (like Salt Lake City) you’ll need to escape the spaces like this (Salt Lake City) in the default answer Dialog window