Used cleaner AppleScript with whose filter on application object