Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

TexasStation

macrumors newbie
Original poster
Oct 27, 2011
4
0
North Texas
Hi, got this code right from an Applescript textbook (written pre-10.5, however)
Here's the code, followed by the compile error...

activate
choose file of type "public.image"
default location (folder "Desktop Pictures" of folder "Library" of startup disk)
with prompt "Pick an image for the folder background:"
invisibles true

set the background picture of icon view options of front finder window to the result
end tell

Getting Syntax error - Expected end of line, etc. but found property, and it flags the word location in the code. It should basically bring up a dialog box to choose an image file in the Desktop Pictures folder then set as background image in the active Finder window.

I tried different things, but can't seem to get it to run.
Any ideas out there?
Thanks
 
I am guessing that your code snippet is in a Finder tell statement, but all of the parameters for a particular command need to be on a single line (or on lines separated by an option-return):

Code:
choose file of type "public.image" default location (path to desktop pictures folder) with prompt "Pick an image for the folder background:" with invisibles
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.