Create flexible WDCustomScript buttons

Moderator: Moderator Group

Create flexible WDCustomScript buttons

Postby hpgec » Tue Jul 12, 2016 10:55 am

Hi,

I am currently working with Widget Designer to create a new interface - let's call it project overview. And I'd like to have different buttons, that load different projects on click. This doesn't seem like a big problem yet.

But:
The projects are supposed to change every view months. So I would like to create another interface to add new projects to projects overview. Therefor I would like to have like a form, where the supposed button name can be inserted, as well as the project path. By submitting this, a new button should be automatically added to the project overview, with the delivered values.
So I want to program one button to create other buttons.
Is that possible in any way?


Thank you for any help!!
hpgec
 
Posts: 1
Joined: Mon Jul 04, 2016 3:46 pm

Re: Create flexible WDCustomScript buttons

Postby Janina Baltaziewicz » Tue Jul 26, 2016 8:46 am

Hi there,


unfortunately, there is no command like "CreateCustomScript", the only possibility of achieving a (at least visually) similar behaviour would be creating some buttons beforehand and hide/unhide those.
How to use that depends a bit on your setup, but this seems to be the only way at the moment.
The values can be delivered via variables.


Best regards,

Janina
Janina Baltaziewicz
Customer Service Engineer
User avatar
Janina Baltaziewicz
 
Posts: 53
Joined: Tue Jun 14, 2016 2:08 pm

Re: Create flexible WDCustomScript buttons

Postby malkuth23 » Wed Jul 27, 2016 5:48 am

Oddly enough, there actually is a way to make a Custom Script button. It is just undocumented and hidden from search for some reason :)

"WDControlCreate,Type,X,Y"
Type = "Label","CustomScript","Fader","Image","Dropdown","Wheel","Encoder"

Still would not solve your problem though... Because I don't think you can modify the script inside a button.
Maybe you could do some sort of god-awful node based variable hodge podge from hell involving the CSbutton ID number, but I would just tell everyone it is impossible because it will be pure suffering.

When I have had to do something like this in the past, I got inspired from old video games... You get X number of save slots. You can save in any of these, but that is your limit. If you want to save over an old one feel free, but you can't have any more than X. It is still a lot of programming.

Also keep in mind that when you run a command to save your widget, all subsequent and current running scripts are CANCELLED. It is actually a good way to cancel a script loop or long Wdwait commands, but you have to make sure saving is your final command in a chain.
Matthew Newman-Saul
Theatrical Concepts
mattns@theatrical.com
User avatar
malkuth23
 
Posts: 354
Joined: Tue Apr 20, 2010 7:14 pm
Location: New Orleans, LA

Re: Create flexible WDCustomScript buttons

Postby Janina Baltaziewicz » Wed Jul 27, 2016 12:51 pm

Hmmm... that seems to be one of the things that got removed because of some reason (probably because that command was responsible for other problems), but stays usable. We normally implement that for imports from older revisions, so that they keep on working.

I can't guarantee though that those "hidden" commands will still exist at the next Widget Designer version.
Janina Baltaziewicz
Customer Service Engineer
User avatar
Janina Baltaziewicz
 
Posts: 53
Joined: Tue Jun 14, 2016 2:08 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 25 guests