ZBrushCentral

Lightbox/Macro scripting problem.

Apologies if my question has already been explained. If it has, please direct me to the post. I did try searching for an answer but couldn’t find one.

Like many other folks here, I’ve been using that script which prevents Lightbox from opening at startup for a long time now, and despite the fact that it only works about 50% of the time, it’s still better than nothing. Hopefully the option for this old bug will be fixed in Z4R2B.

What I’m attempting to do is add a macro to this startup script. For some reason I cannot get them to work together.

//startup
[If,1,
    [IPress,Macro:Macros:Misc:StartupMacro]

[IPress,Preferences:Lightbox:Lightbox]

]
[pd]
//startup

[If,1,
    [IPress,Macro:Macros:Misc:StartupMacro]
]
[pd]

The script I created from both of those doesn’t give me any error messages, and the macro part of it works perfectly fine, just not the Lightbox part of it which now opens 100% of the time instead of staying closed. Hopefully someone who is better at script writing than me can figure this conundrum out. Thanks!

If you include the Lightbox code line in your startup macro you’ll be fine. Or alternatively put the line above the line that launches the startup macro in the defaultzscript. Only one zscript/macro can run at a time, so once the startup macro runs the action is not returned to the defaultzscript, so the lightbox line never runs.


//startup
[If,1,
    [IPress,Preferences:Lightbox:Lightbox]

    [IPress,Macro:Macros:Misc:StartupMacro]

]
[pd]

Wow that was a simple fix. Lightbox is back to opening only 50% of the time. Thanks! :cool: