Re: Expected end of line, etc. but found identifier
Re: Expected end of line, etc. but found identifier
- Subject: Re: Expected end of line, etc. but found identifier
- From: 2551 <email@hidden>
- Date: Sun, 29 Nov 2015 10:09:19 +0700
>
> On 28 Nov 2015, at 05:21, Peter R Hawkes <email@hidden> wrote:
> I get the following error on the word ‘messages’ in the second line of code, when trying to compile …… what have I done?
>
>
> Syntax error
>
> Expected end of line, etc. but found identifier.
> tell application "Microsoft Outlook"
>
> set msgSet to current messages
>
> if msgSet = {} then
> error "No messages selected. Select at least one message."
> error -128
> end if
>
> repeat with aMessage in msgSet
>
> set category of aMessage to {category "PMH"}
>
> end repeat
>
> end tell
>
If you copy and paste the script as you posted it here back into your editor, does it compile? The script here is plain text and the quote marks are correct. Possibly in your actual editor window one of the quote marks in line 1 is a smart quote or rich text format and one of the others isn’t. I’ve been caught out by this before myself.
Best
Phil
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden