can you use variables in actions?

TP
Posted By
Troy Piggins
Nov 24, 2009
Views
674
Replies
8
Status
Closed
I’m trying to create an action that I intend to run after I’m finished processing a TIF. I want it to save the full sized TIF; convert to sRGB 8bit JPG; save that; resize down to 800 max sides; save for web; resize down to 500 max sides; save that for web.

Think I’m ok for most of it, but running into trouble with the filenames where it’s "saving as". How do you think this can be done?

eg original filename is filename.TIF
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.


Troy Piggins

Master Retouching Hair

Learn how to rescue details, remove flyaways, add volume, and enhance the definition of hair in any photo. We break down every tool and technique in Photoshop to get picture-perfect hair, every time.

MR
Mike Russell
Nov 24, 2009
On Tue, 24 Nov 2009 16:29:46 +1000, Troy Piggins wrote:

I’m trying to create an action that I intend to run after I’m finished processing a TIF. I want it to save the full sized TIF; convert to sRGB 8bit JPG; save that; resize down to 800 max sides; save for web; resize down to 500 max sides; save that for web.

Think I’m ok for most of it, but running into trouble with the filenames where it’s "saving as". How do you think this can be done?

eg original filename is filename.TIF
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.

Unfortunately, actions do not support variables, but there is hope. You probably want to use scripting, which does allow variables in the scripting language of your choice, typically VB script, or javascript. Check out the scripting toolkit that is shipped with Photoshop.

Also check out http://www.ps-scripts.com/ , which is a site that is dedicated to scripting.

Mike Russell – http://www.curvemeister.com
TP
Troy Piggins
Nov 24, 2009
* Mike Russell wrote :
On Tue, 24 Nov 2009 16:29:46 +1000, Troy Piggins wrote:

[—=| Quote block shrinked by t-prot: 11 lines snipped |=—]
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.

Unfortunately, actions do not support variables, but there is hope. You probably want to use scripting, which does allow variables in the scripting language of your choice, typically VB script, or javascript. Check out the scripting toolkit that is shipped with Photoshop.

Also check out http://www.ps-scripts.com/ , which is a site that is dedicated to scripting.

Will do, thanks Mike.

PS – to save me making another post. I’ve come across a plugin that’s supposed to be pretty good for astro image editing – called starrounder.8bf I think. I read that means it’s a Windows only plugin? Do you know of a way to convert it to Mac?


Troy Piggins
MR
Mike Russell
Nov 24, 2009
On Tue, 24 Nov 2009 18:22:51 +1000, Troy Piggins wrote:

* Mike Russell wrote :
On Tue, 24 Nov 2009 16:29:46 +1000, Troy Piggins wrote:

[—=| Quote block shrinked by t-prot: 11 lines snipped |=—]
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.

Unfortunately, actions do not support variables, but there is hope. You probably want to use scripting, which does allow variables in the scripting language of your choice, typically VB script, or javascript. Check out the scripting toolkit that is shipped with Photoshop.

Also check out http://www.ps-scripts.com/ , which is a site that is dedicated to scripting.

Will do, thanks Mike.

PS – to save me making another post. I’ve come across a plugin that’s supposed to be pretty good for astro image editing – called starrounder.8bf I think. I read that means it’s a Windows only plugin? Do you know of a way to convert it to Mac?

Although it could be done, AFAIK, there is no way to convert from Windows to Mac, or run a Windows plugin directly on the Mac.

If that plugin is important enough, it is possible to emulate windows on your Macintosh, run Photoshop for Windows, and access the plugin that way. —
Mike Russell – http://www.curvemeister.com
TP
Troy Piggins
Nov 24, 2009
* Mike Russell wrote :
On Tue, 24 Nov 2009 16:29:46 +1000, Troy Piggins wrote:

[—=| Quote block shrinked by t-prot: 11 lines snipped |=—]
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.

Unfortunately, actions do not support variables, but there is hope. You probably want to use scripting, which does allow variables in the scripting language of your choice, typically VB script, or javascript. Check out the scripting toolkit that is shipped with Photoshop.

Also check out http://www.ps-scripts.com/ , which is a site that is dedicated to scripting.

Just thinking about this a little more. How about making the action pause or wait for me to type in the filename at the save for web window, then click ok and action continues. Is that possible and how? Sorry if it’s a dumb question.


Troy Piggins
LD
Louis des Tombe
Nov 25, 2009
Troy Piggins wrote in news:20091124161813
@usenet.piggo.com:

eg original filename is filename.TIF
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

I’ve solved it in a cheap way, but it works: I’ve created special temp directories, named, say, ‘full’, ‘800’, and ‘500’, and I let the saves go in there. After I’ve done a bunch I put the files where I want them, all versions have the same name but in my case they never go to the same place.

Maybe this helps.


Louis
MR
Mike Russell
Nov 25, 2009
On Wed, 25 Nov 2009 09:59:11 +1000, Troy Piggins wrote:

* Mike Russell wrote :
On Tue, 24 Nov 2009 16:29:46 +1000, Troy Piggins wrote:

[—=| Quote block shrinked by t-prot: 11 lines snipped |=—]
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

or something like that.

Unfortunately, actions do not support variables, but there is hope. You probably want to use scripting, which does allow variables in the scripting language of your choice, typically VB script, or javascript. Check out the scripting toolkit that is shipped with Photoshop.

Also check out http://www.ps-scripts.com/ , which is a site that is dedicated to scripting.

Just thinking about this a little more. How about making the action pause or wait for me to type in the filename at the save for web window, then click ok and action continues. Is that possible and how? Sorry if it’s a dumb question.

Yes, that will work. Just do a save while recording your action. Then open the action, and click on the dialog icon next to the save command. —
Mike Russell – http://www.curvemeister.com
TP
Troy Piggins
Nov 25, 2009
* Mike Russell wrote :
On Wed, 25 Nov 2009 09:59:11 +1000, Troy Piggins wrote:

[—=| Quote block shrinked by t-prot: 17 lines snipped |=—]
Just thinking about this a little more. How about making the action pause or wait for me to type in the filename at the save for web window, then click ok and action continues. Is that possible and how? Sorry if it’s a dumb question.

Yes, that will work. Just do a save while recording your action. Then open the action, and click on the dialog icon next to the save command.

I see. Thanks Mike. Still coming to grips with all things Photoshop.


Troy Piggins
TP
Troy Piggins
Nov 25, 2009
* Louis des Tombe wrote :
Troy Piggins wrote in news:20091124161813
@usenet.piggo.com:

eg original filename is filename.TIF
save full sized jpg as filename.JPG
save 800 max as filename-800.JPG
save 500 max as filename-500.JPG

I’ve solved it in a cheap way, but it works: I’ve created special temp directories, named, say, ‘full’, ‘800’, and ‘500’, and I let the saves go in there. After I’ve done a bunch I put the files where I want them, all versions have the same name but in my case they never go to the same place.
Maybe this helps.

Thanks mate. All sorted now.


Troy Piggins

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections