Answered
Ctrl,Alt onClick Button in script
I want to use Alt Click for 1 button but using onAltClick.function() is not working
Can anyone help me, thanks a lot !
I want to use Alt Click for 1 button but using onAltClick.function() is not working
Can anyone help me, thanks a lot !
Play around with this:
var myDlg = new Window("dialog");
var button = myDlg.add("button", undefined, "TEST");
button.onClick = function() {
if ( ScriptUI.environment.keyboardState.altKey ) {
alert("Alt + button click");
}else if ( ScriptUI.environment.keyboardState.ctrlKey ) {
alert("Ctrl + button click");
}else{
alert("button click");
}
}
myDlg.show();Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.