Applescript conflict with the iTunes constants 'error' and 'duplicate'
In AppleScript the keyword 'error' is a reserved word. Unfortunately iTunes also defines a constant called 'error used as a possible value for e.g. a track's iCloud status. As a result code such as:
if aTrack's cloud status is equal to purchased then
set tCloudStatus to "purchased"
else if aTrack's cloud status is equal to matched then
set tCloudStatus to "matched"
else if aTrack's cloud status is equal to uploaded then
set tCloudStatus to "uploaded"
else if aTrack's cloud status is equal to ineligible then
set tCloudStatus to "ineligible"
else if aTrack's cloud status is equal to removed then
set tCloudStatus to "removed"
else if aTrack's cloud status is equal to duplicate then
set tCloudStatus to "duplicate"
else if aTrack's cloud status is equal to subscription then
set tCloudStatus to "subscription"
else if aTrack's cloud status is equal to no longer available then
set tCloudStatus to "no longer available"
else if aTrack's cloud status is equal to not uploaded then
set tCloudStatus to "not uploaded"
else if aTrack's cloud status is equal to error then
set tCloudStatus to "error"
else
set tCloudStatus to "unknown"
end if
Fails to even save as it complains about the use of 'error''. There is also a similar problem with 'duplicate' (that is also an AppleScript term).
Does anyone know how I can force the code to use the iTunes meaning of these terms and not the AppleScript meaning? I tried 'using terms from application "iTunes"' but that did not resolve the problem.
Thanks for any pointers...
Chris
if aTrack's cloud
else
set tCloudStatus to "unknown"
end if