Problem setting theAlias
Problem setting theAlias
- Subject: Problem setting theAlias
- From: JF <email@hidden>
- Date: Tue, 10 Dec 2013 14:59:56 +0000
I have a script which I use often to create two folders (done separately) using an AppleScript in FileMaker. All that changes in the filepath is the last bit, for example a folder called "11 November 2013" or "07 July 2013". I have been changing this part manually, but I'd like to have all of this task done automatically.
To do this I created a calculation field which picks up information from a couple of fields but starts with the unchanging part of the filepath as text, so the field contains this:
G Work/G Jobs /Åcme Co ?/Acme 2013 ?/Client 2013/Client factsheets 2013/12 December 2013 Factsheets/
the script line I created is:
set theAlias to cell "Alias_file_path" of current record
OR
set theAlias to Alias_file_path of current record
OR either lines omitting "of current record"
but when I try to run any of the script options I get a message "Object Not found" then an error message I think -1700 (I can check the number if it is essential to finding the solution)
My manuallly changed path works:
set theAlias to cell "G Work:G Jobs :Acme Co ?:Acme 2013 ?:Client 2013:Client factsheets 2013:11 November 2013 Factsheets"
Here is the whole script:
____________
property subf_names : {"00 Preliminaries", "01 Versions", "02 Pictures", "03 Charts", "04 Fonts", "05 Supplied", "06 Workings", "07 PDFs","08 Package", "09 Word docs"}
set DocketNumber to cell "DocketNumber" of current record
set MonthDate to cell "MonthDate" of current record
set JobTitle to cell "JobTitle" of current record
set job_id to DocketNumber & " " & JobTitle
set temp_name to job_id
set temp_disc to job_id
--set file_month to cell "Month | Month" of current record
set theAlias to Alias_file_path of current record [DOES NOT WORK]
[THIS WORKS, but I have to change the last folder name manually:
set theAlias to cell "G Work:G Jobs :Acme Co ?:Acme 2013 ?:Client 2013:Client factsheets 2013:11 November 2013 Factsheets"]
tell application "Finder"
set main_folder to (make new folder at theAlias with properties {name:temp_name}) as alias
repeat with this_name in subf_names
--set temp_name to job_id & this_name
set temp_name to this_name
make new folder at main_folder with properties {name:temp_name}
end repeat
end tell
_________________
Can someone help to solve what I am doing wrong?
TIA
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden