Having a problem trying to figure out why I can get the parent folder of container when I use it in an on run ,but can’t get the parent folder of container when i use it in an on Open. It gives me an error with the on Open Droplet.
This is my code:
on run
-- Get the path of the parent folder of folder selected
set Orig_path to choose folder with prompt "Select Folder!" --folder of path wanted
tell application "Finder"
set Parent_Folder to container of (Orig_path) as text
display dialog Parent_Folder
end tell
end run
on open this_item
set Orig_path to this_item as text
--display dialog Orig_path as string
set Parent_Folder to (container of (Orig_path)) as text
display dialog Parent_Folder as string
end open