I'm new to F-script, but I have been using applescript for years. I'm trying to automate some procedures in Daylite.
One issue in particular, I can't seem to figure out: I want to create a simple service using applescript so that I can right click on a file and select the service option (i.e. my applescript) to run, it will do the following:
Step 1) Create a new task in daylite; and
Step 2) Link the selected file to the new task. (as a reference or as a copy to the server or both/either)
Step 1 is no problem:
————
tell application "Daylite"
eval "
newTask := objectContext createObjectForEntityNamed:'Task' insert:true.
newTask setTitle:'New Task with File Attached '.
“
end tell
————
Step 2, I cannot figure out the file reference part at all.
I see in the F-Script Browser there is a method when selecting a task called “createAndAddToFileAttachments” under which is another method called “setFileAttachmentAttributesFromFileURL”
which I think either one or both of these is what I need to use, but I can’t figure out what input format the method wants because it doesn’t accept “/“ or “\” in the URL reference.
Can anyone help ?