Search found 528 matches

by Kukurykus
Fri Sep 30, 2016 12:04 am
Forum: Help Me
Topic: Creating and moving an artLayer inside "active" layerSet
Replies: 24
Views: 33431

Re: Creating and moving an artLayer inside "active" layerSet

You shouldn't remove backgrounLayer code: if ((btm = (lyr = activeDocument.layers)[lyr.length - 1]).isBackgroundLayer) btm.isBackgroundLayer = 0; nme = btm.name btm.move(aD = eval(aD), ElementPlacement.PLACEATEND);(bGl = (bGn = aD.layers)[bGn.length-1]).name = nme, bGl.allLocked=1 because all code w...
by Kukurykus
Thu Sep 29, 2016 2:08 pm
Forum: Help Me
Topic: Resizing an Image by selection size
Replies: 4
Views: 5526

Re: Resizing an Image by selection size

Yes I was too fast writing that code, so I forgot to change 14 to proper selection in document. But I did another mistake! I didn't add '.value' part at end of selection width. Use corrected code once again to get proper result this time: $.level = 0, preferences.rulerUnits = Units.CM try { if ((/^\...
by Kukurykus
Thu Sep 29, 2016 2:23 am
Forum: Help Me
Topic: Creating and moving an artLayer inside "active" layerSet
Replies: 24
Views: 33431

Re: Creating and moving an artLayer inside "active" layerSet

You can't record played action by ScriptListener. You can record only manual operations. Anyway underneath I'm posting a code I was asked for: aL = (aD = 'activeDocument') +'.activeLayer', bol = true, arr = [] while(bol) aL += '.parent', String(AL = eval(aL)).slice(1, 9) != 'LayerSet' ? bol = !bol :...
by Kukurykus
Wed Sep 28, 2016 11:50 pm
Forum: Help Me
Topic: Resizing an Image by selection size
Replies: 4
Views: 5526

Re: Resizing an Image by selection size

$.level = 0, preferences.rulerUnits = Units.CM try { (bnd = (aD = activeDocument).selection.bounds)[2] - bnd[0], v = prompt('Enter the value:', ''); (/^\d*$/).test(v) ? (f = v / 14, aD.resizeImage(aD.width * f, aD.height * f)) : alert('That wasn\'t number!') } catch (errSel) {alert('Make selection ...
by Kukurykus
Tue Sep 27, 2016 10:21 pm
Forum: Help Me
Topic: Creating and moving an artLayer inside "active" layerSet
Replies: 24
Views: 33431

Re: Creating and moving an artLayer inside "active" layerSet

Okey I got it. For an example I made beside background a new folder where I put another folder, so at the beggining I had empty subfolder in main folder and beside all there was also a background (not in any of the above). Try the following to see the result is what you expected (it should work also...
by Kukurykus
Sun Sep 25, 2016 10:51 pm
Forum: Help Me
Topic: Creating and moving an artLayer inside "active" layerSet
Replies: 24
Views: 33431

Re: Creating and moving an artLayer inside "active" layerSet

If I understand well then you don't have background but simple layer instead of bg, and that layer has some name. Is that layer on the bottom? I mean last available item, below other folders and layers? If so I tried it and it moved last layer to the location pointed in script. Anyway when I used yo...
by Kukurykus
Sun Sep 25, 2016 10:12 pm
Forum: Help Me
Topic: Using variables across different scripts
Replies: 13
Views: 16947

Re: Using variables across different scripts

I use alias for script folder too in my company where are 12 computers with Photoshop. That would be boring each time I do update to load to each computer new version of old scripts or just new scripts and some additions. I simply save them in folder I keep on server and then when someone launches P...
by Kukurykus
Fri Sep 23, 2016 4:30 pm
Forum: Help Me
Topic: Creating and moving an artLayer inside "active" layerSet
Replies: 24
Views: 33431

Re: Creating and moving an artLayer inside "active" layerSet

To add a layer inside active layerSet (inside other layerSet when that "inside layerSet" is selected): activeDocument.activeLayer.artLayers.add() Doing the same by index: activeDocument.layers[0].layers[0].artLayers.add() It's how to move a background (changed first to normal layer) to the...
by Kukurykus
Fri Sep 23, 2016 2:23 pm
Forum: Help Me
Topic: Using variables across different scripts
Replies: 13
Views: 16947

Re: Using variables across different scripts

You're rigth Davide it's simpler and I know it too. I just spent last year in CS2 where I started scripting from zero and there evalfile wasn't available yet so I found out this method. I had fun to write scripts for all versions of Photoshop starting from CS2 up to CS6 and trying to make them worki...
by Kukurykus
Thu Sep 22, 2016 4:40 pm
Forum: Help Me
Topic: Using variables across different scripts
Replies: 13
Views: 16947

Re: Using variables across different scripts

No you didn't understand. You don't have to keep your .psd files in the same folder you keep your scripts.

I wanted only to make easy to check a path of script. There is no completely need to copy psd files to scripts folder.

Anyway I updated last post, you can read it again.