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
// 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
//
...
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
Copy link to clipboard
Copied
You found something like 'editnumber' that belongs to scriptui?
Copy link to clipboard
Copied
>>>You found something like 'editnumber' that belongs to scriptui?
Yes, this is a new kind of "edittext"
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?
Copy link to clipboard
Copied
K,
Who is this post for?
RONC
Copy link to clipboard
Copied
Copy link to clipboard
Copied
K,
Is editnumber available for us users? How's it differ from edittext?
RONC
Copy link to clipboard
Copied
what?
look at ContactSheetII.jsx or Image Processor.jsx
Copy link to clipboard
Copied
r-bin,
Thanks. Just found "editnumber" in Image Processor.
RONC
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Maybe metadata affected how file is read.
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]);
}
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]
}
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});
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.
Copy link to clipboard
Copied
try to type in control
2*(5+10)+4^2
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
Copy link to clipboard
Copied
Read my post that's 13 posts over yours. There you'll find the answer 😉
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"});
Copy link to clipboard
Copied
In Photoshop I get 46!!! Toolkit I can't make it run.
RONC
Copy link to clipboard
Copied
I get 46 but only after clicking on the button b1 above it. Interesting behavior.
RONC
Copy link to clipboard
Copied
You can do something easier:
EditNumber.reflect.properties
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