« [異体字]Acrobatのフォームで異体字を出す。 | トップページ | [JSX]イラストレーターJPEG書き出しオプション »

[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
(これ強制終了とかに使えるなぁ)

 

「systemEventAcro.rtf」をダウンロード[Download]DownloadFile

「systemEventAcro.scpt.zip」をダウンロード[Download]DownloadFile

|

« [異体字]Acrobatのフォームで異体字を出す。 | トップページ | [JSX]イラストレーターJPEG書き出しオプション »

AdobeAppleScript」カテゴリの記事

コメント

この記事へのコメントは終了しました。