Macroscript checkbutton state on toolbar

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  06 June 2012
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 "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"
close record_file

if record_file == undefined then
messagebox "keine Zeit Erfassung Datei!"
rollout ZE_Rollout "dd"
button ZE_Start "E"

on ZE_Start pressed do
( "EGB Scripts" "ZeitErfassung"
Global isOpen = false
--on isChecked return isOpen
Ze_Fenster = newRolloutFloater "Scripts" 180 150
addRollout ZE_Rollout Ze_Fenster
callbacks.removeScripts id:#ZE
callbacks.addscript #filePostOpen "ZE_checken()" id:#ZE
  06 June 2012
Check out the updateToolbarButtons() function which can be used to update the states of all MacroScripts currently on toolbars.

Also see
  06 June 2012
Thanks Bobo, it works fine!
  06 June 2012
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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed 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
Society of Digital Artists

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

All times are GMT. The time now is 10:13 PM.

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