extendscript

Function to show/hide layer with Photoshop script (JSX)

▼魔方 西西 提交于 2019-12-05 13:29:22
I am writing a script that will loop through layers, trim them and export. So far I have most of all the element I need to complete this script. The only thing I can't find is how to show/hide an individual layer. I've found functions to show/hide all layers but nothing for one single layer. /////////////////////////////////////////////////////////////////////////////// // selectAllLayers - select all layers (Select > All Layers) /////////////////////////////////////////////////////////////////////////////// function selectAllLayers() { var ref = new ActionReference(); ref.putEnumerated(cTID(

How do I create a folder using ExtendScript?

拜拜、爱过 提交于 2019-12-05 02:01:45
问题 This seems like it would be a very easy problem to solve, but I've been banging my head against it for almost an hour. All I need is a snippet of javascript/extendscript code so that my InDesign CS6 script can create a folder. I know the existing folder in which the new one should be created, and I know the name that this new folder should be called. But how do I get javascript to do it? By the way, all searches online for the folderObj.create() method, which is in the JavaScript Tools Guide,

Extendscript Toolkit debugger fails: Can't start debug session

拜拜、爱过 提交于 2019-12-04 17:34:36
问题 Not a programming problem per se, but rather a programming environment problem that I have been unable to find a solution to. The problem relates to Adobe's Extendscript Toolkit (both 3.5 and 4), but so far I haven't been able to solve the problem, so here I am... The error I get has appeared more or less over night. I didn't experience this problem yesterday, nor this morning. But exactly WHAT has happened is beyond me. I have removed preferences, I have uninstalled, reinstalled, created a

Execute external script in ExtendScript for Illustrator

喜你入骨 提交于 2019-12-04 14:40:57
问题 Summary: Is there a way to use the execute() function to pass a parameter to a Python script, and have the Python script use the parameter in its execution, then return the result to ExtendScript? Context: I'm building a script for Illustrator that has to query a web service, process the resultant XML file, and return the results to the user. This would be easy if I were using one of the applications that support the Socket feature, but Illustrator doesn't. My next thought, was that I can

Can Adobe .jsx scripts include other script files?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 12:49:05
We're writing a bunch of .jsx scripts and in each I have to mock out some functions so I can use things like Array.map() and String.trim(), but I don't want to have to include that code at the top of every script. Is there a way to "include" other .jsx scripts inside of a .jsx script file? Armin Or you can simply use #include and #includepath preprocessor directives at the top of your script. You can find a detailed description in Adobe's "JavaScript Tools Guide" . For example, if you want to include scripts/helper.jsx in a .jsx file: #include "scripts/helpers.jsx" // the rest of your code

Which ECMAScript standards comply Adobe's ExtendScript implementation? (if any)

房东的猫 提交于 2019-12-04 12:06:27
问题 I'm a JavaScript developer, who has just begun to dive into Adobe's ExtendScript technology, aiming to improve productivity and workflow on many of my enterprise's daily tasks on Illustrator PDF form generation. In first instance I thought it was an implementation of some ECMAScript standards with addition of a propertary implementation of a Document Object Model, an API for accessing the file system and some other stuff. I was hoping the last version of the Creative Suite (CS6) implemented

How do I create a folder using ExtendScript?

亡梦爱人 提交于 2019-12-03 16:16:39
This seems like it would be a very easy problem to solve, but I've been banging my head against it for almost an hour. All I need is a snippet of javascript/extendscript code so that my InDesign CS6 script can create a folder. I know the existing folder in which the new one should be created, and I know the name that this new folder should be called. But how do I get javascript to do it? By the way, all searches online for the folderObj.create() method, which is in the JavaScript Tools Guide, prove useless. I've tried several variations on that method, but nothing seems to actually create the

Adobe After Effects extend script - how to run script from command line and pass in arguments?

若如初见. 提交于 2019-12-03 14:19:27
问题 I'm trying to run an Adobe AE extendscript from the command line. I use the "-r" argument and I can run scripts fine. However, is it possible to pass in an argument to the script? Like, if i run this from the command line: C:\>"C:\Program Files\\Adobe\\Adobe After Effects CC\\Support Files\\AfterFX" -r "C:\Workspaces\MyAEScripts\AutomateSetup.jsx" hello is it possible to get that "hello" into my AutomateSetup.jsx script? I've been googling for a while and can't find a solution to this. 回答1:

What is the difference between app.doScript and $.evalFile?

可紊 提交于 2019-12-03 13:28:20
The only difference I have found so far: If a script that is run by app.doScript returns an error, the file and line number of the error are overridden by the file and line number of the app.doScript call. Are there any other differences I should know about? Here's sample code that demonstrates the above difference: First run InDesign: c: cd "C:\Program Files\Adobe\Adobe InDesign CS6 Server x64" InDesignServer.com -port 12345 pause Next create a batch file to run a script: c: cd "C:\Program Files\Adobe\Adobe InDesign CS6 Server x64" sampleclient -host localhost:12345 -server "C:/doscript_vs

Saving per-user or per-document preferences in a Photoshop script

雨燕双飞 提交于 2019-12-03 12:53:04
问题 I'm working on a Photoshop script in JavaScript using ExtendScript. My script allows some user input, and I'd like to save it between uses. That is, I'm looking for a way to save a simple string or numeric value under a particular key so that I'll be able to access it on subsequent uses of the script. Simply put, I want to save a preference for my script. How do I do that? Even better would be to be able to save at least some preferences on a per-document basis. Is that possible? That is, can