Copy link to clipboard
Copied
Hi there,
I wrote a JSX script to generate grid shapes for me automatically, and then used Configurator 4 to create a panel that triggers the script.
This would be a lot more useful if I could have text fields so users can specify how many grid rows, columns, etc., but I don't see any method of doing that in Configurator.
Is there a way to pass user input on a panel into a script?
I'm using CS6.
Eshan
Hi eshan.mathur,
I'd say it's not possible, but I'm not a big Configurator 4 expert.
If you need a simple GUI on CS6, I'd suggest using a Scripted Dialog. It's not that hard if you don't need fancy stuff, see this snippet:
...var yourFunction = function(first, second, third) {
// Do whatever you need here
alert("Params\nFirst: " + first + "\nSecond: " + second + "\nThird: " + third);
}
var res = "dialog { \
margins: 15, spacing: 20, \
preferredSize: [200,100], \
orientation: 'col
Copy link to clipboard
Copied
Hi eshan.mathur,
I'd say it's not possible, but I'm not a big Configurator 4 expert.
If you need a simple GUI on CS6, I'd suggest using a Scripted Dialog. It's not that hard if you don't need fancy stuff, see this snippet:
var yourFunction = function(first, second, third) {
// Do whatever you need here
alert("Params\nFirst: " + first + "\nSecond: " + second + "\nThird: " + third);
}
var res = "dialog { \
margins: 15, spacing: 20, \
preferredSize: [200,100], \
orientation: 'column', \
text: 'Demo Scripted Dialog', \
alignChildren: ['right', 'top'], \
\
firstParam: Group { \
sText: StaticText { text: 'First Parameter:' }, \
eText: EditText { \
characters: 4, \
text: '10' \
} \
}, \
secondParam: Group { \
sText: StaticText { text: 'Second Parameter:' }, \
eText: EditText { \
characters: 4, \
text: '20' \
} \
}, \
thirdParam: Group { \
sText: StaticText { text: 'Third Parameter:' }, \
eText: EditText { \
characters: 4, \
text: '30' \
} \
}, \
buttonsGroup: Group { \
cancelButton: Button {text: 'Cancel'}, \
okButton: Button { text: 'OK' } \
} \
}"
var w = new Window(res);
var retVal = w.show();
if (retVal == 1) { // User clicked OK
var firstParam = w.firstParam.eText.text,
secondParam = w.secondParam.eText.text,
thirdParam = w.thirdParam.eText.text;
yourFunction(firstParam, secondParam, thirdParam);
}
Hope this helps,
Davide Barranca
---
www.davidebarranca.com
www.cs-extensions.com
Copy link to clipboard
Copied
I think that'll be fine for what I'm trying to do. Thanks.
Out of curiosity, if I did want it to be a panel, how would I go about doing this? Would I have to use the actual SDK?
Copy link to clipboard
Copied
Hi,
If you need an actual panel on CS6 you're right, I'm afraid you have to use the CS SDK (that is, Flash panels) and Extension Builder 2.
Mind you, from CC onwards Flash panels are deprecated in favour of HTML panels (CC supports both, CC2014 and following HTML only).
If you want info about HTML Panels see the official Adobe-CEP/CEP-Resources · GitHub down in the Miscellaneous section, there you'll find tutorials and documentation.
If one of the replies answers to your question, please mark it as "Correct answer", so the thread gets green - we all love green threads in the forum
Regards,
Davide Barranca
---
www.davidebarranca.com
www.cs-extensions.com
Copy link to clipboard
Copied
Got it. Thanks for the info. Answer marked.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now