[AppleScript] System Eventsの場所をFinderに表示する【その2】
【スクリプトエディタで開く】 |
1_System Eventsの場所をFinderに表示する その2.applescript.scpt | ソース |
|---|
| 001 | #!/usr/bin/env osascript |
| 002 | #coding: utf-8 |
| 003 | ----+----1----+----2----+-----3----+----4----+----5----+----6----+----7 |
| 004 | (* |
| 005 | System Eventsの場所をFinderで表示します |
| 006 |
|
| 007 | com.cocolog-nifty.quicktimer.icefloe *) |
| 008 | ----+----1----+----2----+-----3----+----4----+----5----+----6----+----7 |
| 009 | use AppleScript version "2.8" |
| 010 | use scripting additions |
| 011 |
|
| 012 | set aliasAppPath to (path to application id "com.apple.systemevents") as alias |
| 013 | tell application "Finder" |
| 014 | set aliasCoreDir to (containers of aliasAppPath) as alias |
| 015 | end tell |
| 016 |
|
| 017 | tell application "Finder" |
| 018 | #Finderで新規Windowを作成して |
| 019 | set refCurrentWindow to make new Finder window |
| 020 | #新規Window |
| 021 | tell refCurrentWindow |
| 022 | #パスをセットして |
| 023 | set target to aliasCoreDir |
| 024 | #対象のファイルを選択する |
| 025 | select item "System Events.app" |
| 026 | end tell |
| 027 | end tell |
| 028 | return |
| AppleScriptで生成しました |
|---|