Re: No error, No results....
Re: No error, No results....
- Subject: Re: No error, No results....
- From: Matthew Stuckwisch <email@hidden>
- Date: Sun, 31 Mar 2002 10:19:37 -0600
<< I'm trying to simply take an open acrobat document and
save it to a new file with a new name in another directory.
Like a save as. Although this snippet runs without error
and appears to process, there's no resulting file? Is Acrobat
5 broken, or am I missing something?<<
What about this? (this is a nasty workaround)
on
substituteSaveAs(locationOfNormalSaveDocument,nameOfFile,locationOfNewSaveAs,
nameOfNewFile)
do shell script "cp " & (locationOfNormalSaveDocument as string) & "
~/Desktop/" & (nameOfFile as string)
tell app "Acrobat" to save document index 1
do shell script "cp " & (locationOfNormalSaveDocument as
string) & " " & locationOfNewSaveAs) & "//" & (nameOfNewFile as string)
do shell script "cp ~/Desktop/" & (nameOfFile as string) & " " &
(locationOfNormalSaveDocument as string)
do shell script "rm -rf ~/Desktop/" & (nameOfFile as string)
end substituteSaveAs
I haven't actually tried this, but in theory something like this should
work (though I've had trouble with reference->string coercions in the past)
. Also this will fail if the name and location of "Save As" is on the
user's Desktop and as the same name as the original file. But you could
use an if-then block to get rid of that (send it to ~/ instead of
~/Desktop). Additionally it may fail if the original document is outside
of the ~/ directory. This could work using Finder commands, but I've
found that Finder scripting is a tad bit slow and sometimes (preX.1)
unreliable. Plus for moving files around it's a million times easier
using the shell scripts.
Matthew Stuckwisch
[AIM/MSN]{GuifaSwimmer} | [Yahoo!]{SapphireTree} | [ICQ]{137477701}
[IRC]{guifa / G}(esperNET / irc.massinova.com)
_______________________________________________
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.