Run a Particular Function as per Radio Button Selection
Hello Guys.
Thank you in advance for your help.
I have a code in which I created a Dialogue Box from which user needs to select the option.
As per the selected Radio Button/CheckBox I want to run particular function.
main();
function main()
{
preCheck();
myDialogueMenu();
objectType1();
objectType2();
}
function myDialogueMenu()
{
// Activating the user Interaction with the Application
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
var myDoc = app.activeDocument;
//User Interaction Adding Main Dialog Box
var myDialog = app.dialogs.add({name:"Choose your options", canCancel:true});
with(myDialog)
{
with(dialogColumns.add())
{
with(borderPanels.add())
{
staticTexts.add({staticLabel:"Object Type:"});
var myObjectTypeButtons = radiobuttonGroups.add();
with(myObjectTypeButtons)
{
radiobuttonControls.add({staticLabel:"Without Bleed", checkedState:true});
radiobuttonControls.add({staticLabel:"With Bleed"});
}
}
with(borderPanels.add())
{
with (dialogColumns.add())
{
with (dialogRows.add())
{
with (dialogColumns.add())
{
staticTexts.add({staticLabel:"Bleed Offset :", minWidth:0});
}
with (dialogColumns.add())
{
var myOffset = measurementEditboxes.add({editValue:0.125});
}
}
}
}
}
}
var myReturn = myDialog.show();
}
Kindly guide me.
