ScriptSpot

Forum topic · General Scripting

dropdownlist control how to change variables

By Any · 2015-12-13

Description

Good day.

I want to change variables, use dropdownlist control

_______________________________________________________________

a=undefined
b=undefined

rollout ddl_test "Drop-Down List"

(

dropdownlist scale_dd "Scale" items:#("1/2", "1/4", "1/8", "1/16")

on scale_dd selected i do(
case of(
(i=1): (a=5
b=3)
(i=2): (a=1
b=7)
(i=3): (a=0
b=4)
(i=4): (a=9
b=23)
)

)

)

createDialog ddl_test
__________________________________________________________________

Where I make error ???

Comments (2)

Any · 2015-12-13

Thank you for attention....

barigazy · 2015-12-13

Try this

rollout ddl_test "Drop-Down List"
(
local a, b
dropdownlist scale_dd "Scale" items:#("1/2", "1/4", "1/8", "1/16")
on scale_dd selected i do
(
case i of
(
1: (a=5 ; b=3)
2: (a=1 ; b=7)
3: (a=0 ; b=4)
4: (a=9 ; b=23)
)
format "a = % ; b = %\n" a b
)
)
createDialog ddl_test