This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Paint Shop Pro support > April 2007 > Scripting saving of a file to a new directory in another format
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Scripting saving of a file to a new directory in another format
|
|
|
| I am trying to do something which seems so simple that is should be quite
easy to automate.
I have been given a bunch ( over 100) of 8x10 photos in .jpg format that are
tilted sideways.
I;/benson_cd/8x10/xxxxxx.jpg xxxxxx is the file name and there are
multiple directories under benson_cd
I have created a new directory I:/benson_cd/straightened/8x10 where I am
going to put straightened versions of these images in .png format
I can do this the brute force method, one-by-one, loading about 10 of these
into PSP v8 and doing each step on each of them. I do it 10 at a time so I
dont run out of memory.
I can use a simple work script to save the several steps on rotating the
images of the 10 that are open.
But when I try to script the proces to SAVE AS to the new directory, they
all go to the same file name . . . that being the one that was present when
the script was recorded. I want each SAVE AS to go to the filename of the
selected image, not the one named in the script.
I dont see a way to tell the script that it is the selected file name I
want.
I am sure someone has run into this before.
How do you get a recorded script to use the selected file name when it is
run?
| |
|
| On Mon, 16 Apr 2007 14:41:01 -0500, "rfr" <rfrohrer@iw.net> wrote:
>I can use a simple work script to save the several steps on rotating the=
=20
>images of the 10 that are open.
>
>But when I try to script the proces to SAVE AS to the new directory, =
they=20
>all go to the same file name . . . that being the one that was present =
when=20
>the script was recorded. I want each SAVE AS to go to the filename of =
the=20
>selected image, not the one named in the script.
>
>I dont see a way to tell the script that it is the selected file name I=20
>want.
>
>I am sure someone has run into this before.
>
>How do you get a recorded script to use the selected file name when it =
is=20
>run?=20
>
You don't. Use the script to do the rotation and then use the Batch
Process (using that script) to save the files.
--=20
Regards
David: NorthWest, England
| |
| Fred Hiltz 2007-04-16, 6:22 pm |
| rfr wrote:
> I am trying to do something which seems so simple that is
> should be quite easy to automate.
[snip]
> But when I try to script the proces to SAVE AS to the new
> directory, they all go to the same file name . . . that being
> the one that was present when the script was recorded. I want
> each SAVE AS to go to the filename of the selected image, not
> the one named in the script.
>
> I dont see a way to tell the script that it is the selected
> file name I want. I am sure someone has run into this before.
> How do you get a recorded script to use the selected file name
> when it is run?
You can do it with the Python library of file I/O commands and a lot
of string manipulation of file names. However, PSP has already done
this for you in the Batch Processor. There you can specify a
different output folder, different format, different file name in
many ways, and a script to edit each image. Learn the details in
Help > Contents > Automating Tasks > Processing Multiple Files.
Open a sample image. Record a script while you do straightening and
other edits. Save the script. Close the image. Edit the script,
setting the steps to Interactive, or else be sure to run with the
Interactive Script Playback button pushed.
--
Fred Hiltz, fhiltz at yahoo dot com
| |
|
| "rfr" <rfrohrer@iw.net> wrote in
news:69udnQnF8tcsTL7bnZ2dnUVZ_v2knZ2d@prairiewave.com:
> I am trying to do something which seems so simple that is should be
> quite easy to automate.
>
> I have been given a bunch ( over 100) of 8x10 photos in .jpg format
> that are tilted sideways.
> I;/benson_cd/8x10/xxxxxx.jpg xxxxxx is the file name and there
are
> multiple directories under benson_cd
>
> I have created a new directory I:/benson_cd/straightened/8x10 where
I
> am going to put straightened versions of these images in .png format
>
> I can do this the brute force method, one-by-one, loading about 10
of
> these into PSP v8 and doing each step on each of them. I do it 10 at
a
> time so I dont run out of memory.
>
> I can use a simple work script to save the several steps on rotating
> the images of the 10 that are open.
>
> But when I try to script the proces to SAVE AS to the new directory,
> they all go to the same file name . . . that being the one that was
> present when the script was recorded. I want each SAVE AS to go to
the
> filename of the selected image, not the one named in the script.
>
> I dont see a way to tell the script that it is the selected file
name
> I want.
>
> I am sure someone has run into this before.
>
> How do you get a recorded script to use the selected file name when
it
> is run?
When recording the script to straighten the images, do not record the
save part, only the straightening stuff. Then save the script at that
stage. The Batch Process dialogue provides the options you need for
copying the image to another folder and saving in another format.
Regards,
JoeB
| |
|
| Thank you!
I had sensed there must be some way to make this process to use the current
image. You refer to it being the Interactive mode or feature. I had missed
that, perhaps had just forgotten what it was called and where to find it. I
say that because a long time ago I did something like this and it worked
well. So, I was puzzled that my first attempt to do something similar wasnt
working.
When one uses features often, one remembers they exist, where they are, how
to use them. But on features seldom used . . the where and how to use them
is obscure and the HELP facilities . . well . . . hmmm . . .
Thank you.
"Fred Hiltz" <not@home.ca> wrote in message
news:bvQUh.2473$F32.79@trndny02...
> rfr wrote:
> [snip]
>
> You can do it with the Python library of file I/O commands and a lot
> of string manipulation of file names. However, PSP has already done
> this for you in the Batch Processor. There you can specify a
> different output folder, different format, different file name in
> many ways, and a script to edit each image. Learn the details in
> Help > Contents > Automating Tasks > Processing Multiple Files.
>
> Open a sample image. Record a script while you do straightening and
> other edits. Save the script. Close the image. Edit the script,
> setting the steps to Interactive, or else be sure to run with the
> Interactive Script Playback button pushed.
> --
> Fred Hiltz, fhiltz at yahoo dot com
>
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|