Same line of Script in 1024 CustomScript Buttons

Moderator: Moderator Group

Same line of Script in 1024 CustomScript Buttons

Postby chrisr » Wed Feb 10, 2016 6:21 pm

Good Afternoon All,
I have a line of script: CurrentButton = MyId. I'd like to take this, and place it into the Mouse Enter Script Box in every CustomScript Button (1024 of them). Is there a way to automate this process? Or am I relegated to opening each CS button and pasting the script in each Mouse Enter Script box ?

Thank you for any insight you might have.
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Same line of Script in 1024 CustomScript Buttons

Postby Thomas Mrozek » Thu Feb 11, 2016 9:47 am

Hi Chris,
unfortunately there is actually no other workaround for that but copy and paste...
cheers
Thomas
Thomas Mrozek
Technical Support Engineer
User avatar
Thomas Mrozek
 
Posts: 114
Joined: Mon Apr 20, 2009 11:08 am

Re: Same line of Script in 1024 CustomScript Buttons

Postby chrisr » Thu Feb 11, 2016 2:57 pm

Thanks! So maybe a way around this. I am using the CurrentButton = MyId to fill a variable. Do you know a way to grab a mouse over "MyId" without having to place a script into the button itself? So it could run globally instead of for each individual CS button?

Best,
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Same line of Script in 1024 CustomScript Buttons

Postby florian » Fri Feb 12, 2016 1:06 am

You can also edit the WDP file in a text editor. With some crafty grep, sed and awk, you could find a way to look for the end of each button line and insert a new line with your argument.
-flo

"Wise men learn more from fools than fools from the wise."

Cato the Elder, Plutarch's Life of Cato
User avatar
florian
 
Posts: 162
Joined: Fri Jul 25, 2008 3:49 pm
Location: Los Angeles, CA

Re: Same line of Script in 1024 CustomScript Buttons

Postby Dennis Kuypers » Sat Feb 13, 2016 12:32 pm

Hey,

When copy pasting buttons they keep the script. Create one button with the script, then copy paste.

Dennis
Dennis Kuypers
Product Developer, Software

Online Manual
User avatar
Dennis Kuypers
coolux Germany
 
Posts: 771
Joined: Thu Jul 05, 2012 12:18 pm

Re: Same line of Script in 1024 CustomScript Buttons

Postby chrisr » Mon Feb 15, 2016 6:00 pm

AH Great! I didn't think to try that. I like the copy / Paste idea!

Thanks!
Thank You

ChrisR
SurfacePro3 - 2GHz i5 - 4GB ram - Windows 10 Pro - WD Pro 4.7 Rev2500 and WD v6
Sager Laptop - Intel 2.4GHz i7 3630QM - 16GB ram - Windows 7 Pro Svc Pack1 - Offline Manager v6
chrisr
 
Posts: 143
Joined: Tue Jan 26, 2016 10:50 pm

Re: Same line of Script in 1024 CustomScript Buttons

Postby JustynR » Tue Feb 16, 2016 7:26 pm

You can put variables in the buttons and macro links so you can modify them in the future...

Take the MyID variable and use it to your advantage!
Something like:
Code: Select all
Button_Exec = MyID
WDMacro,Router_Switch


Then your "Router_Switch" Macro can call up the "Button_Exec" variable and do something unique with that number, but have the same global command for all buttons.
Justyn Roy
Field Application Specialist
Christie Digital
Toronto Ontario Canada
JustynR
 
Posts: 555
Joined: Wed Mar 25, 2009 1:33 am
Location: Toronto, Canada


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 1 guest