Re: GraphicConverter & saving files in new places
Re: GraphicConverter & saving files in new places
- Subject: Re: GraphicConverter & saving files in new places
- From: Peter Bunn <email@hidden>
- Date: Wed, 13 Nov 2002 09:48:56 -0600
On Tuesday, Marc K. Myers wrote:
>
If you supply GraphicConverter's "save" command with a target in the form
>
of a string representing a complete path to the desired new file it will
>
create a new file of the type you specify in the command. There's no need
>
to go through acrobatics to get there. The dictionary is confusing in
>
that it identifies the target as an alias, which it is not.
-----
Marc:
For the sake of the discussion...
I was working on a thumbnailer droplet for use with GC in OS 8.6. I
broke the script up into a Finder tell block and and a handler for the GC
actions. The variable for the_thumb is set in the Finder block, which
seemed to work fine in 8.6. But in X, even if I 'remind' GC of the
variable in the handler, GC doesn't 'see' it and saves the thumbnail in
the original - not desirable.
In 8.6 the bare basics look something like this:
--
tell application "Finder"
set the_thumb to ((the desktop) as text) & "Thumbs:" & "Test.jpg"
end tell
tell application "GraphicConverter"
save window 1 in the_thumb as JPEG
end tell
--
For AS 1.8.3, I tried two modifications, both of which work and don't
seem to slow things down unduly. If I open for access the_thumb and
simply close it again, an empty file is created, which GC _does_ find.
The other option is to 'make new file', which wasn't available in 8.6.
I'm just learning how to use properties and handlers and still a bit
shaky with them, and I still have trouble setting proper file and alias
references sometimes. So of course, I'm hampered by my inexperience. I
tried to set a global at the outset of the script, but it didn't seem to
help. GC works with the originals based on another variable set
elsewhere, and performs the appropriate action... to the original instead
of the target file.
I'm more or less satisfied with the solution. I could use Standard
Additions instead -
set the_thumb to ((path to the desktop) as text) & "Thumbs:" & "Test"
- which also works, but I have to use the Finder to filter file types
and other stuff anyway, so...
Given that the Finder gets called into play in any event, is this really
such bad form?
Thanks.
Peter B.
-----
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.