• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How does one make a Scriptui dialog or palette resizeable?

Engaged ,
Mar 03, 2020 Mar 03, 2020

Copy link to clipboard

Copied

I would like to make a Scriptui window user resizeable.  I've tried by adding ,{resizeable: true} into the new window line as well as trying dialog.resizeable = true;

 

See my attempts:

// DIALOG
// ======
var dialog = new Window("dialog"); // , {resizeable:true}
dialog.text = "TABS test";
dialog.orientation = "column";
dialog.alignChildren = ["center", "top"];
dialog.spacing = 0;
dialog.margins = 2;
dialog.resizeable = true;

// TPANEL1
// =======
var tpanel1 = dialog.add("tabbedpanel", undefined, undefined, { name: "tpanel1" });
tpanel1.alignChildren = "fill";
tpanel1.preferredSize.width = 240;
tpanel1.spacing = 10;
tpanel1.margins = 0;

// TAB1
// ====
var tab1 = tpanel1.add("tab", undefined, undefined, { name: "tab1" });
tab1.text = "Tab1";
tab1.orientation = "row";
tab1.alignChildren = ["left", "top"];
tab1.spacing = 0;
tab1.margins = 0;

var button1 = tab1.add("button", undefined, undefined, { name: "button1" });
button1.text = "Button1";

var button2 = tab1.add("button", undefined, undefined, { name: "button2" });
button2.text = "Button2";

// TAB2
// ====
var tab2 = tpanel1.add("tab", undefined, undefined, { name: "tab2" });
tab2.text = "Tab2";
tab2.orientation = "column";
tab2.alignChildren = ["left", "top"];
tab2.spacing = 0;
tab2.margins = 0;

var button3 = tab2.add("button", undefined, undefined, { name: "button3" });
button3.text = "Button3";

var button4 = tab2.add("button", undefined, undefined, { name: "button4" });
button4.text = "Button4";

// TPANEL1
// =======
tpanel1.selection = tab1;

dialog.show();

 

I don't see the little dotted triangle at the lower right corner as one does in windows 10.

 

RONC 

TOPICS
Actions and scripting , SDK

Views

5.6K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

People's Champ , Mar 03, 2020 Mar 03, 2020
// DIALOG
// ======
var dialog = new Window("dialog", "", undefined, {resizeable: true} );
dialog.text = "TABS test";
dialog.orientation = "column";
//dialog.alignChildren = ["fill", "top"];
dialog.alignChildren = ["fill", "fill"];
dialog.spacing = 0;
dialog.margins = 2;

// TPANEL1
// =======
var tpanel1 = dialog.add("tabbedpanel", undefined, undefined, { name: "tpanel1" });
tpanel1.alignChildren = "fill";
tpanel1.preferredSize.width = 240;
tpanel1.spacing = 10;
tpanel1.margins = 0;

// TAB1
//
...

Votes

Translate

Translate
Adobe
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

r-bin,

 

I don't know what I don't understand.  That's the problem I have and asking dumb questions is how I find what I don't understand.

 

I just realized that the file format stuff is handled by the image or iconbutton calls in scriptui and I shouldn't be concerned in the image to text script.   I am testing my script with your String.fromCharCode lines and will put out for others.

 

I really appreciate your patience as I'm not a programmer but just someone trying to make things easier for some users.

 

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

You found something like 'editnumber' that belongs to scriptui?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

>>>You found something like 'editnumber' that belongs to scriptui?

 

Yes, this is a new kind of "edittext"

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Yes, that's something new. In ESTK (that remembers first CC release) it doesn't work too, but in CC 2019 it already does. Last question, how and where you found it since I never heard of it?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

K,

Who is this post for?

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

K,

 

Is editnumber available for us users?  How's it differ from edittext?

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

what?

look at ContactSheetII.jsx or Image Processor.jsx

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

r-bin,

Thanks.  Just found "editnumber" in Image Processor.

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 07, 2020 Mar 07, 2020

Copy link to clipboard

Copied

LATEST

I tried to find where's something mentioned about EditNumber and found scriptis.xml at end of 'C:\Program Files (x86)\Common Files\Adobe\Scripting Dictionaries CC\CommonFiles' is not updated of yet.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Maybe metadata affected how file is read.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

editnumber reflection properties:

(I stuck it in a tabbed palette just for this)

this property value is 1
this property minvalue is 1
this property maxvalue is 12
this property textselection is
this property characters is undefined
this property justify is left
this property text is 1
this property graphics is [object ScriptUIGraphics]
this property visible is true
this property bounds is 15,300,45,321
this property location is 15,300
this property maximumSize is 15360,8320
this property minimumSize is 30,21
this property preferredSize is 30,21
this property size is 30,21
this property windowBounds is 435,438,465,459
this property active is false
this property shortcutKey is undefined
this property alignment is undefined
this property children is
this property properties is undefined
this property enabled is true
this property helpTip is
this property indent is undefined
this property layoutDirection is null
this property parent is [object Panel]
this property textDirection is null
this property window is [object Window]
this property type is editnumber
this property __proto__ is [object Object]

 

------------------------

 

DNGPanel.ed_1 = DNGPanel.add('editnumber', undefined, undefined, 1, 12);

var props = DNGPanel.ed_1.reflect.properties;
for (var i = 0; i < props.length; i++) {
$.writeln('this property ' + props[i].name + ' is ' + DNGPanel.ed_1[props[i].name]);
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

methods:

 

show is
function show() {
[native code]
}

hide is
function hide() {
[native code]
}

notify is
function notify() {
[native code]
}

toSource is
function toSource() {
[native code]
}

addEventListener is
function addEventListener() {
[native code]
}

removeEventListener is
function removeEventListener() {
[native code]
}

dispatchEvent is
function dispatchEvent() {
[native code]
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

call arguments and creating props

d.b2  = add('editnumber', undefined, 1.1234567890123456, -100, 100, {numberFormat:"integer"});

d.b2  = add('editnumber', undefined, 1.1234567890123456, min_value, max_value, {decimalDigits:8});

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

a.ed = add('editnumber', bounds, value, min_value, max_value);

this control can also contain a string

a.ed.text = 'test';

 

I've always used an editext control but I guess this has a bit of built-in input validation.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

try to type in control

2*(5+10)+4^2

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Guys,

 

I have a problem with "editnumber" in that ESTK says 'editnumber' is unknown or invalid in context.  This is the statement  d.b2 = add('editnumber', undefined, 1.1234567890123456, -100, 100, {numberFormat:"integer"});  that I borrowed and placed in the tab example.

 

My ESTK version is 4.0.0.1  scriptui 6.2.2  and extendscript 4.5.5.    Are there later releases?

 

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

Read my post that's 13 posts over yours. There you'll find the answer 😉

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

The third constructor property is initial value. You can't have an integer with decimal places.

d.b2 = add('editnumber', undefined, 0, -100, 100, {numberFormat:"integer"});

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

In Photoshop I get 46!!!   Toolkit I can't make it run.

 

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

I get 46 but only after clicking on the button b1 above it.  Interesting behavior. 

RONC 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 05, 2020 Mar 05, 2020

Copy link to clipboard

Copied

You can do something easier:

 

EditNumber.reflect.properties

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 06, 2020 Mar 06, 2020

Copy link to clipboard

Copied

My CALC script does this with "edittext" and the = sign key on the calculator .   I use eval to solve the equation resident in the editext.text field.  First had it working a long time ago in html + js version.

 

RONC

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines