Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Godfather

macrumors member
Original poster
May 11, 2004
69
0
Ok here's the deal. I run a site about cars and need help. Whenever a new car comes out, I get a press kit about it with big large images. I need them to be resampled to:
700 pixels wide + 72DPI (they usually come in 300 DPI);
400 pixels wide + " ";
180 pixels wide + " ".

Of course you will all say use the batch command. but the problem is, it's not a couple of photo's which i want to save in either 700, 400 or 180, it's just ONE at a time.
I mentioned the batch command because I want to have the files renamed like this:
New volvo car.jpg (original)
New Volvo car 2005 700.jpg (700 wide, of course)
New Volvo car 2005 400.jpg (400 wide, ...
New Volvo car 2005 180.jpg (yup, 180 wide)

The batch command has this nice Rename feature, but it closes ALL windows and changes ALL current files. I only want it to do that to ONE file.

My perfect setup would be this as an action script in PS (after opening a big 300 DPI file with 2312312321 pixels wide):

- Convert to RGB (just to be sure)
- Size: wide 700
- Size: 72 DPI
- Save file as: <currentdocumentname><space>700.jpg

(note: I inserted space and 700, like you can do in Batch command and I want the documentname to be the same as the original *BY DEFAULT. Actually, I'd prefer if I could also change the first part of it, so if the file is named something like: 213123124214.jpg I want it to action-script itsself into the name I want to. This sounds alot like "Save file as..." command, but I don't want to do this every day a couple of times.)

Then I don't want it to be closed, coz I still need the other sizes. (I don't care about loss for the 3rd time saving it as JPG, so it can stay open and I can just repeat the action above with 400 and 180 wide and then after finishing the 180 script I can close it).

I say *BY DEFAULT because sometimes the file names are numbers only, and make no sense. Then I want to manually change the filenames, but only THEN. So most of the time I want it to be fully automated, after downloading the picture, press a button (or shortcut) and then it rolls out three times in different filesizes, with 3 different documentnames.

You can see Batch isn;t working for me coz of each file I only need to modify just one, and most important, It shouldn't be closed for it needs to be automated AND i need to change the filename (by extending it's width after it's original name)

I hope you guys can help me out, and I thank you in advance for trying to understand my problem and helping me out!

====
edit:

Of course I don't care if you guys make a script which closes the file, but I think that that isn't going to work for I have to reopen the file. I have been thinking on just duplicating the files and resizing all and saving all at the same time, bottom line still is I need that bit from the batch command which lets you alter the file name. I actually only need that and I think I can do the rest myself.

If for any reason you guys want to know what I have come up with as an actionscript, or you want to continue from there, I don't midn putting mine online.
 
I know this is not exactly what you are looking for, but here goes. I wrote an action that will take a folder's content, resize them 700, 400 and 200 wide, and saves the three files in a folder on the desktop called "picture dump".

To use it, first create a folder called "picture dump" on your desktop. Secondly when going to the Automate/Batch command, check "Override action Save As". Here I assigned: <Document Name><Serial letter><EXTENSION>.

The output will be like this:

700widea.jpg
400widea.jpg
200widea.jpg

700wideb.jpg
400wideb.jpg
200wideb.jpg

etc.

Now you can run an AppleScript included with your mac to change all "a" to "New Volvo". Maybe it would be helpful to eliminate the "wide part", because it would interfere with the replacement.

The script can be of course customized to dump as: 700a.jpg, 700b.jpg

Hope it helps.
 

Attachments

  • Action.zip
    951 bytes · Views: 148
Well I can live with the fact your script adds the useless a and b's after the filenames (a simple 700 only addon would be enough) but the fact that it uses the batch command (which requires a default FIXED folder) is disturbing me, for then I still need to drag out the files into the corresponding folders (Audi A6 Avant 2005 700 belongs in the Audi folder, not in the picture dump folder)
-------
edit: Oops, I saw u wrote that the a and b's are the actual file names. ok nice idea :) too bad that I am doing all of this on windows! I can do some work on the mac, but this site works with a pc and I receive all press mail on a windows machine. So I really need that action script w/o applescirpts.

I know this all sounds lazy, but I have to deal with this every day and it wouldn shorten the time I put into it with like 1 hour. By the way, with alot of scripts and changing applications it takes just as long as it does now. I need 1 press on a button, 3 @ the most, not more (now I am using a script which only alters image size and resolution, and I have to manually save it into the correct folder and rename it, which is about the same work as pushing 1 button in PS then get to desktop, then launch an app which renames em to Volvo (which I have to set up for every car) and then drag them to the correct folder.

Thanks for trying though :)

P.S., I am dutch and therefore my english isn't great, so to make things clear, basically all I need is the lower part of the Batch command, which is ONLY changing names for I can do the rest myself. I know there is more then 1 way that leads to Rome so if you guys think the solution isn't the lower part of the batch window but can be done on a different way, I don't care. As long as it changes the filename :]
 
would a droplet not work in this situation? .. or does that invoke the close all change all currrent windows?

i would think you could drop the single file you want changed onto the droplet and not mess with the rest of the images.

not sure... my macs at home otherwise id try it myself.


peace.
 
I know, but yes, it will take alot of closing windows + still having to drag the droplet-converted image to the right folder.

The thing is I get the picture most of the time in my inbox or from a website, so I can always select where to save the (high-res) image, already in the corresponding folder. Actually, that will only benefit the droplet idea, for it changes the file and places it in the parent folder, so that's a good thing. But too bad it's windows :mad: which uses alot of windows and it's navigation is... crap. if the droplets could be in OSX' dock I would have voted for droplets even before starting this thread. But as you can see ... :)
 
Why don't you just create an "action." You set it manually it run whenever you press an "F" key while the file is currently open. Then save and close manually.

You probably know this, but batch commands are simply automating preprogrammed "actions."
 
True, but that doesn't really make it any more simple.

The script I current use, is the one you just wrote down here, without the F key part (so instead of taking time to press a button F, in real life, I have to click a software button, which runs the script too)

As you can see this doesn't change anything. I'd really like it fully automated. And I know I mentioned Batch and ppl would fall over that. but it's whole problem with batch, that it doesn't know how to stop. Someone should make a batch for 1 file only. so i can put that on the end of my script for every picture to change. Or just a random STOP-BATCH-AFTER-1-FILE-BATCH script. lol, nevermind that last part :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.