Just started reading Applescript 1-2-3 and need help with one of the examples. I can’t get it to work, I’ve tried on three computers (two snow leopard and one leopard).
tell application "Finder"
tell the front Finder window
set the target to home
set the current view to home
set the position to {0, 22}
end tell
end tell
The problem is with the target to home line. Every time I run the script it throws an error: “Finder got an error: Can’t set Finder window 1 to home of Finder window 1.” I have been able to set finder windows to target home without using a tell block, but for some reason the tell block version isn’t working. What am I missing?
This example is from pg. 50 of AppleScript 1-2-3, in case anyone wants to look it up.
Model: MacBook
AppleScript: 2.1.1
Operating System: Mac OS X (10.6)