CGTalk > Software > Autodesk 3ds max > 3dsMax SDK and MaxScript
Login register
reply share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-14-2014, 09:30 PM   #1
kredka
PRO
portfolio
PIOTR LANCUCKI
Gdansk, Poland
 
Join Date: Aug 2009
Posts: 197
how to press dot.net button?

I have to give command in code that given button should be pressed.
In maxscript it`s: button_name.pressed() and how can I do this same in case of dotnet button.
Action for my button is:

on ckb56_efects mouseDown senderArg arg do
(
action.....
)
Can anybody have a any clue with this?
 
Old 04-14-2014, 10:46 PM   #2
miauu
Expert
 
miauu's Avatar
portfolio
Kostadin Kotev
Blagoevgrad, Bulgaria
 
Join Date: Sep 2009
Posts: 850
Put the "action" code to a function. Then you can use:
Code:
on ckb56_efects mouseDown senderArg arg do ( call the function )


and anywhere in your script you can call the same function, which is the same as pressing the button.
 
Old 04-15-2014, 06:47 AM   #3
kredka
PRO
portfolio
PIOTR LANCUCKI
Gdansk, Poland
 
Join Date: Aug 2009
Posts: 197
but i have 100 buttons and tons of code,is there any different way?
 
Old 04-15-2014, 08:18 PM   #4
denisT
MAX Doctor
 
denisT's Avatar
portfolio
Denis Trofimov
CA, USA
 
Join Date: Jul 2009
Posts: 9,865
Send a message via ICQ to denisT
Quote:
Originally Posted by kredka
but i have 100 buttons and tons of code,is there any different way?

you can do it on the fly but only for dotnet button objects (not controls)
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:05 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.