Re: Droplet to organize incoming files in connection with FMP
Re: Droplet to organize incoming files in connection with FMP
- Subject: Re: Droplet to organize incoming files in connection with FMP
- From: Eric Geoffroy <email@hidden>
- Date: Mon, 20 Jun 2005 10:29:39 -0700
Here's an example from mine. I think the MyLocation is the bit you're stuck on.
- Eric
set rsrc_type to "Word"
set rsrc_name to "Backout pr" & PR & " Word Styled"
set myLocation to ("Server:Books:Back-outs:" & FileName)
tell application "Finder"
set fyle to x as alias
move fyle to BOF with replacing
end tell
tell application "FileMaker Pro"
tell window "Blah" to activate
go to layout "Resources" of window "Blah"
set the clipboard to myLocation
if exists (record 1 of database "titles.resources" whose cell "resource location" is myLocation) then
beep
else
--say "Preparing to add: " & last word of myLocation
tell application "FileMaker Pro"
create record at end of database "titles.resources"
set cell "item id" of last record of database "titles.resources" to bISBN
set cell "resource type" of last record of database "titles.resources" to rsrc_type
set cell "resource name" of last record of database "titles.resources" to rsrc_name
set cell "resource location" of last record of database "titles.resources" to myLocation -- File path
end tell
end if
end tell
On Jun 18, 2005, at 9:41 AM, Mark Peyer wrote:
Hi everyone,
I am using OS 10.3 and FileMaker 6.0.
I have no experience with droplets.
I can associate outgoing documents easily enough with persons in my FMP
database.
I would like to automate association of incoming files (.txt, .doc, .pdf,
.jpg) with persons in the database. As far as I can see FMP won't do this
for me.
I usually pull incoming attachments on to the desktop and read them. I would
now like to bring the record of the person in question in FMP to the
foreground, read out name and given name, construct a filename with pattern
"name_given name_date", pull the attachment on to a droplet, let this change
it's name to "name_given name_date".suffix and then have it put in a
designated folder. Then I could tell FMP to show the appropriate filepath.
I managed the FMP part and the date, but I run into difficulties with the
droplet. I don't seem to be able to get hold of the file.
When trying
on open droplet
tell application "Finder"
duplicate file of droplet
end tell
end open
I get an error saying:
Can't get file of {alias filepath}.
Obviously I get a list of aliases as a result.
How can I reference to the item 1 of this list of aliases?
Thanks for any help.
--
Mark A. Peyer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden