Answered
Javascript to have yes or no window
Can anyone help me with creating a yes or no popup window in photoshop cc when we run the javascript and based on yes or no function 1 or function 2 execute accordingly.
Can anyone help me with creating a yes or no popup window in photoshop cc when we run the javascript and based on yes or no function 1 or function 2 execute accordingly.
Hi,
Try following simple script
#target photoshop
function showDialog() {
var dlg = new Window("dialog", "Sample Dialog");
var buttonGroup = dlg.add('group', undefined, '');
// buttonGroup.alignment = 'right';
var yesButton = buttonGroup.add('button', undefined, 'Yes', {
name: 'Yes'
});
yesButton.onClick = function () {
alert('You click yes button.')
};
var closeButton = buttonGroup.add('button', undefined, 'No', {
name: 'No'
});
closeButton.onClick = function () {
alert('You click No');
dlg.close();
};
dlg.show();
}
showDialog();
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.