NateLiquidGravity
Alibre Super User
Hello can anyone give me an example of a WizoScript options dialog allowing selection from a list? I see SetStringList in the reference docs but I don't understand how to use it.
Yes, Andy Ayre is the creator (wizard) behind WizoScript. Go Andy!!!"ajayre" in the forum is the WizoScript wizard.
++++++1Yes, Andy Ayre is the creator (wizard) behind WizoScript. Go Andy!!!
# called when an input changes in the dialog window
def InputChanged(Index, Value):
# size changed
if Index == 0:
Size = DiameterNames[Value]
print Size
# called when user confirms selections
def SelectionMade(Values):
# get values
Size = DiameterNames[Values[0]]
print Size
# get access to windows functionality
Win = Windows()
# default diameter to show
DefaultDiameter = 'M6'
# list of diameters to choose from
DiameterNames = ['M6', 'M8', 'M10', 'M12']
# create dialog window
Options = []
Options.append(['Size', WindowsInputTypes.StringList, DiameterNames, DefaultDiameter])
# show dialog window to user
DialogWidth = 400
Win.UtilityDialog('Test', 'Apply', SelectionMade, InputChanged, Options, DialogWidth)
Thanks Andy, That is very close to how I did it.
Edit: I don't think your imports are used.