Search found 2 matches

by MuffinDude
November 2nd, 2017, 1:21 pm
Forum: Scripts Discussion
Topic: Adding onclick function to a generated button
Replies: 2
Views: 7992

Re: Adding onclick function to a generated button

Thank you so much for your response. Works like a charm!
by MuffinDude
October 26th, 2017, 1:22 pm
Forum: Scripts Discussion
Topic: Adding onclick function to a generated button
Replies: 2
Views: 7992

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 ...