20260512

[AppleScript] System Eventsの場所をFinderに表示する【その2】

[AppleScript] System Eventsの場所をFinderに表示する【その2】

NOTE記事一覧ですnote.com

【スクリプトエディタで開く】 |

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(*
005System Eventsの場所をFinderで表示します
006
007com.cocolog-nifty.quicktimer.icefloe *)
008----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
009use AppleScript version "2.8"
010use scripting additions
011
012set aliasAppPath to (path to application id "com.apple.systemevents") as alias
013tell application "Finder"
014   set aliasCoreDir to (containers of aliasAppPath) as alias
015end tell
016
017tell 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
027end tell
028return
AppleScriptで生成しました