jazz-y
Guide
jazz-y
Guide
Activity
Jan 05, 2020
02:15 PM
I made this preset based on downloaded photo from the Internet. Not sure that it is suitable for photos of your camera. 3d lut for image above (load it from image -> adjustments -> color lookup in ps)
... View more
Jan 05, 2020
01:41 PM
1 Upvote
I like 3D loot creator for extreme color correction. All created presets can be edited in the program and transferred to Photoshop through the color lookup option A more accurate way is to use Adobe DNG Profile Editor (or ColorChecker Passport) with 24-patches color target to build profile of camera (targets are usually plastic, they will not get anything from water).
... View more
Jan 05, 2020
03:19 AM
2 Upvotes
If you need to alert every time when the active layer is changed, use app.notifiers: if (app.notifiers.length == 0) {
app.notifiersEnabled = true
app.notifiers.add('slct', File($.fileName), 'Lyr ')
} else {
if (app.activeDocument.activeLayer.name.substr(0,3) == "nav") {
alert("cool")
}else{
alert("notcool")
}
}
app.notifiers.removeAll() to disable listening events (or delete record in menu File -> Scripts -> Scripts event manager if you need to check only the name of the top layer, its index is always 0, i.e.: if (app.activeDocument.layers[0].name.substr(0,3) == "nav"){
alert("cool")
}else{
alert("notcool");
} (not sure I understood the question correctly 🙂
... View more
Jan 04, 2020
11:55 PM
In this case, I would like to ask, is it really necessary to open so many files at the same time? If you use a script to process them, maybe just write to get a list of files, divide it into parts (for example, 250 files) and process each part sequentially (performing purge all after each such fragment)?
... View more
Jan 04, 2020
07:05 AM
2 Upvotes
if you really want to use try... catch, then you can use the throw operator to generate an error 🙂 openDoc();
function openDoc() {
try {
if (app.documents.length < 2) throw ("too few docs")}
catch (e) {alert (e)}}
... View more
Jan 04, 2020
06:13 AM
1 Upvote
To get the center of a Type object you need to determine the boundaries of each text object - in principle, if we are talking about hundreds of images, not thousands - this can be done manually (in batch cycle with action). Convert PNG to a format with layers, create a new layer with a solid fill over the text - then use the borders of this layer as a container for text (app.activeDocument.activeLayer.bounds) If the text is contrasting and can be easily separated from the background with selection tools, you can use the bounds of the resulting selection as the container coordinates for the text object (app.activeDocument.selection.bounds).
... View more
Jan 03, 2020
10:39 AM
Give it a try. In my case, this works. If I managed to open the required number of files at the same time and start to process them, then with the purge all command after saving the next file, there are no problems. If there is no such command, then I quickly get a message about disk full.
... View more
Jan 03, 2020
10:06 AM
I often work with a large number of files, at the limit of the capabilities of RAM and the Photoshop swap file (for my computer). I can say for sure - despite the fact that purge all does not work as before, however, after executing this command, space is freed up inside the swap file (i.e., further work is possible, despite the fact that the disk space is taken)).
... View more
Jan 02, 2020
03:39 AM
1 Upvote
historically, they have been used in sales automation (operator’s interaction with the cash terminal) - macros are assigned to the keys, which cause certain operations to process commodity items.
... View more
Jan 01, 2020
12:24 PM
In fact, I re-read several times, but still did not understand the question to the end. I thought that the author needed some more complex solution - for example, I use the pos-keyboard to launch frequently used actions outside the context of operations currently loaded in the action panel. To do this, I record the action using the ScriptListener (or export it from the ATN using the xtools), clean up the code and call the script with hotkey from the pos keyboard.
... View more
Jan 01, 2020
05:57 AM
1 Upvote
hm... may be that?
... View more
Dec 22, 2019
01:09 AM
1 Upvote
The problem is that the batch processor operates on the basis of a previously compiled list of files from the directory you specified. There are 2 consequences from this fact: 1. if the file is processed, it is excluded from the list of unprocessed files and its reopening (along the same path) by the batch becomes impossible 2. if new files were added to the directory during processing, then the batch processor cannot add them to the processing list until you start it again also said in help (https://helpx.adobe.com/photoshop/using/processing-batch-files.html) Override Action “Open” Commands Ensures that the files you selected in the Batch command are processed, without opening the file you may have specified in the action's Open command. If the action contains an Open command that opens a saved file and you don't select this option, the Batch command opens and processes only the file you used to record the Open command (This occurs because the Batch command opens the file specified by the action after each of the files in the Batch source folder is opened. Because the most recently opened file is the one named in the action, the Batch command performs the action on that file, and none of the files in the Batch source folder are processed.) To use this option, the action must contain an Open command. Otherwise, the Batch command won't open the files you've selected for batch-processing. Selecting this option doesn't disregard everything in an Open command—only the choice of files to open. Deselect this option if the action was recorded to operate on an open file, or if the action contains Open commands for specific files that are required by the action. could it be easier to make 2 separate launch of batch for different stages of processing?
... View more
Dec 18, 2019
01:53 AM
The code of the event listener that you brought is not related to managing actions. I think there are 2 options: a) save the set to disk as atn, load this atn again (at this moment all hotkeys will be automatically reset), delete source set from panel (look sample code and stdlib of xtools, there are examples of each of these actions) b) create a copy of each action inside the set, delete the original action (in this case, all actions will have a "copy" in the name, but hotkeys will disappear (the event listener can write the duplicate and delete menu commands, they must be applied to each action ) I’m sorry that without a code example, I’m not a good programmer to write a working solution in 5 minutes. Nevertheless, I think that both of these scenarios can be implemented.
... View more
Dec 16, 2019
08:12 AM
1 Upvote
Genious! It works! function s2t(s) {return stringIDToTypeID(s)}
selectCommand ("Test set", "Test atn", 1)
function selectCommand(setName, atnName, cmdIdx)
{
try {
var desc = new ActionDescriptor()
var ref = new ActionReference()
ref.putIndex ( s2t("command"), cmdIdx)
ref.putName( s2t("action"), atnName )
ref.putName(s2t("actionSet"), setName )
desc.putReference(s2t("target"), ref )
executeAction( s2t("duplicate"), desc)
executeAction( s2t("delete"), desc)
return true
}
catch (e) {return fasle}
}
... View more
Dec 16, 2019
01:35 AM
in action it colud be done throw find&replace menu of text item
... View more
Dec 14, 2019
11:04 AM
Yes, I looked through examples of the xbytor and his stdlib, but I did not find methods to solve this problem. In this moment, I changed the script operation algorithm - after starting the action, it evaluates the result of its execution: since the "stop" always throws an exception, I get the number of the command that stopped, if the name of the previous command is localize ("$$$ / Actions / Event / Stop "), then I remember its position and at the next start of the script I continue from this point. This is not exactly what I wanted, but it allows users to give a working solution.
... View more
Dec 14, 2019
08:13 AM
The meaning of my script is that it searches and launches an action, depending on the name of the document / specific layer. That is, problems with hard-coded action names simply do not arise - they are determined dynamically during the script. If you run the script from the automation menu, it is executed outside the context of the action panel (that is, when the action is executed, the command cursor stops after the stop command and the user can continue the action with a hotkey or play button). However, in this case, I have to show the script interface every time so that users can specify the launch parameters they need. To avoid displaying the interface, users write it to the action panel as a separate operation - in this case, Photoshop considers the action from which the script is run as “parent” in the action chain and, if there is a stop command (completely stopping execution), returns the cursor to the action from which the script was run. So far, I have recommended that users break down the actions into separate steps and not use the stop command. However, I am trying to find a solution to this problem.
... View more
Dec 14, 2019
06:14 AM
There is a script that is recorded (and runs by user) in the action palette. As a result of its work, the script launches another action. Another action (sometimes) has a "stop" command. I need to make that the cursor in the action palette set on the command after the stop, and does not return to the command from which the script was run (last variant - is normal photoshop behavior). I can get the index of the command on which the stop occurred, I can continue the action from it, but this option is not suitable for the me in that script. Is there a known method that allows to set focus on a specific command / action in the actions palette? This sample does not work (the "select" command cannot be executed) function s2t(s) {return stringIDToTypeID(s)}
var desc = new ActionDescriptor()
var ref = new ActionReference()
ref.putName(s2t("action"), "test atn" )
ref.putName(s2t("actionSet"), "test set" )
desc.putReference(s2t("target"), ref )
executeAction(s2t ("select"), desc)
... View more
Nov 19, 2019
10:15 AM
This is obvious, but it does not correspond to the tasks that I solved when writing a script 🙂
... View more
Nov 17, 2019
12:19 PM
That’s the problem: if the script is written by user as a command in the actions panel, batch cannot understand whether there was an error while executing the command or not (even if I took into account and processed this error inside the script) As an example, in video i call to the "example" command in the operation panel contains a call to the script "Source1.jsx", which contains obviously inoperative code that causes an error. Batch does not notice that the script was executed with an error and continues execution for each file ( stop for errors is enabled). Of course, I can handle this error inside the script, but this will not change the situation - the script will not be able to stop the batch until all files are opened. Is there any way to stop the batch in such a situation? (i.e. shut down the script so that the batch understands that an error has occurred)
... View more
Nov 17, 2019
10:25 AM
I have a script that is often used in conjunction with standard batch processing. The behavior of the script depends on the user's settings and there are situations when it ends with an error. However, batch processing does not end at the same time - it opens the next file and the script terminates again and again with an error and so on until the files run out. Is there a way to tell the standard batch processor that the script completed with an error so that it stops processing (i.e., something like when batch processing cannot complete the operation and suggests stopping)?
... View more
Nov 06, 2019
07:29 AM
hmm... selectNoLayers ? (I'm not sure if this can be handled in the panel)
... View more
Oct 31, 2019
08:00 AM
I figuratively. "registering" == automatically copy jsx to startup scripts folder 🙂 I just originally planned that the main script itself would generate jsx to add to the bridge menu and write it to the startup scripts folder, however, it encountered restrictions on access rights. It turns out that it is difficult to refuse to manually copy the script launch module by the user. I took this situation into account and in case of access error to the folder, I will offer the user to transfer jsx independently. Thank you all for your advice!
... View more
Oct 30, 2019
12:07 PM
I made a test script and quite successfully created a menu item that calls the main script with the parameters I need. In this part I have no questions. The main problem at the moment is how to register this script so that it automatically fits into the bridge menu (and is always there). I found only ready-made examples when the script is already registered and placed by Startup Scripts, but I did not find how to make this placement 🙂 I think that I’ll just make an offer to the user to start Photoshop from the administrator account so that my script can copy the initialization module into Startup Scripts. But this decision seems to me not the best ... UPD var ss= new Folder ( $.getenv ("APPDATA") + "/Adobe/Bridge CC 2019/Startup Scripts") on windows i can put scripts here, but question - how to correctly build bridge version folder (Bridge CC 2019) if i changes
... View more
Oct 30, 2019
09:29 AM
not necessary to modify photoshop.js - just place the script that initializes the launch in \ Common Files \ Adobe \ Startup Scripts CC \ Adobe Photoshop \ There are no problems with manual copying, however, I wanted to automatically add the script to the menu - there are problems with access rights (the folder is writable only for administrators) for example, code var ss= new Folder ($.getenv ("COMMONPROGRAMFILES") + "/Adobe/Startup Scripts CC/Adobe Photoshop/")
alert (ss.create()) alerts "false" if user not administrator
... View more
Oct 30, 2019
08:46 AM
I have several scripts that work in Photoshop, but in some situations they get files from the bridge (via BridgeTalk ()). Everything works fine, but I would like to make it possible to call my script not only from Photoshop, but also from the Bridge menu (taking into account that the script has #target photoshop and located in the folder with Photoshop presets). I found several examples, but all of them involve either adding a menu item or using the startup folder bridge (I still can’t figure out how to access this directory from the script itself (win + macos) to copy some fragment that calls the script , or through # target bridge (the menu is added while the script is running until the bridge is restarted)). I am sure that someone was trying to solve the same problem, could you share ideas on how to do this better?
... View more
Oct 24, 2019
03:50 AM
I thought about this way. Essentially the same as #include, but with the difference that the path to the file is set during the execution of the function. I just thought that if Photoshop could pass an ActionDescriptor as an argument when using events, then there is a native way to do the same 🙂 In any case, thank you all for your advice! I am sure that they will be useful not only to me. call_script1();
function call_script1()
{
var param = new Object();
param.x = 1;
param.y = "2";
param.z = [1, "2"];
#include script1.jsx
}
... View more
Oct 23, 2019
10:33 PM
originally i called the second script through: function s2t(s) {return stringIDToTypeID(s)}
function t2s(t) {return typeIDToStringID(t)}
var pth = new File ("e:/_Output/test.jsx")
var desc = new ActionDescriptor()
desc.putPath( s2t ("javaScript"), pth)
desc.putString( s2t("javaScriptMessage"), "tried to put variables, objects, functions here" )
executeAction(s2t( "AdobeScriptAutomation Scripts" ), desc) i need to pass a number of parameters: integer, strings, booleans and an array of objects that describe the set of actions, for example structure of settings object: function initObj (s)
{
s.autoStart = true
s.allowContinue = true
s.saveMode = 0
s.lastSavePath = ""
s.fileFormat = 0
s.flatten = false
s.jpgQuality = 12
s.override = false
s.options = []
s.doneCounter = -1
s.continue = 0
} where s.options are: [{active:true, set:"test set", action:"test action 1", stop: false}, {active:false, set:"test set", action:"test action 2", stop: true}, {active:true, set:"test set", action:"test action 3", stop: false}] on advice JJMack now I call the script through executeAction (runtimeEventID, desc) (accordingly, I pre-generated a unique runtimeEventID, in desc I put ActionDescriptor into which I write all the variables beforehand (for ease of processing, I convert the s.options array to a string) - accordingly, in the header of the script that is running, each variable is also declared and there is a corresponding settings object in the script body. A little cumbersome, but quite functional)
... View more
Oct 23, 2019
06:47 AM
Thanks for the advice! But I don’t like when there are a lot of files in a folder, besides I need to not only transfer, but also store variables - for this I use the "registry" of Photoshop and app.putCustomOptions 🙂🙂 The problem is that both scripts can work not only together, but also independently of each other. If you use a common set of variables, then some of them will change in cases where this is not necessary - this forces me to duplicate variables (a separate set of variables for self-contained work and a separate set for starting from the second script). The method proposed by JJMack is almost ideal for my case - the variables are transferred only for a specific instance of the script and you do not need to duplicate the variables or monitor their state since the main settings in the registry will not change.
... View more
Oct 23, 2019
05:05 AM
Thank! I did not look very carefully at the Image Processor code - there really is a useful way to call another script by its identifier with parameter transfer (as if it had been called from the operation panel with pre-saved parameters). This is exactly what will help me solve my problem!
... View more
- « Previous
- Next »