Copy link to clipboard
Copied
Trying to create a custom "condition" for a complex Photoshop Action.
I have a custom, Unlockbackround.jsx that is in the script menu.
That unlocks the backround layer and then proceeds to group all layers. is there a way to point a condition to a script.?
Right now the condition is
If back round is locked
play locked backround,
if layer is unlocked then play unlocked backround
the problem is if the "back round layer isn't actually clicked on , it dosnt unlock.
thats why i wrote the .jsx
Problem is i don't want to deploy the scripts, only the actions to our company. any suggestions welcom
Stephen_A_Marsh schrieb
… Although it is “fun” using online translators to work out exactly what is going in your screenshot …
That's really a bad trap sometimes.
Stephen_A_Marsh schrieb
… would opening your action on an English installation still show the action in German?
Not in the past.
But perhaps with the newest versions? Please try it:
Copy link to clipboard
Copied
This script always "unlocks" the Background even if it does not exist or is not selected. )
try { app.activeDocument.backgroundLayer.isBackgroundLayer = false } catch(e) { }
Copy link to clipboard
Copied
Are there only files with more than one layer?
(Only) in this case it is possible to create an action which always creates an background layer - or always makes layer from background layer, no matter if a background layer exists or not. No script will be needed.
But if there are also files with only one layer exists - than you will need a script.
Copy link to clipboard
Copied
If you don’t wish to use scripts, then the only other way I can think of to do this in an automated/idiot proof fashion would be to use Conditional Actions. Although Conditional Actions are very limited, they may just do the job for your specific use case.
Select the back layer ( opt/alt + , ) then check to see if it is a true background image “layer” (rather than a standard layer that just happens to be named “Background” and also just happens to be the back layer and also just happens to also be locked).
or:
This could lead incorrect results if the back layer is a non background layer and it is locked…
Or perhaps you could chain together two different conditional actions (one action playing another action) to check for both locked and background, which is probably overkill.
Anyway, explore these ideas and you should have a viable solution that does not have a dependency on a script. Let me know if you need me to comment further on these points.
EDIT: I just tested with a flattened image and the select back layer step results in an error, so this may not help if there is a chance of flat images being processed.
Copy link to clipboard
Copied
how do i get it to record select back layer?
Copy link to clipboard
Copied
Don’t use the select back layer command if your source images are flattened with only a Background image… So if you are sure that there will be at least a single layer or one or more layers + Background image, then simply record and press:
opt ,
or
alt ,
(That is Option Comma on the Mac OS or Alt Comma on Win OS). There are many keyboard shortcuts that record commands in actions that may no be obvious simply looking at the menus, GUI etc.
Copy link to clipboard
Copied
Thank you so much this fixed everything!
Copy link to clipboard
Copied
works great on layered files but what if there is oNLY the back round layer? Im attaching a link Dropbox - Convert RGB to CMYK GRACol 2006.atn
Scenerios
Backround layer only
Backround layer and more layers
No back round layer
Copy link to clipboard
Copied
Yes, I did mention that at least twice in two different posts.
There may be clues in my earlier post, I need to test a bit further. Actions have limitations and sometimes one can only take things so far without scripts.
I’d be interested to hear from other users to see if they have any workarounds.
Copy link to clipboard
Copied
I wrote a script but then that would also have to be deployed to all the employees as well
Copy link to clipboard
Copied
I understand why you are looking for an action only solution… it is yet to be determined if this is possible.
Actions can record a “relative path” to an installed script in the preset folder that is available in the script menu – or an action can record the adhoc use of a script that has not been installed using an “absolute path” (this second point would not be useful in a multi user setting unless you could guarantee that all users could access the same shared resource using the same absolute file path i.e. on a server, what if there are both Mac and Win users?).
So, I see three options:
1. Try to make this work only using an action (may or may not be possible, as I said I have an idea that I’ll test later)
2. Distribute both action and script
3. Create a script for the entire process so that only one file needs to be distributed, installed and maintained
Copy link to clipboard
Copied
I got a working Action
Select and Click-on Play button
1. Make Layer- Set a Layer to Empty
2 Set Back Layer to Layer 0
If Layer is locked Play Locked Backround If Else Play Unlocked Backround
UnLocked Backround
locked Backround
Copy link to clipboard
Copied
Excellent news, glad you got things working!
I just tested a simplified conditional, however it would depend on the actual complexity on what is possible:
Copy link to clipboard
Copied
Thanks for working this out with me
Copy link to clipboard
Copied
i was just wondered if you were able to figure out another scenerio?
Copy link to clipboard
Copied
i was just wondered if you were able to figure out another scenerio?
Why, I thought that you had nailed it!?
My last post provided a generic solution, however it really comes down to specific use cases so it is too hard to comment without having all of the information presented.
Copy link to clipboard
Copied
I did nail it just wondering if you found any other workarounds
Copy link to clipboard
Copied
I did nail it just wondering if you found any other workarounds
I am no longer in day to day production, so I just use the forums to try to “stay sharp”… So until I have a specific case in front of me, no I have not looked into other work arounds.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thanks pixxxel schubser – that is sort of what I was referring to in post #3:
Or perhaps you could chain together two different conditional actions (one action playing another action)
Although it is “fun” using online translators to work out exactly what is going in your screenshot, would opening your action on an English installation still show the action in German?
Copy link to clipboard
Copied
Stephen_A_Marsh schrieb
… Although it is “fun” using online translators to work out exactly what is going in your screenshot …
That's really a bad trap sometimes.
Stephen_A_Marsh schrieb
… would opening your action on an English installation still show the action in German?
Not in the past.
But perhaps with the newest versions? Please try it:
Copy link to clipboard
Copied
Thank you pixxxel schubser!
Copy link to clipboard
Copied
Thank you for testing Stephen_A_Marsh,
Is this my action on an english installation? Was it automatically translated without any rebuild?
If so, than this are great news for all which are works with actions recorded in different installation languages.
Copy link to clipboard
Copied
Hi pixxxel schubser yes, it is your action in CC18 and nothing further was done, simply loaded into an English version. Thank you for sharing the action and helping to find an answer.
Copy link to clipboard
Copied
Your own help should not be underestimated!
It was a nice playing in the sandbox. Take and give relationship.
Thank you too.