• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Expected end of line, etc. but found identifier
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Expected end of line, etc. but found identifier (From: Peter R Hawkes <email@hidden>)

  • Prev by Date: Re: Expected end of line, etc. but found identifier
  • Next by Date: Re: referencing the art-tree for any given layer in Adobe Illustrator CC 2015
  • Previous by thread: Re: Expected end of line, etc. but found identifier
  • Next by thread: My applescripts on github...
  • Index(es):
    • Date
    • Thread