ASOCでプロセス情報を取得

AppleScript名:ASOCでプロセス情報を取得
— Created 2015-10-23 by Takaaki Naganoya
— 2015 Piyomaru Software
use AppleScript version "2.4"
use scripting additions
use framework "Foundation"
use framework "AppKit"

set runningApplications to (current application’s NSWorkspace’s sharedWorkspace()’s runningApplications()) as list

repeat with i in runningApplications
  
  
set aName to (i’s localizedName()) as text
  
set anIcon to (i’s icon())
  
set anBundleID to (i’s bundleIdentifier()) as text
  
set anBundleURL to (i’s bundleURL())
  
  
set tmpArch to (i’s executableArchitecture())
  
if tmpArch = 16777223 then
    set anArch to "X86_64"
  else if tmpArch = 7 then
    set anArch to "I386 "
  else
    set anArch to "Another Arch (PPC? or Error)"
  end if
  
  
set anLaunchDate to (i’s launchDate())
  
set anFinishLaunch to (i’s isFinishedLaunching())
  
set aProcID to (i’s processIdentifier())
  
set anOwnMenubar to (i’s ownsMenuBar())
  
  
log {aName, tmpArch, anArch}
  
–> (* {"CCLibrary", -1, "Another Arch (PPC?)"} *)
end repeat

★Click Here to Open This Script 

Please follow and like us:

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です