Re: Scripting Airport? - solved!
Re: Scripting Airport? - solved!
- Subject: Re: Scripting Airport? - solved!
- From: Charles Arthur <email@hidden>
- Date: Sun, 7 Oct 2001 23:28:22 +0100
At 2:55 pm -0700 7/10/01, bill fancher wrote:
>
I'd try:
>
>
tell application "AirPort Scripting"
>
set thestatus to PPPStatus 1 --of "Apple Base Station 1b63be"
>
set isConnected to status of theStatus is connected
>
quit
>
end tell
>
isConnected
>
>
Don't have the HW to test. Apart from syntax ("status of theStatus"),
>
you might also be seeing a problem with the constant "connected" not
>
being defined outside the app.
Works!
running the above script gives
--> true
(Since I'm online at the moment).
And running
--tested
tell application "AirPort Scripting"
set thestatus to PPPStatus 1 --of "Apple Base Station 1b63be"
set isConnected to status of thestatus
quit
end tell
isConnected
--> connected
(rather than a boolean).
Nice! Interesting point about the names of properties not persisting past
the tell wrapper. I had not come across that before. (Old AS hands shrug
eyebrows and raise shoulders: "Now you have.")
Charles
http://www.ukclimbing.com : 1,000+ British crags, 350+ British climbing walls
- searchable by distance rock type, etc, with 5-day weather forecasts for
every one - plus maps, articles, news, and the New Routes database. There's
even a cool shop attached...