Skip navigation

Automator: AppleScript repeat routine FAIL/bug?

231 Views 2 Replies Latest reply: Oct 10, 2012 4:32 PM by Lockboard RSS
Lockboard Calculating status...
Currently Being Moderated
Oct 10, 2012 3:36 PM

I'm trying to run an AppleScript in Automator, but it always fails in the part with a repeat loop. The error given is: "Syntax Error: No result was returned from some part of this expression."


Here is an example script that works in AppleScript Editor but not in Automator. Paste it in the "Run AppleScript" automator action:


repeat with i from 1 to number of items in {"red", "blue", "yellow"}

     set this_item to item i of {"red", "blue", "yellow"}

     if this_item is "blue" then

  display dialog "Blue" buttons {"OK"} default button 1

     end if

end repeat


Can anyone confirm they have the same problem and/or offer a solution?

MacBook Pro (13-inch Late 2011), OS X Mountain Lion (10.8.2), 8 GB RAM


More Like This

  • Retrieving data ...

Bookmarked By (0)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.