본문 바로가기

Applescript

How to Run Fast Forward or Fast Backward on QuickTime Player with AppleScript property step : 10if application "QuickTime Player" is running thentell application "QuickTime Player"set playerPosition to (current time of front document) + stepset movieDuration to duration of front documentif (front document is playing) thenset isPlaying to trueelseset isPlaying to falseend ifif (playerPosition ≥ movieDuration) thenif front document is playing thenstop front documentend ifse.. 더보기
애플 스크립트를 이용한 이메일 보내기 with 첨부파일. Sending an Email with attachments using AppleScript tell application "Mail" set theSubject to "제목을 넣어준다." -- the subject set theContent to "본문에 들어갈 내용을 적는다" -- the content set theAddress to "수신인의 메일 주소를 적는다" -- the receiver -- set theSignatureName to "시그너쳐 이름을 넣어준다." -- the signature name set theAttachmentFile to "SH:Users:SH:Desktop:ScreenShots:1.png" -- 첨부파일의 경로를 설정한다. set msg to make new outg.. 더보기
Shut down, sleep, restart, display sleep, log out commands on OS X with bash, applescripts. Shut down without showing a confirmation dialog:osascript -e 'tell app "System Events" to shut down'Shut down after showing a confirmation dialog:osascript -e 'tell app "loginwindow" to «event aevtrsdn»'Restart without showing a confirmation dialog:osascript -e 'tell app "System Events" to restart'Restart after showing a confirmation dialog:osascript -e 'tell app "loginwindow" to «event aevtrrst.. 더보기
[MAC TIP] Key Press Action with AppleScript This is an AppleScript to act like a keyboard action. Run a script like this in AppleScript Editor: activate application "Firefox" repeat 100times tell application "System Events" to keystroke "a" using command down delay (random number from 0.5 to 5) end repeat - More examples:tell application "System Events" key code 123 using {shift down, command down} -- shift-command-left endset old to (pat.. 더보기
[Applescript] How to detect page loading status using applescript and chrome This is far from rocket science but I haven’t seen it posted so I’m going to put it here for posterity. This is how you can detect if a page is loaded in chrome with applescript. This is a subroutine, so you can put it at the end of your program and call it with this line checkForLoading() Ok, here’s the subroutine. on CheckForLoading() # checks chrome to see if the frontmost tab is loaded tell .. 더보기