I am sure there is somehing simple i am missing
i am trying to make this droplet that when ran from the script menu or a shortcut on the toolbar it will execute with the selected item(s)
my problem area is in red
any help would be greatly appreciated
ps should i move the routine to a handler?
code
on open subfldr
set subfldr to path to subfldr
set myloc to subfldr
tell application “Finder”
make folder at myloc with properties {name:“Layout”}
make folder at myloc with properties {name:“Images”}
make folder at myloc with properties {name:“Copy”}
end tell
end open
on run
set myloc to choose folder with prompt “Where would you like to add your folders”
tell application “Finder”
make folder at myloc with properties {name:“Layout”}
make folder at myloc with properties {name:“Images”}
make folder at myloc with properties {name:“Copy”}
end tell
end run
end of code
You’re trying to drop a folder/file on a droplet that you put in ScriptMenu folder?
i am trying to select a folder then go to the script menu and pick this script and have it perform on the selected folder
i supose i could drag the folder to a droplet too
property subfolderNames : {"Layout", "Images", "Copy"}
on makeSubFolders(mainFolder)
try
tell application "Finder"
repeat with folderName in subfolderNames
make folder at mainFolder with properties {name:folderName}
end repeat
end tell
on error eMsg
display dialog "Couldn't make sub-folders in " & mainFolder & " due to error: " & eMsg
end try
return
end makeSubFolders
on open foldersList
repeat with aFolder in foldersList
tell application "Finder" to set isFolder to (class of item aFolder is folder)
if isFolder then
makeSubFolders(aFolder)
else
display dialog "Couldn't make sub-folders in " & aFolder & " as it's not a folder."
end if
end repeat
end open
on run
set mainFolder to choose folder with prompt "Where would you like to add your folders"
makeSubFolders(mainFolder)
end run