Access to own ID

Moderator: Moderator Group

Access to own ID

Postby Chris Bowman » Wed Feb 12, 2014 2:33 pm

Hi,

I have multiple CustomScriptButtons in toggle mode. I want to change their colour when they are pressed Red/Green. They are doing more than this but for the purposes of this question, that's all I need!

Currently for Button ID 1 I use...

Code: Select all
<On Click Script>
WDCustomScriptTint,1,255,0,0

<On Release Script>
WDCustomScriptTint,1,0,255,0

I then change the ID value for each of the other buttons. Is there anyway to code this using the ID of the button calling the script i.e....

Code: Select all
<On Click Script>
WDCustomScriptTint,OWN ID,255,0,0

Or better still could the ID be passed through to a macro, either by storing it in a variable or more directly?

Any suggestions gratefully received.

Chris
User avatar
Chris Bowman
 
Posts: 27
Joined: Thu Jan 07, 2010 12:01 pm

Re: Access to own ID

Postby Dennis Kuypers » Wed Feb 12, 2014 4:05 pm

Hi Chris,

Your question is partially answered in another topic: Assigning values to items (faders, buttons...) via script

To set the tint to green for the current CustomScript:
Code: Select all
WDCustomScriptTint,MyId,0,255,0


Note: The "MyID" was introduced in revision 516

Best regards
Dennis
Dennis Kuypers
(former Product Developer, Software)
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: Access to own ID

Postby Chris Bowman » Wed Feb 12, 2014 5:39 pm

Hi Dennis,

Thanks for your response. Currently you can only download revision 489 from your website. Or am I missing something?

Thanks,

Chris
User avatar
Chris Bowman
 
Posts: 27
Joined: Thu Jan 07, 2010 12:01 pm

Re: Access to own ID

Postby Dennis Kuypers » Thu Feb 13, 2014 11:40 am

Hi Chris,

yes you are right, thats why I put it in red. The new release candidate has been made publicly available today, so you can try it out!

Best regards
Dennis
Dennis Kuypers
(former Product Developer, Software)
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 11 guests

cron