
raxby
Explorer
raxby
Explorer
Activity
Aug 18, 2019
09:18 PM
When the picture has no subject, it will be prompted.I don't want to display it, because i want to run in silent mode. I try to use "app.displayDialogs = DialogModes.NO;",but it didn't work,the code is here: try{ app.displayDialogs = DialogModes.NO; executeAction(stringIDToTypeID('autoCutout'), undefined, DialogModes.NO); }catch(e){ //not show error }
... View more
Mar 02, 2019
01:19 PM
Now I understand, it is just a tool choice.It can be executed by selecting.
... View more
Mar 02, 2019
12:52 PM
I want to activate this icon button.I tried the AM code, but it only responded to the data results.Any help will be appreciated.
... View more
Dec 04, 2018
06:17 AM
Thank you for your reply. It may be helpful to me.
... View more
Dec 04, 2018
06:13 AM
Wow, that's great.Thanks in advance!
... View more
Dec 03, 2018
12:24 PM
Sorry,you may not understand what I mean.
... View more
Dec 03, 2018
12:22 PM
Hi r-bin Thanks for your reply.I don't want to create an empty ,the jsx file has some AM code after making an action.My ultimate intention is to convert AM code to action.I don't know if that's possible, or if there's any other way.But if i use this way which is making an action through jsx,how to stop recording mode will be a problem.
... View more
Dec 02, 2018
03:45 PM
I write a jsx to record action.But when i execute the code, the actions panel's state is still recording,so i want to stop recording.Here's the jsx code: cTID = function(s) { return app.charIDToTypeID(s); }; sTID = function(s) { return app.stringIDToTypeID(s); }; var desc1 = new ActionDescriptor(); var ref1 = new ActionReference(); ref1.putClass(cTID('Actn')); desc1.putReference(cTID('null'), ref1); var ref2 = new ActionReference(); ref2.putName(cTID('ASet'), "culture"); desc1.putReference(cTID('At '), ref2); var desc2 = new ActionDescriptor(); desc2.putString(cTID('Nm '), "action1"); desc2.putInteger(cTID('FncK'), 0); desc1.putObject(cTID('Usng'), cTID('Actn'), desc2); executeAction(sTID('make'), desc1, DialogModes.NO);
... View more
Nov 06, 2018
07:42 PM
Thank you very much. You are right.
... View more
Nov 06, 2018
09:54 AM
1 Upvote
I write some code to execute the auto tone of camera raw , but the image has no effects. I konw the Action Manager can't record the auto tone of camera raw,so i add the follow code : desc1.putBoolean(charIDToTypeID('Auto'), true); and the auto function is still not work.Any help will be appreciated! All code is as follows: (function () { // Camera Raw Filter var desc1 = new ActionDescriptor(); desc1.putString(charIDToTypeID('CMod'), "Filter"); desc1.putEnumerated(charIDToTypeID('Sett'), charIDToTypeID('Sett'), charIDToTypeID('Cst ')); desc1.putEnumerated(charIDToTypeID('WBal'), charIDToTypeID('WBal'), charIDToTypeID('AsSh')); desc1.putBoolean(charIDToTypeID('Auto'), true); desc1.putInteger(charIDToTypeID('Temp'), 0); desc1.putInteger(charIDToTypeID('Tint'), 0); desc1.putBoolean(charIDToTypeID('CtoG'), false); desc1.putInteger(charIDToTypeID('Strt'), 0); desc1.putInteger(charIDToTypeID('Shrp'), 0); desc1.putInteger(charIDToTypeID('LNR '), 0); desc1.putInteger(charIDToTypeID('CNR '), 0); desc1.putInteger(charIDToTypeID('VigA'), 0); desc1.putInteger(charIDToTypeID('BlkB'), 0); desc1.putInteger(charIDToTypeID('RHue'), 0); desc1.putInteger(charIDToTypeID('RSat'), 0); desc1.putInteger(charIDToTypeID('GHue'), 0); desc1.putInteger(charIDToTypeID('GSat'), 0); desc1.putInteger(charIDToTypeID('BHue'), 0); desc1.putInteger(charIDToTypeID('BSat'), 0); desc1.putInteger(charIDToTypeID('Vibr'), 0); desc1.putInteger(charIDToTypeID('HA_R'), 0); desc1.putInteger(charIDToTypeID('HA_O'), 0); desc1.putInteger(charIDToTypeID('HA_Y'), 0); desc1.putInteger(charIDToTypeID('HA_G'), 0); desc1.putInteger(charIDToTypeID('HA_A'), 0); desc1.putInteger(charIDToTypeID('HA_B'), 0); desc1.putInteger(charIDToTypeID('HA_P'), 0); desc1.putInteger(charIDToTypeID('HA_M'), 0); desc1.putInteger(charIDToTypeID('SA_R'), 0); desc1.putInteger(charIDToTypeID('SA_O'), 0); desc1.putInteger(charIDToTypeID('SA_Y'), 0); desc1.putInteger(charIDToTypeID('SA_G'), 0); desc1.putInteger(charIDToTypeID('SA_A'), 0); desc1.putInteger(charIDToTypeID('SA_B'), 0); desc1.putInteger(charIDToTypeID('SA_P'), 0); desc1.putInteger(charIDToTypeID('SA_M'), 0); desc1.putInteger(charIDToTypeID('LA_R'), 0); desc1.putInteger(charIDToTypeID('LA_O'), 0); desc1.putInteger(charIDToTypeID('LA_Y'), 0); desc1.putInteger(charIDToTypeID('LA_G'), 0); desc1.putInteger(charIDToTypeID('LA_A'), 0); desc1.putInteger(charIDToTypeID('LA_B'), 0); desc1.putInteger(charIDToTypeID('LA_P'), 0); desc1.putInteger(charIDToTypeID('LA_M'), 0); desc1.putInteger(charIDToTypeID('STSH'), 0); desc1.putInteger(charIDToTypeID('STSS'), 0); desc1.putInteger(charIDToTypeID('STHH'), 0); desc1.putInteger(charIDToTypeID('STHS'), 0); desc1.putInteger(charIDToTypeID('STB '), 0); desc1.putInteger(charIDToTypeID('PC_S'), 0); desc1.putInteger(charIDToTypeID('PC_D'), 0); desc1.putInteger(charIDToTypeID('PC_L'), 0); desc1.putInteger(charIDToTypeID('PC_H'), 0); desc1.putInteger(charIDToTypeID('PC_1'), 25); desc1.putInteger(charIDToTypeID('PC_2'), 50); desc1.putInteger(charIDToTypeID('PC_3'), 75); desc1.putDouble(charIDToTypeID('ShpR'), 1); desc1.putInteger(charIDToTypeID('ShpD'), 25); desc1.putInteger(charIDToTypeID('ShpM'), 0); desc1.putInteger(charIDToTypeID('PCVA'), 0); desc1.putInteger(charIDToTypeID('GRNA'), 0); desc1.putInteger(charIDToTypeID('LPEn'), 0); desc1.putInteger(charIDToTypeID('MDis'), 0); desc1.putInteger(charIDToTypeID('PerV'), 0); desc1.putInteger(charIDToTypeID('PerH'), 0); desc1.putDouble(charIDToTypeID('PerR'), 0); desc1.putInteger(charIDToTypeID('PerS'), 100); desc1.putInteger(charIDToTypeID('PerA'), 0); desc1.putInteger(charIDToTypeID('PerU'), 0); desc1.putDouble(charIDToTypeID('PerX'), 0); desc1.putDouble(charIDToTypeID('PerY'), 0); desc1.putInteger(charIDToTypeID('AuCA'), 0); desc1.putDouble(charIDToTypeID('Ex12'), 0); desc1.putInteger(charIDToTypeID('Cr12'), 0); desc1.putInteger(charIDToTypeID('Hi12'), 0); desc1.putInteger(charIDToTypeID('Sh12'), 0); desc1.putInteger(charIDToTypeID('Wh12'), 0); desc1.putInteger(charIDToTypeID('Bk12'), 0); desc1.putInteger(charIDToTypeID('Cl12'), 0); desc1.putInteger(charIDToTypeID('DfPA'), 0); desc1.putInteger(charIDToTypeID('DPHL'), 30); desc1.putInteger(charIDToTypeID('DPHH'), 70); desc1.putInteger(charIDToTypeID('DfGA'), 0); desc1.putInteger(charIDToTypeID('DPGL'), 40); desc1.putInteger(charIDToTypeID('DPGH'), 60); desc1.putInteger(charIDToTypeID('Dhze'), 0); desc1.putInteger(charIDToTypeID('TMMs'), 0); var list1 = new ActionList(); list1.putInteger(0); list1.putInteger(0); list1.putInteger(255); list1.putInteger(255); desc1.putList(charIDToTypeID('Crv '), list1); var list2 = new ActionList(); list2.putInteger(0); list2.putInteger(0); list2.putInteger(255); list2.putInteger(255); desc1.putList(charIDToTypeID('CrvR'), list2); var list3 = new ActionList(); list3.putInteger(0); list3.putInteger(0); list3.putInteger(255); list3.putInteger(255); desc1.putList(charIDToTypeID('CrvG'), list3); var list4 = new ActionList(); list4.putInteger(0); list4.putInteger(0); list4.putInteger(255); list4.putInteger(255); desc1.putList(charIDToTypeID('CrvB'), list4); desc1.putString(charIDToTypeID('CamP'), "Embedded"); desc1.putString(charIDToTypeID('CP_D'), "54650A341B5B5CCAE8442D0B43A92BCE"); desc1.putInteger(charIDToTypeID('PrVe'), 167772160); desc1.putString(charIDToTypeID('Rtch'), ""); desc1.putString(charIDToTypeID('REye'), ""); desc1.putString(charIDToTypeID('LCs '), ""); desc1.putString(charIDToTypeID('Upri'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21 \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <rdf:Description rdf:about=\"\"\n xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n crs:UprightVersion=\"151388160\"\n crs:UprightCenterMode=\"0\"\n crs:UprightCenterNormX=\"0.5\"\n crs:UprightCenterNormY=\"0.5\"\n crs:UprightFocalMode=\"0\"\n crs:UprightFocalLength35mm=\"35\"\n crs:UprightPreview=\"False\"\n crs:UprightTransformCount=\"6\"/>\n </rdf:RDF>\n</x:xmpmeta>\n"); desc1.putString(charIDToTypeID('GuUr'), "<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21 \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <rdf:Description rdf:about=\"\"\n xmlns:crs=\"http://ns.adobe.com/camera-raw-settings/1.0/\"\n crs:UprightFourSegmentsCount=\"0\"/>\n </rdf:RDF>\n</x:xmpmeta>\n"); desc1.putString(charIDToTypeID('Look'), ""); desc1.putString(charIDToTypeID('Pset'), ""); executeAction(stringIDToTypeID('Adobe Camera Raw Filter'), desc1, DialogModes.NO); })();
... View more
May 16, 2018
10:13 AM
Ok,thanks
... View more
May 16, 2018
07:09 AM
It is that i mean, forgive me for not being clear,because i am not clear about the relationship with them which like "n * theHist " in histogram.Thanks again.
... View more
May 16, 2018
06:01 AM
Hi c.pfaffenbichler,sorry to disturb you.I want to get value of theMax and theMin in histogram not the the pixels,how to get this? Thanks
... View more
May 15, 2018
05:32 PM
Yes,It works very well,thank you very much!
... View more
May 14, 2018
06:17 PM
1 Upvote
getRedHistogramStdDev();
function getRedHistogramStdDev() {
var channels = app.activeDocument.channels;
var red = channels[0].histogram;
alert(getStdDev(red));
}
function getStdDev(arry){
var length = arry.length;
var tarry = new Array(length);
var si = 0;
var s = 0;
for (var i = 0; i < arry.length; i += 1) {
if (arry[i] > 0) {
s += i;
si += arry[i];
}
}
var average = si / s;
for (var i = 0; i < length; i++) {
var dev = parseFloat(arry[i]) - parseFloat(average);
tarry = Math.pow(dev, 2);
}
var powSum = 0;
for (var j = 0; j < tarry.length; j++) {
if (tarry[j].toString() != "" || tarry[j].toString() != null) {
powSum = parseFloat(powSum) + parseFloat(tarry[j].toString());
}
}
return Math.sqrt(parseFloat(powSum) / parseFloat(length)).toFixed(2);
}
This is my code, but the result is inconsistent with the histogram's StdDev data.Please help me, thanks.
... View more
Mar 07, 2018
05:07 AM
Thanks for your reply, it will help me, but r-bit's replay may be more concise.
... View more
Mar 07, 2018
05:00 AM
Thank you very much, your idea is very good!
... View more
Mar 06, 2018
03:20 PM
app.notifiersEnabled = true; app.notifiers.add("Mk ", new File("~/Documents/event.jsx"), "HdAl"); This is an event that I added, but it did not work when I started adding the hideAll mask.The eventFile is selected the brush tool ,There are many eventClass of this event,Is my choice of eventClass wrong?
... View more
Nov 01, 2017
10:56 AM
Yes,it can avoid this problem,thanks a lot
... View more
Nov 01, 2017
10:53 AM
Yes,i
... View more
Nov 01, 2017
03:48 AM
Thanks to your reply,i test it in CC2017 and it indeed is a bug.
... View more
Oct 31, 2017
10:47 PM
Firsts,the color range default setting is highlights model,like this picture: when run the code that function is select sampled colors,but the result is still highlights selection not the sampled colors selection
... View more
Oct 31, 2017
08:24 AM
When i used color range ,the default selected model is highlight,but i used color range with sampled colors model by scripts in next time ,it stil show the result that is highlight model.I dont konw why? please help ,thanks! cTID = function(s) { return app.charIDToTypeID(s); }; sTID = function(s) { return app.stringIDToTypeID(s); }; var desc1 = new ActionDescriptor(); desc1.putInteger(cTID('Fzns'), 80); var desc2 = new ActionDescriptor(); desc2.putDouble(cTID('Lmnc'), 48.58); desc2.putDouble(cTID('A '), -9.14); desc2.putDouble(cTID('B '), -45.14); desc1.putObject(cTID('Mnm '), cTID('LbCl'), desc2); var desc3 = new ActionDescriptor(); desc3.putDouble(cTID('Lmnc'), 60.86); desc3.putDouble(cTID('A '), -4.64); desc3.putDouble(cTID('B '), -40.1); desc1.putObject(cTID('Mxm '), cTID('LbCl'), desc3); desc1.putInteger(sTID("colorModel"), 0); executeAction(sTID('colorRange'), desc1, DialogModes.NO); I try to add"desc1.putEnumerated(cTID('Clrs'), cTID('Clrs'), sTID("sampledColors"));"before in"desc1.putInteger(sTID("colorModel"), 0);",but it has error
... View more
May 12, 2017
11:53 PM
Thanks for your answer,i runed this code in cc2017 and also used action manager code but it doesn't work when I combine it with other code into scripts.It just worked in a single code. 请使用手机"扫一扫"x
... View more
May 10, 2017
09:11 PM
I want to hidden the selecttion,but it didn't work when i add this code to my scripts. Make me confusing is it work in this single code. Please help me,thanks to much! runMenuItem( app.stringIDToTypeID("toggleShowExtras"));
... View more
Sep 04, 2016
08:42 PM
yes,it's right,i found it in scriptUI.The "onChange" callback after the position of the indicator is changed.But thank you all the same!
... View more
Aug 30, 2016
09:44 PM
Thank you for your reply.But i am confused is why the slider coundn't be drag and move ,when i add "app.refresh()" in "Slider.onChanging".
... View more
Aug 29, 2016
11:16 PM
When this script run,i cant preview the effect by dragging the slider,just click the slider can work. Thanks for helping me! var box = new Window('dialog', "blur"); box.panel = box.add('panel', undefined, "Gaussian Blur"); box.panel.group = box.panel.add('group', undefined ); box.panel.group.orientation='row'; box.panel.group.text1 = box.panel.group.add('statictext', undefined, "radius:"); var slider = box.panel.group.add("slider",undefined, 9, 0, 255); var value = box.panel.group.add('edittext', undefined, "9"); box.panel.group2 = box.panel.add('group', undefined ); box.panel.group2.orientation='row'; box.panel.group2.okBtn = box.panel.group2.add('button',undefined, "ok", {name:'ok'}); box.panel.group2.closeBtn = box.panel.group2.add('button',undefined, "cancel", {name:'cancel'}); slider.onChanging = function () { value.text = slider.value; var r = value.text; blur(r); app.refresh(); } value.onChanging = function () { slider.value = value.text; var r = slider.value; blur(r); app.refresh(); } box.panel.group2.okBtn.onClick = function(){ slider.onChanging(); box.close(); } box.panel.group2.closeBtn.onClick = function(){ box.close(); } box.center(); box.show() function blur(r){ var idGsnB = charIDToTypeID( "GsnB" ); var desc14 = new ActionDescriptor(); var idRds = charIDToTypeID( "Rds " ); var idPxl = charIDToTypeID( "#Pxl" ); desc14.putUnitDouble( idRds, idPxl, r ); executeAction( idGsnB, desc14, DialogModes.NO ); }
... View more