Re: Scripting Wireless Connectivity
Re: Scripting Wireless Connectivity
- Subject: Re: Scripting Wireless Connectivity
- From: Jake Pietrykowski <email@hidden>
- Date: Thu, 09 Dec 2004 09:18:35 -0600
Title: Re: Scripting Wireless Connectivity
If you set up a series of "Locations" in the network prefs, each with your desired network ports enabled (airport only, bluetooth only, bluetooth/airport, none, airport/ethernet, bluetooth/ethernet, ethernet only, airport/ethernet/bluetooth, etc...) in each location, you would be able to GUI script the finder to change locations with a script, and thus would achieve the desired result.
So...it IS a GUI script, but you would be GUI-scripting the Apple menu -> Locations...instead of the Airport/Bluetooth menulets.
my example for the office ;-)
tell application "Finder"
activate
tell application "System Events"
tell process "Finder"
tell menu bar 1
tell menu bar item "Apple"
tell menu "Apple"
tell menu item "Location"
tell menu "Location"
click menu item "Office Ethernet-Wireless" --location name
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
Add to the scripts menu and viola!
If you do not have an Airport port configured in the current active location, the airport will be turned OFF. That’s how I achieve and maintain a CLEAN menu bar!
Cheers,
Jake
On 12/8/04 11:23 AM, "Mr Tea" <email@hidden> wrote:
> Is it possible to turn Airport/Bluetooth connectivity on and off with
> AppleScript? What I'm hoping for is something that does the equivalent of
> clicking on the Airport menulet and selecting 'Turn Airport Off/On' from the
> dropdown menu (same with Bluetooth). The aim is to make a bit of extra
> space in the menu bar on my powerbook by getting rid of the
> Airport/Bluetooth menulets and putting connect/disconnect commands in the
> script menu (so gui scripting is not an option).
>
>
> TIA
>
>
> Nick
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden