lkeyes

Create folder on Mac from Dialog

Discussion created by lkeyes on Aug 2, 2013
Latest reply on Aug 7, 2013 by grahamni

Hi...seems like it should be easy...but ... I want to:

 

1. Put up a custom dialog which asks for a folder name

2. Create a folder with that name within the directory \users\lkeyes\documents\jobhunt

 

Looked like this needs to happen with Applescript, but I guess I can't figure out how to pass the folder name from the custom dialog to the Applescript

 

Right now there is a field in the record to hold the Foldername.... I don't really care if it is there; I'd rather just pass a variable...

 

 

 

Show Custom Dialog [ Title: "Create New Job Folder"; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No”; Input #1:

Job::FolderName, "Folder Name: " ]

 

Commit Records/Requests

 

Perform AppleScript [ Native AppleScript:

 

--tell application "FileMaker Pro Advanced" set MyFolder to cell "FolderName" of current record
--end tell

 

tell application "Finder" activate

make new folder at folder "JobHunt" of folder "Documents" of folder "lkeyes" of folder "Users" of startup disk with properties {name: MyFolder}
end tell

]

 

Right now this returns "Object Not Found" and Unknown Error -1728

Outcomes