Search found 2 matches
- November 2nd, 2017, 1:21 pm
- Forum: Scripts Discussion
- Topic: Adding onclick function to a generated button
- Replies: 2
- Views: 13768
Re: Adding onclick function to a generated button
Thank you so much for your response. Works like a charm!
- October 26th, 2017, 1:22 pm
- Forum: Scripts Discussion
- Topic: Adding onclick function to a generated button
- Replies: 2
- Views: 13768
Adding onclick function to a generated button
Hello, I'm having problems adding functions to newly generated buttons for(i = 0; i < files.length; i++){ var buttonX = mainWindow.add("button", undefined, presets[i]); buttonX.onClick = function(){ mainLayer.applyPreset(presets[i]); } }; It's looping through all the presets in the ...