AppleScript名:指定名称のアプリケーションプロセスが存在すればその正しい名前を返す |
— Created 2015-07-29 16:43:11 +0900 by Takaaki Naganoya — 2015 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" set aName to "メール" set aRes to returnExactNameOfAnApp(aName) of me on returnExactNameOfAnApp(aName) tell application "System Events" set ap1List to every process whose name is equal to aName if ap1List = {} then set ap1List to every process whose displayed name is equal to aName if ap1List = {} then return false end if set anApp to contents of first item of ap1List return name of anApp end tell end returnExactNameOfAnApp |
More from my site
(Visited 79 times, 1 visits today)