N/APosted on - 08/10/2013
Using AppleScript, I am trying to select a menu item in iTunes but I get this following error message when I try to run this script. The error shows the following “Expected “end” or “end tell” but found end of script”.
I have searched for the solution from internet.
Any help would be grateful to you.
Expected “end” or “end tell” but found end of script.
Expected end tell error on AppleScript
This error generally means that Applescript compiler did not find some terminator.
This is what you might experience:
Tell Application "System Preferences
"Reveal pane ID "com.apple.preferences.Bluetooth"
tell application "System Events" to tell process "System Preferences"
set bluetooth to checkbox "On" of window 1
set bluetoothBool to value of checkbox "On" of window 1 as boolean
if bluetoothBool = false then
display dialog " Bluetooth on " with title " Bluetooth "
default button "OK"
else if bluetoothBool = true then
display dialog " Bluetooth off " with title " Bluetooth "
buttons " OK " " Turn Bluetooth on "
default button " OK "
First try looking for a missing double quote ("). This are a bit difficult to find but try saving often while searching and continue your search for the missing (") until you are sure enough that none of the (") are missing.