[Acrobat]起動中のAcrobatは何?(起動中のプロセスを調べる)
tell application "System Events"
set {allAppName} to {name} of (every application process whose (visible is true) and (creator type is not "MACS"))
repeat with everyAppName from 1 to count of allAppName
try
if (item everyAppName of allAppName) is "AdobeReader" then
tell application "Finder"
activate
display dialog "AdobeReaderが起動中です"
end tell
end if
if (item everyAppName of allAppName) is "Acrobat" then
tell application "Finder"
activate
display dialog "Acrobat8?が起動中です"
end tell
end if
if (item everyAppName of allAppName) is "AdobeAcrobat" then
tell application "Finder"
activate
display dialog "Acrobat9が起動中です"
end tell
end if
end try
end repeat
end tell
これは結構使えますね。
tell application "System Events"
set {allAppName} to {name} of (every application process whose (visible is true) and (creator type is not "MACS"))
end tell
なら
{{"AdobeAcrobat"}}
と返すし
tell application "System Events"
set {allAppName} to {application file} of (every application process whose (visible is true) and (creator type is not "MACS"))
end tell
なら
{{alias "XXXXXXXXXX:Applications:Adobe Acrobat 9 Pro:Adobe Acrobat Pro.app:"}}
tell application "System Events"
set {allAppName} to {displayed name} of (every application process whose (visible is true) and (creator type is not "MACS"))
end tell
なら
{{"Acrobat"}}
tell application "System Events"
set {allAppName} to {unix id} of (every application process whose (visible is true) and (creator type is not "MACS"))
end tell
なら
起動中のUNIXプロセスID
(これ強制終了とかに使えるなぁ)
| 固定リンク
「AdobeAppleScript」カテゴリの記事
- MakePSUserConfig(2018.10.31)
- この手の出し方は結構好感(2017.07.03)
- [Acrobat AppleScript]tsubasaさんのコメントへのレスポンス【別ファイル】(2011.04.15)
- [PSDcs4]WEBおよびデバイス用に保存【少し直し】(2010.10.25)
- [PSDcs4]WEBおよびデバイス用に保存(2010.10.24)
この記事へのコメントは終了しました。
コメント