MACSCRPT Archives

April 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Gary (Lists)" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 14 Apr 2006 17:47:57 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (102 lines)
> On Thu, 13 Apr 2006 05:33:15 -0600, Chuck Pelto <[log in to unmask]> wrot
> e:
> 
>> On Apr 12, 2006, at 5:04 PM, Bob R. wrote:
>> 
>>> Teaching the SM script where to find the picutres folder is exactly
>>> the
>>> problem I have.  In all of Filemaker's script examples, the Inser
>>> Picture
>>> script names a specific file name.  I need to know how to use an
>>> Applescript
>>> variable instead.  thanks, Bob R.
>> 
>> What I did was as follows:
>> 
>> [1] Establish a folder to hold the image file to  be inserted.
>> [2] Establish a file in that folder that would be inserted via the SM
>> [3] Taught the SM to insert that file in the field.
>> [4] Told the AS to delete the file (2) in the folder (1).
>> [5] Told AS to COPY an image I wanted to the place where that file
>> was located.
>> [6] Told AS to RENAME the file to something the SM would recognize.
>> [7] Had the AS call upon the SM to insert the image.
>> 
>> Repeat steps 4 through 7 as necessary, based on a list of files that
>> were to be inserted.
>> 
>> Yes It's kludge, but so is FMP in my opinion. I've given up trying to
>> get FMI out of it's we'll-give-the-users-what-we-want-when-we-want-to-
>> give-it-to-them mode for the last 10 years

"Bob R." wrote:

> Kluge or not, your solution is still better than nothing.  This is so
> ridiculous that FM cannot script the simple command to insert a picture
> using a variable. They used to claim to have an extensive scripting libra
> ry,
> also.

Maybe I missed the point here.  Bob, you never replied about the file that I
sent you.

Chuck, why all the acrobatics?  What are you trying to do that AppleScript
can not do?  What does FileMaker really have to do with the file system
issues you are trying to overcome?  You can insert content into a FileMaker
field without any involvement of FileMaker at all, except accepting the
data, of course.

Was there some other goal, or intervening element in the workflow?

I really thought that I understood the goal:

"Bob R." wrote, to start this thread:

> Using Filemaker 6 with OS 10.3.9, I am trying to insert low res PDF files into
> a master document to view them as a proof sheet.  Using the file name as a
> string does not embed the PDF; only the Insert Picture command will do that.
> My problem is how to use Filemaker's Scriptmaker to script the Insert Picture
> command using a variable for the PDF file name.  Here is how FM says to use
> the do script:
> 
> Insert Picture ["myphoto.tif']
> 
> When I try to follow their lead:
> 
> do script "Insert Picture [myrealpic.pdf]"


And then, I sent you a (very long) email, which I have since turned into a
web page [Thanks for Markdown, John Gruber], along with the exact file that
I sent you -- which shows a number of ways to use AppleScript to insert
files into a FileMaker field.  The file is in the format you said you were
using (FM v6) but it converts to v7 and works just as well.

(In fact, you'll notice that the web page article is, in fact, directly in
response to your email, as it is (anonymously) quoted there.)

<http://accidentaltechie.org/dru/?q=node/23>


There is even a discussion of related (and overlapping) topics, with a FM
version 7-only (and much nicer looking) demonstration file.  That file is a
basic ready-to-go working file browser, which also collects Finder
information ('info for', actually).  The AppleScripts are included, in a
separate clipping file.  This is a file created for a local Mac basics
class, and its primary focus was Mac paths and using paths in AppleScript.
The FM file browser demo grew around that, and as an example of that.

<http://accidentaltechie.org/dru/?q=node/24>


Again, maybe I totally missed the point of what you wanted to do, but maybe
those resources will be of some use (for Chuck, maybe, since I already sent
the FM6 file to Bob earlier in the week.)(The contortions that Chuck is
suggesting just don't _seem_ all that reasonable, given the level of AS
support in FileMaker. But who knows. ;)

Bob, if you want to articulate your needs again, maybe there'll be other
ideas...?
--
Gary

ATOM RSS1 RSS2