Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Activate Sheet Worker Script On Button Press

Hello, I apologize if this has been asked before. Is there a way to activate a sheet worker script on a button press without changing an attribute. Or is there a convenient work around for this. I was thinking something like: on("change:roll_name", function () {...... this hasn't worked for me so far.
1487438679
Kryx
Pro
Sheet Author
API Scripter
I use pseudo buttons that act like checkboxes and look like buttons. When the value changes (when it is clicked) I then run sheetworkers. Treat it like a checkbox and it'll work.
Ahh, because toggle-like checkbox buttons have a value... thank you Kryx! I have seen you helping a hand all over the forums and have learned a lot from you already! 
1487439445
Kryx
Pro
Sheet Author
API Scripter
The value doesn't even matter, you can just trigger it when the value changes which happens any time the checkbox is clicked. Enjoy! :)