ZBrushCentral

How to skip pop like in other scripts?

http://www.zbrushcentral.com/showthread.php?94752-Useful-small-ZScripts-and-Macros-for-ZBrush-4-amp-4R3

The Lasso script in this thread switches to lasso for select and mask but no pop comes up witch is great
cant figure out how to achieve this with the script im trying to make

[ISubPalette,ZPlugin:Helpers,0,0,0,0]
[IConfig,4.31]
[IShowActions, 0]

[VarDef,startupState,0]

[RoutineDef,Startup,
[If,[IExists,“ZPlugin:Helpers:Lasso”],
[VarSet,winID,[IGet,Preferences:Utilities:View Window Id]]
[If,[IGet, Brush:Auto Masking:Topological]==1,
[VarSet,startupState,0]
,
[VarSet,startupState,1]
]
]
]

[RoutineCall,Startup]

[ISwitch, “ZPlugin:Helpers:Lasso” ,
startupState,
“Topo Mask”,
[IKeyPress,CTRL,[IPress,Brush:MaskLasso]]
[IKeyPress,SHIFT+CTRL,[IPress,Brush:SelectLasso]],
[IKeyPress,SHIFT+CTRL,[IPress,Brush:SelectRect]]
[IKeyPress,CTRL,[IPress,Brush:MaskPen]],
0,
.5]

[IEnable,“ZPlugin:Helpers:Lasso”]

I got mine close to his but not sure how to skip the pop up, I want to make a few toggle scripts like this one to help me work faster

You can add a simulated press of “Enter”, using the ASCII value 13, to the [IKeyPress] which will stop the pop-up showing. (This method will only work when pressing enter on the keyboard produces the result you want.)

Here’s the code for the Lasso plugin. (The code also shows how to store the state of the switch in a memory block, and checking the window ID of the switch pressed. Although there’s only one switch, it would be easy to extend the method to more switches.)