|06 June 2012||#1|
Join Date: Dec 2006
Macroscript checkbutton state on toolbar
I've a problem with an script I'm writing.
I've made an macroscript "myExample" that works fine. There is a checkbutton on the toolbar and as long as the script is running the button is checked. The script stops when I uncheck the button. Thats working fine.
Now, I've made another script (startup) that checks some things in the max file and if it is needed it should run the macroscript "myExample". That´s working fine too,but...
...when I run the macro with this command -macros.run "EGB Scripts" "myExample"- the macro starts but the checkbutton on the toolbar stays unchecked.
If the button were in a rollout it would have a name I could call. But my checkbutton hasn't any...
Is there a way to control the state of this checkbutton?
here the startup script:
function ZE_checken =
file = maxFileName
file_Name = getFilenameFile file
ZE_theFileName = maxFilePath + (file_Name + "_ZE.txt")
record_file = openFile ZE_theFileName mode:"r"
if record_file == undefined then
messagebox "keine Zeit Erfassung Datei!"
rollout ZE_Rollout "dd"
button ZE_Start "E"
on ZE_Start pressed do
macros.run "EGB Scripts" "ZeitErfassung"
Global isOpen = false
--on isChecked return isOpen
Ze_Fenster = newRolloutFloater "Scripts" 180 150
addRollout ZE_Rollout Ze_Fenster
callbacks.addscript #filePostOpen "ZE_checken()" id:#ZE
|06 June 2012||#2|
Join Date: Mar 2002
Check out the updateToolbarButtons() function which can be used to update the states of all MacroScripts currently on toolbars.
Also see http://docs.autodesk.com/3DSMAX/14/...488E85F-252.htm
|06 June 2012||#4|
Join Date: Sep 2003
Thread automatically closed
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
|Thread Closed share thread|