I need help with this script

I’m trying to make a script that will allow me to specify a location and name for its creation through variables.
Heres what I have:

set FolderName to text returned of (display dialog "What would you like the folder to be named?" default answer "Untitled Folder")
set FolderPlace to text returned of (display dialog "Where would you like the folder?" default answer "Home")
tell application "Finder"
	make new folder at FolderPlace with properties {name:FolderName}
end tell

Every time I run the script (Without altering the default answers) I get this error message:

Finder got an error: Can’t make “Home” into type item.

I tried replacing variable FolderPlace with an actual location and it works fine. Please post if you know how I can still allow the use of a variable.

I think its because the word “Home” doesn’t refer to a path on you computer.

set FolderPlace to (choose folder with prompt "Where would you like the folder?")

not sure that you can have a default place

set FolderPlace to (choose folder with prompt "Where would you like the folder?" default location path to documents folder)

Wow did not know that. so to home would be…


set FolderPlace to (choose folder with prompt "Where would you like the folder?" default location path to home folder)

Yes. But it’s not considered “good practice” to create stuff outside your documents folder, so you’d better know what you’re doing…

Anyway, that info is in the Standard Additions dictionary - always read those when you seem stuck.