Copy link to clipboard
Copied
function myScript(thisObj) {
function myScript_buildUI(thisObj) {
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette", "Dockable Elements", undefined, { resizeable: true });
var res = "group{orientation:'row',\
buttonGroup: Group{orientation:'row',\
buttonOne: Button{text:'Wiggle'},\
buttonTwo: Button{text:'Random'},\
buttonThree: Button{text:'ReRe'},\
},\
}";
myPanel.grp = myPanel.add(res);
// Function to handle the 'Wiggle' button click
function onWiggleButtonClick() {
}
// Function to handle the 'Random' button click
function onRandomButtonClick() {
}
function onReReButtonClick() {
}
// Add onclick functions to the buttons
myPanel.grp.buttonGroup.buttonOne.onClick = onWiggleButtonClick;
myPanel.grp.buttonGroup.buttonTwo.onClick = onRandomButtonClick;
myPanel.grp.buttonGroup.buttonThree.onClick = onReReButtonClick;
myPanel.layout.layout(true);
return myPanel;
}
var myScriptPal = myScript_buildUI(thisObj);
if (myScriptPal != null && myScriptPal instanceof Window) {
myScriptPal.center();
myScriptPal.show();
}
}
myScript(this);I got this from Chat GPT because i don't know much about scripting, I want the buttons to resize horizontally only
Have something to add?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more