Noob question (error: Can't get poition of folder)

I am a noob. I am reading AppleScript: The comprehensive guide to scripting and automation on Mac OSX.
I have run into a pitfall

when I use the sample code


tell application "Finder" to tell folder "Applications" to ¬
	tell folder "AppleScript" to set position_2 to the position

i get an error
"Finder got an error: Can’t get position of folder “AppleScript” of folder “Applications”.

When I use the sample code


tell application "Finder"
	tell folder "AppleScript" of folder "Applications"
		set file_list to name of every item
		set time_folder_was_created to creation date
		set time_folder_was_modified to modification date
	end tell
end tell


I get an error
“Finder got an error: Can’t get name of every item of folder “AppleScript” of folder “Applications”.”

Any help would be much appreciated. All I know is that I do indeed have a folder called AppleScript in my Applications folder. I am wondering if it has something to do with specifying which disk to look on? I have no ideas really. Again any help would be appreciated.

Model: Mac Pro
AppleScript: 1.10.7
Browser: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1) Gecko/20061024 BonEcho/2.0
Operating System: Mac OS X (10.4)

The “root” folder of the Finder is the desktop folder and there is no folder “Applications”.
Folder “Applications” is a folder of the top level of the startup disk:

tell application "Finder"
	tell folder "AppleScript" of folder "Applications" of startup disk to set position_2 to the position
end tell

or

set a to (path to startup disk as Unicode text) & "Applications:AppleScript:"
tell application "Finder"
	tell folder a to set position_2 to the position
end tell

same problem:

tell application "Finder"
	tell folder "AppleScript" of folder "Applications" of startup disk
		set file_list to name of every item
		set time_folder_was_created to creation date
		set time_folder_was_modified to modification date
	end tell
end tell

Thanks for the help. odd they didn’t mention it in the book, or maybe they did and i glossed over. Again thanks for helping me out.

Hanaan’s book is very good and I don’t think there is a mistake like this in it,
I guess, you missed the line

tell startup disk

:wink: