I am trying to create a simple script with AppleScript to return the signal strength of an Airport network.
The Dictionary for Internet Connect indicates is as follows:
Class AirPort configuration: An AirPort configuration
<Inheritance> configuration -- see the class “configuration” for more properties
AirPort power boolean -- Is the AirPort hardware powered on?
base station ID plain text [r/o] -- the AirPort base station ID
network name plain text -- the AirPort network name
network type plain text [r/o] -- the AirPort network type
signal level integer [r/o] -- the AirPort signal level, a value from 0% to 100%
so it appears there is a way to return the signal level but I have so far been unsuccessful with it.
I have tried:
tell app "Internet Connect"
set sigLev to signal level of Airport configuration "airportnetworkname"
as well as some variations of the above script. The script will compile, but returns errors.
I know this is probably scripting 101 for you experts, thanks in advance for any help.
Now the $64,000 question (not important, just for intellectual curiosity): Why airport configuration 1?
Is the “1” the default airport network…does the number change, for instance, if there are more than one wi-fi networks available?
By the way, great website, I clicked through on your signature, (Script to Markup Code)
What I am ultimately trying to accomplish is a little menu item to display the airport signal strength in the menu bar as a number, rather than bars. Reason being is that my TiPBG4 seems to get sketchy airport performance on 3 bars, which probably corresponds to 50% to 75% (without regard to signal noise). Having an actual number in the menu would be more useful to me than just the airport menu bars.
Your Script Studio project MenuApp looks like it might assist me in that endeavor. I will let you know how it goes when I “finish.”