This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.writeln("Hello World!"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function s(str) { return stringIDToTypeID(str) } | |
| var ref = new ActionReference(); | |
| ref.putProperty(s('property'), s('presetManager')); | |
| ref.putEnumerated(s('application'), s('ordinal'), s('targetEnum')); | |
| var desc = executeActionGet(ref).getList(s('presetManager')); | |
| var presetDesc = undefined, | |
| lists = desc.count; | |
| for (var i = 0; i < lists; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| var sharpeningStrength = 225; | |
| csInterface.evalScript('addSharpeningForWeb(' + sharpeningStrength + ')'); | |
| // JSX file (Photoshop) | |
| function addSharpeningForWeb(strength) { | |
| // ... you can now use the strength param here | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSX file (Photoshop) | |
| function addSharpeningForWeb() { | |
| // ... smart Photoshop scripting code here | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| csInterface.evalScript('addSharpeningForWeb()'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| var csInterface = new CSInterface(); | |
| csInterface.evalScript('alert("Hello World!")'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| var csInterface = new CSInterface(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| // ... | |
| csInterface.evalScript('addSharpeningForWeb(' + paramString + ')', function(res) { | |
| // "res" is the response that comes from Photoshop | |
| }); | |
| // JSX file (Photoshop) | |
| function addSharpeningForWeb(paramObj) { | |
| // ... lots of code here | |
| return true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| // ... | |
| csInterface.evalScript('getDocumentInfo()', function(res) { | |
| var resObj = JSON.parse(res); | |
| // you have now access to the same docInfo object | |
| }); | |
| // JSX file (Photoshop) | |
| function getDocumentInfo() { | |
| //... I just make up data here... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JS file (panel) | |
| var sharpeningStrength = 225, | |
| highlightsProtection = 50, | |
| midtonesProtection = 15, | |
| shadowsProtection = 0, | |
| oldAlgorithm = false, | |
| copyrightString = "© John Doe 2018" | |
| csInterface.evalScript('addSharpeningForWeb(' + | |
| sharpeningStrength + ', ' + |
OlderNewer