Something like this script
tell application "Safari"
activate
end tell
tell application "System Events"
set frontAppID to bundle identifier of first process whose frontmost is true
end tell
returns "com.apple.Safari"
However, if I try something like
if frontAppID of bundle identifier of first process whose frontmost is "com.apple.safari" then
then it doesn't work. Obviously a bundle identifier cannot be compared with a string. How do I create a bundle identfier object I can use in my comparison?
Aucun commentaire:
Enregistrer un commentaire