Search found 15 matches

by AnilTejwani
Tue Mar 05, 2019 5:54 am
Forum: Photoshop Scripts
Topic: Photoshop script to crop/canvas size by specific dimension
Replies: 3
Views: 523

Re: Photoshop script to crop/canvas size by specific dimension

So, this image has the total size of 355x235mm. The red border has the size of 300x200mm. The script must read 300x200 in the file name. "a"x"b"_"c"x"d". No matter how many digits "a" and "b" have. I suspect that you can use "_" as a delimiter. Try the below code. // i assume filename will be in fo...
by AnilTejwani
Tue Mar 05, 2019 5:31 am
Forum: Photoshop Scripting - General Discussion
Topic: Vector rectangle shape made with ExtendScript?
Replies: 2
Views: 218

Re: Vector rectangle shape made with ExtendScript?

Here is script (zip fiel attached) that creates a 2px wide (stroke) rectangle around the full width/height of PSD.

Hope it helps.
by AnilTejwani
Tue Mar 05, 2019 4:55 am
Forum: Photoshop Scripting - General Discussion
Topic: Download and Open Web Image In Photoshop
Replies: 2
Views: 378

Re: Download and Open Web Image In Photoshop

Here's some more discussion about that method/post from stackoverflow. So you should be able to do something like this: var file = new File('~/Desktop/kitty.jpg'); app.system("curl -o "+ file.fsName +" https://placekitten.com/200/300"); app.open( file ); file.remove(); That did it. Thanks a lot for...
by AnilTejwani
Thu Feb 21, 2019 12:29 pm
Forum: Help Me
Topic: Get Drop Shadow and Pattern Overlay properties
Replies: 0
Views: 204

Get Drop Shadow and Pattern Overlay properties

Hi, Is it possible to get (on the active layer app.activeDocument.activeLayer ) 1. what are the effects applied (example has 3 effects -> drop shadow, stroke and pattern overlay) 2. if yes to 1 above, possible to get properties of each ( lets say only drop shadow to start with, whats the opacity, bl...
by AnilTejwani
Tue Feb 19, 2019 2:35 pm
Forum: Help Me
Topic: Merge down every other layer in the layer stack?
Replies: 2
Views: 221

Re: Merge down every other layer in the layer stack?

Try this script, // Script by Anil Tejwani | 19/Feb/2019 var ad = app.activeDocument; var l = ad.artLayers.length; // initial number of layers in the current doc at the start var tl = Math.floor(l/2); if(l%2 === 0){tl = tl-1;} for(var i = 0; i < tl; i++){ ad.activeLayer = ad.artLayers ; ad.activeLay...
by AnilTejwani
Wed Feb 13, 2019 5:51 am
Forum: Help Me
Topic: Scripting Multiple rectangle selection
Replies: 2
Views: 311

Re: Scripting Multiple rectangle selection

function slctn() { sel = (aD = activeDocument).selection for(i = 0; i < (arg = arguments).length;) { sel.select(arg[i++], SelectionType.EXTEND) } sel.fill(foregroundColor), sel.deselect() } slctn([[0,0], [0,10], [10,10], [10,0]], [[20,20], [20,30], [30,30], [30,20]], [[200,200], [200,230], [230,230...
by AnilTejwani
Tue Feb 12, 2019 12:39 pm
Forum: Help Me
Topic: Scripting Multiple rectangle selection
Replies: 2
Views: 311

Scripting Multiple rectangle selection

Hi, Is it possible to make multiple selection and then fill it? (its not a continous selection, its multiple squares/rectangles and they dont overlap) Manually I would select a rectangle, then use 'shift' and make second selection, use 'shift' again and make next selection... [refer attachment] var ...
by AnilTejwani
Mon Feb 11, 2019 11:46 am
Forum: Photoshop Scripting - General Discussion
Topic: Download and Open Web Image In Photoshop
Replies: 2
Views: 378

Download and Open Web Image In Photoshop

Hi, Is it possible to download and open an web-image in photoshop? Example if I do this *manually* it works i. Open Photoshop, ii. click file-> open iii. paste the web image url ( example 'https://tejwani.com/wp-content/uploads/2018/02/slide1-01.jpg' ) it takes a while but open the file in photoshop...
by AnilTejwani
Sat Jan 26, 2019 2:08 am
Forum: Adobe Bridge Scripting: General Discussion
Topic: Custom Right Click Item
Replies: 3
Views: 959

Re: Custom Right Click Item

if (MenuElement.find ('tsMenu1') == null){ var tsMenu1Cmd = new MenuElement( "menu", "My Custom Menu", "at the end of Thumbnail", "tsMenu1"); var tsSubMenu1Cmd= new MenuElement( "command", "My Custom Sub Menu", "at the end of tsMenu1" , "tsSubMenu1" ); tsSubMenu1Cmd.onSelect = function() { alert('y...
by AnilTejwani
Sat Jan 26, 2019 1:52 am
Forum: Photoshop Scripting - General Discussion
Topic: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\
Replies: 5
Views: 841

Re: How to get/convert Windows path not /d/ps-projects/ but D:\ps-projects\

$.writeln(decodeURI(activeDocument.fullName.fsName));
Thanks Geoff.
What i was missing was the .fsName bit, which I understand would be File System Name.

Thanks once again.

Go to advanced search