Skip to main content
silk-m
Community Expert
Community Expert
November 24, 2019
Answered

マルチチャンネルモードでチャンネル全てを選択するスクリプト

  • November 24, 2019
  • 1 reply
  • 535 views

こんにちは

スクリプトは初心者です。マルチチャンネルモードでチャンネル全てを選択するスクリプトがありますか?

チャンネル名は決まったものではありません。最大20チャンネル位になる場合もあります。

 

これを

こうしたいです。

 

This topic has been closed for replies.
Correct answer Kukurykus

It works when like in your example there are no default Color Mode Channels (so like for ex. RGB):

 

sTT = stringIDToTypeID; for(i = 0; i < (cnl = activeDocument.channels).length;) {
	(ref = new ActionReference()).putName(sTT('channel'), cnl[i++].name);
	(dsc = new ActionDescriptor()).putReference(sTT('null'), ref)
	dsc.putBoolean(sTT('extend'), true), executeAction(sTT('select'), dsc)
}

1 reply

Kukurykus
KukurykusCorrect answer
Legend
November 24, 2019

It works when like in your example there are no default Color Mode Channels (so like for ex. RGB):

 

sTT = stringIDToTypeID; for(i = 0; i < (cnl = activeDocument.channels).length;) {
	(ref = new ActionReference()).putName(sTT('channel'), cnl[i++].name);
	(dsc = new ActionDescriptor()).putReference(sTT('null'), ref)
	dsc.putBoolean(sTT('extend'), true), executeAction(sTT('select'), dsc)
}
silk-m
Community Expert
silk-mCommunity ExpertAuthor
Community Expert
November 24, 2019

Hi, Kukurykus
Your script worked perfectly.
Thank you.

 

Best regards,

 

--Susumu Iwasaki
Kukurykus
Legend
November 24, 2019

I saw you liked me as i_was5, but then changed to current account and reliked me 😉