How to Fix Power Manager AppleScript Syntax Errors
This article shows how to fix AppleScript Editor's: Syntax Error with the message Expected , or } but found property. AppleScript Editor needs to find and read the terminology dictionary of the application being scripted. If the application can not be found, the unhelpful "Syntax Error" will appear.
This article shows how to fix AppleScript Editor’s Syntax Error with the message “Expected “,” or “}” but found property.”
AppleScript Editor needs to find and read the terminology dictionary of the application being scripted. If the application can not be found, the unhelpful Syntax Error will appear.
There are a few ways to fix this problem. For these solutions, we will assume you are AppleScripting the application Power Manager Scripting:
Provide a full path to the application being scripted. Replace the name only form of tell application, with a full path:
tell application "Power Manager Scripting"
Becomes:
tell application "/Library/Application Support/Power Manager/Agents/Power Manager Scripting.app"
Open the Power Manager Scripting’s dictionary with AppleScript Editor:AppleScript Editor > File > Open Dictionary…
Launch Power Manager Scripting in the Finder. The first time Power Manager Scripting is launched, the Finder will register the application’s location with Launch Services. Launch Services can then help other applications, including AppleScript Editor, find the application.
If the error continues after you have tried these fixes, the AppleScript may actually contain a real syntax error.