tell application "System Preferences"
set current pane to pane "com.apple.preference.general"
activate
end tell
tell application "System Events" to tell process "System Preferences"
delay 2
tell window "일반"
click checkbox 3
end tell
end tell
tell application "System Preferences"
quit
end tell
Create TOC
2014년 10월 21일
OSX - 다크 모드 토글
2012년 9월 1일
OS/X - Alfred를 이용해서 Evernote에 바로 글 적기
Alfred에 아래와 같은 applescript를 등록하면 "m 적을 내용" 이런 식으로 바로 Evernote에 메모를 추가할 수 있다.
on alfred_script(q)
tell me
do shell script "open /Applications/Evernote.app"
end tell
tell application "Evernote"
set note1 to create note title q with text q notebook "노트를 추가할 노트북 이름"
open note window with note1
activate
end tell
end alfred_script
2012년 4월 5일
OSX - AppleScript를 이용해서 Finder 열기
아래와 같은 스크립트를 이용해서 새 Finder 창을 열 수 있다.
activate application "Finder" --gives Finder focus
tell application "Finder"
set new_finder to make new Finder window to alias ":"
set the current view of new_finder to column view
set the target of new_finder to the home
end tell
2011년 1월 12일
OS/X - 잠금 화면으로 이동
잠금 화면으로 이동할 수 있는 apple script.
do shell script "/System/Library/CoreServices/Menu\\ Extras/User.menu/Contents/Resources/CGSession -suspend"
OS/X - 화면보호기 실행하기
화면 보호기를 바로 실행할 수 있는 apple script.
do shell script "/System/Library/Frameworks/ScreenSaver.framework/Versions/Current/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine"
아래처럼 Finder를 통해서 실행할 수도 있지만... :)
tell application "Finder"
activate
open application file "ScreenSaverEngine.app" of folder "Resources" of folder "Current" of folder "Versions" of folder "ScreenSaver.framework" of folder "Frameworks" of folder "Library" of folder "System" of startup disk
end tell
2010년 9월 2일
Apple script로 특정 명령 실행하기
VirtualBox에서는 VBoxManage 라는 command 도구를 제공하는데, 특정 가상머신을 바로 실행 시킬 수 있다.
Apple script를 이용해서 내가 원하는 가상 머신을 바로 실행 시키는 코드를 작성해보았다.
tell me
activate
do shell script "VBoxManage startvm \"Debian Linux\""
end tell
피드 구독하기:
글
(
Atom
)