Created
October 16, 2012 21:58
-
-
Save uranusjr/3902309 to your computer and use it in GitHub Desktop.
Connect to specified SSID via Terminal on Mac OS X
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set interface to "enXX" # 把它換成你的無線網卡編號 | |
set ssid to "" # 填入你想連接網路的 SSID | |
set passwd to (text returned of (display dialog "Enter password:" default answer "" with hidden answer)) | |
do shell script "networksetup -setairportnetwork " & interface & " " & (quoted form of ssid) & " " & (quoted form of passwd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment