¸ðµç ±â´ÉÀ» Æ÷ÇÔÇØ¼ º¸±â : AppleScript: »ç¿îµå Ãâ·ÂÀåÄ¡¸¦ SoundSticks (ȤÀº ´Ù¸¥ °Í) À¸·Î ¹Ù²Þ
Wall-E
2005/07/01, 04:18 AM
The goal of this small AppleScript is to be able to change the sound output device quickly and easily. Without using Accessibility Controls, the process usually involves mousing to the System Preferences, mousing to and clic...
http://www.macosxhints.com/article.php?story=20050614171126634&lsrc=osxh
albireo
2005/07/01, 11:58 AM
PowerBook À¸·ÎºÎÅÍ SoundSticks (ȤÀº ±âŸ ¿ÜÀå »ç¿îµåÃâ·ÂÀåÄ¡) ¸¦ »©°í ¾²´Ù°¡ ´Ù½Ã SoundSticks ¸¦ ¹°¸®¸é, À̸¦ ÀÚµ¿À¸·Î ÀçÀνÄÇÏÁö ¸øÇÏ°í »ç¿îµå Ãâ·Â ¿É¼ÇÀÌ ÆÄ¿öºÏ ³»Àå ½ºÇÇÄ¿·Î ¹Ù²î¾î ÀÖ¾î ´Ù½Ã±Ý SoundSticks ·Î ÁöÁ¤ÇØ Áà¾ß ÇÏ´Â ¹ø°Å·Î¿òÀÌ ÀÖ½À´Ï´Ù. À̶§ ´Ü¹ø¿¡ "»ç¿îµå Ãâ·Â -> SoundSticks" ·Î ¹Ù²Ù¾î ÁÖ´Â À¯¿ëÇÑ AppleScript ¸¦ ¼Ò°³Çϰí ÀÖ½À´Ï´Ù.
tell application "System Preferences" to activate
tell application "System Events"
get properties
tell process "System Preferences"
click menu item "Sound" of menu "View" of menu bar 1
delay 2
set theRows to every row of table 1 of scroll area 1 of tab group 1 of window "sound"
set theOutputs to {} as list
repeat with aRow in theRows
copy (value of text field 1 of aRow as text) to the end of theOutputs
end repeat
tell application "Finder"
activate
set desiredOutput to display dialog "Choose Sound Output: " buttons theOutputs default button "SoundSticks"
end tell
repeat with aRow in theRows
if (value of text field 1 of aRow as text) is equal to (button returned of desiredOutput as text) then
set selected of aRow to true
exit repeat
end if
end repeat
end tell
end tell
tell application "System Preferences" to quit
¸¸ÀÏ SoundSticks ´ë½Å ´Ù¸¥ ½ºÇÇÄ¿¸¦ ¾´´Ù¸é À§ ½ºÅ©¸³Æ® »ó¿¡¼ "SoundSticks" ´ë½Å ÇØ´ç ½ºÇÇÄ¿ÀÇ À̸§À» Àû¾îÁÖ¸é µÇ°Ú½À´Ï´Ù. ÷ºÎÇÑ "SwitchToSoundSticks" ´Â À̸¦ ¾ÖÇø®ÄÉÀ̼ÇÀ¸·Î ¸¸µé¾î ³õÀº °ÍÀÔ´Ï´Ù. ´ÜÃàŰ µîÀ¸·Î ÁöÁ¤ÇØ ³õ°í ½áµµ ÁÁ°Ú½À´Ï´Ù.
Ãß½Å: ÇÑÆí ÷ºÎÇÑ ¶Ç´Ù¸¥ ¾ÖÇø®ÄÉÀ̼ÇÀÎ "SwitchSoundOutput" Àº ¿øÇÏ´Â Ãâ·Â ÀåÄ¡¸¦ ¼±ÅÃÇϴ âÀ» Çѹø °ÅÄ¡µµ·Ï ÇÕ´Ï´Ù (±×¸² ÂüÁ¶).
macdeutsche
2005/07/01, 04:20 PM
ÀÏ´Ü Áö±Ý ÀÌ»çÁßÀ̶ó ¿ÜºÎ ½ºÇÇÄ¿°¡ ¾ø¾î¼ ½ÇÇèÀº ¸øÇغýÀ´Ï´Ù.
ÇÏÁö¸¸ system preference ¸¦ Á¦¾îÇÏ´Â applescript¸¦ Á» ã°í ÀÖ¾ú´Âµ¥ Å©°Ô µµ¿òÀÌ µÉµí ÇÕ´Ï´Ù.
Coexist with JackaL