think different
 
Search on x86OSx.com
 
Á¦¸ñ ÀÛ¼ºÀÚ ³»¿ë ÅÂ±× ÄÚ¸àÆ®


  News and Notice
    °øÁö»çÇ×  [¹ö±×½Å°í]
    »õ·Î¿î ¼Ò½Ä
    IRC ´ëÈ­¹æ
    ³» ½ºÅ©·¦



  Community
    ÀÚÀ¯ °Ô½ÃÆÇ 
    OS X ¼³Ä¡ Tips 
    OS X ¼³Ä¡ Q&A 
    OS X ¼³Ä¡ Èıâ
    ¸¸´É Q&A 




  RealMacCommunity
    µ¥½ºÅ©Å¾ ÆÐ¹Ð¸®
    ¸ÆºÏ&¾ÆÀÌÆù ÆÐ¹Ð¸®



  Software Forum
    OS X Applications
    Other Applications



  Hardware Forum
    MainBoard
    GraphicCard
    SoundCard
    NetworkCard
    Etc Hardware



  Usefulness
    Ãßõ »ç¿ë±â
    À¯¿ëÇÑ »çÀÌÆ®
    BenchMark DB
    Hardware DB
    È¸¿ø ÀåÅÍ 



  Public Data Service
    ÀÚ·á½Ç
    Picture Gallery



x86OSx.com is an open community and we do not offer Mac OS X DVD image files of Apple Inc. Please be aware that doing so is committing an illegal act against Apple Inc. The purpose of this community is to foster information sharing and public use of legal subject matters only.

x86OSx.com



Compatibility Lists


Incompatible Lists








Visitor's Infomation
¿À´Ã ¹æ¹®ÀÚ
¾îÁ¦ ¹æ¹®ÀÚ
Àüü ¹æ¹®ÀÚ
ÃÖ´ë ¹æ¹®ÀÚ



Á¦¸ñ:

Airport On/Off Applescript...

À̸§: Keith
Date: 2010-05-22 12:32Read: 2191
 

       



¾ÖÇýºÅ©¸³Æ® Àß ¾Æ½Ã´ÂºÐ °è½Ã´ÂÁö¿ä?

¸®¾ó¸Æ¿¡¼­ Airport¸¦ ÀÌ¿ëÇØ¼­ Internet SharingÀ» ÇÒ ¼ö ÀÖ½À´Ï´Ù. °øÀ¯±â°¡ µû·Î ÇÊ¿ä¾øÀÌ ¸Æ ÀÚü°¡ °øÀ¯±â°¡ µË´Ï´Ù.
±Ùµ¥ ÀÌ°É ²ô°í ÄÑ´Â°Ô ±ÍÂú¾Æ¼­ ¾ÖÇýºÅ©¸³Æ®·Î ÀÚµ¿È­ Áß ÀÔ´Ï´Ù.
ÄÑ´Â °ÍÀº ÀߵǴµ¥ ²ô´Âµ¥¼­ ¹®Á¦°¡ Àֳ׿ä..

¿¡¾îÆ÷Æ®¸¦ ²¨ÁÖ´Â ¸í·É¾î ºÎºÐ do shell script "sudo networksetup -setairportpower AirPort off"ÀÌ ½ÇÇàÀÌ µÆ´Ù ¾ÈµÆ´ÙÇϳ׿ä..
(ÀÌ ºÎºÐ °íÄ¥ ¼ö ÀÖÀ¸½Å ºÐ °íÃÄÁÖ¼¼¿ä^^)


¿ì¼± ÄÑ´Â ½ºÅ©¸³Æ®ÀÔ´Ï´Ù (Growlµµ ÇÔ²² µË´Ï´Ù. A. Davis¶õ ºÐÀÌ ¸¸µç°ÍÀ» Snow Leopard¿¡ ¸Â°Ô ¼öÁ¤ÇÑ °ÍÀÔ´Ï´Ù)


tell application "System Preferences" to set current pane to pane "com.apple.preferences.sharing"
tell application "System Events" to tell process "System Preferences"
        click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1 of window "Sharing"
        delay 1
        click button "Turn Airport On" of sheet 1 of window "Sharing"
        delay 1
        click button "Start" of sheet 1 of window "Sharing"
        
        
        if (exists sheet 1 of window "Sharing") then
                click button "Start" of sheet 1 of window "Sharing"
        end if
        try
                set message to "Internet Connection Sharing Enabled"
                my growlnote("General Notification", message)
        on error
                set message to "Internet Connection Sharing Failed"
                my growlnote("error notification", message)
        end try
end tell
ignoring application responses
        tell application "System Preferences" to quit
end ignoring

on register_growl()
        try
                tell application "GrowlHelperApp"
                        set the allNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
                        set the enabledNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
                        register as application "Enable Internet Connection Sharing" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Sharing"
                end tell
        end try
end register_growl

on growlnote(growltype, str)
        try
                tell application "GrowlHelperApp"
                        notify with name growltype title growltype description str application name "Enable Internet Connection Sharing"
                end tell
        end try
end growlnote




ÀÚµ¿À¸·Î ²ô´Â ºÎºÐÀÔ´Ï´Ù.
register_growl()

tell application "System Preferences" to set current pane to pane "com.apple.preferences.sharing"
tell application "System Events" to tell process "System Preferences"
        click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1 of window "Sharing"
        
        delay 1
        
  do shell script "sudo networksetup -setairportpower AirPort off"

        
        try
                set message to "Internet Connection Sharing Disabled"
                my growlnote("General Notification", message)
        on error
                set message to "Internet Connection Sharing was Not Enabled"
                my growlnote("error notification", message)
        end try
        
end tell
ignoring application responses
        tell application "System Preferences" to quit
end ignoring

on register_growl()
        try
                tell application "GrowlHelperApp"
                        set the allNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
                        set the enabledNotificationsList to {"General Notification", "Debug Notification", "Error Notification"}
                        register as application "Enable Internet Connection Sharing" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "Sharing"
                end tell
        end try
end register_growl

on growlnote(growltype, str)
        try
                tell application "GrowlHelperApp"
                        notify with name growltype title growltype description str application name "Enable Internet Connection Sharing"
                end tell
        end try
end growlnote



Àڱ⠼Ұ³¸¦ ÀÔ·ÂÇϽÃÁö ¾ÊÀ¸¼Ì½À´Ï´Ù.
       
Àǰß(ÄÚ¸àÆ®)À» ÀÛ¼ºÇÏ½Ç ¼ö ¾ø½À´Ï´Ù. ÀÌÀ¯: ±ÇÇÑÀÌ ¾ø´Â ȸ¿ø·¹º§

       
Copyright 1999-2013 Zeroboard / skin by DQ'Style

About Us          Terms of Use          Privacy Policy

ÀÌ ÀúÀÛ¹°Àº Å©¸®¿¡ÀÌÆ¼ºê Ä¿¸ÕÁî ÄÚ¸®¾Æ ÀúÀÛÀÚÇ¥½Ã-ºñ¿µ¸® 2.0 ´ëÇѹα¹ ¶óÀ̼¾½º¿¡ µû¶ó ÀÌ¿ëÇÏ½Ç ¼ö ÀÖ½À´Ï´Ù.
All user-submitted text and content on this website is licensed under a Creative Commons Attribution-Noncommercial 2.5 License in Korea unless otherwise noted.

Copyright © 23,Aug 2005 x86OSx.com 3rd season, All rights reserved.
Creative Commons License    

Session Excuted : 0.000      
Connect Checked : 0.001      
Query Excuted : 0.007      
PHP Excuted : 0.015      
Check Lists : 0.002      
Skins Excuted : 0.022      
Total Excuted Time : 0.045