applescript "save in"

This area contains the messages from the old Yahoo gcmac group after the port.
Post Reply
John Gregg
Posts: 0
Joined: Tue Nov 12, 2002 5:39 am

applescript "save in"

Post by John Gregg »

Hi all. I'm new to AppleScript but I think what I'm trying to do is really simple. I want to process a file and save it as a different name. I'm trying to copy some code in Smaller_JPEGS_plus_thumbnails but mine won't save the window contents in a new file and I can't understand why. Here's my code: activate open theFile scale window 1 horizontal 0.5 vertical 0.5 save window 1 in (destFolder & theRootName & "-sm" & ".jpg") as JPEG close window 1 It always saves in the original file only. I've also tried combinations of "with makeCopy" and "with wwwready." The code I'm copying from is this: activate open {alias theFile} save window 1 in (destFldr & theName & ".jpg") as JPEG scale window 1 horizontal 0.1 vertical 0.1 save window 1 in (destFldr & theName & "x" & ".jpg") as JPEG close window 1 This code does what it's supposed to do. One difference is that my theFile variable is an alias and the one in the latter code is a string. I tried converting mine to a string and then coercing it to an alias like the other code does but it doesn't make a difference. I'm using GC 4.5 and MacOS 10.2. thanks john
Post Reply