Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on init
- set_ui_height(8)
- declare const $PARAM := $ENGINE_PAR_DL_TIME { numerical value of engine parameter }
- declare const $GROUP := -1 { -1 if using IFX or SFX, otherwise group index (0-based) }
- declare const $SLOT := 0 { Slot 1: 0 ... Slot 8: 7 }
- declare const $FX := 1 { Group: -1, Insert: 1, Send: 0 }
- declare ui_label $t (2,16)
- declare ui_button $Run
- declare ui_label $i (3,1)
- declare ui_value_edit $Low (0,1000000,1)
- declare ui_value_edit $High (0,1000000,1)
- declare ui_menu $Speed
- add_menu_item($Speed,"Slow (1000000 in 16 m 40 s) *",1000)
- add_menu_item($Speed,"Medium (1000000 in 1 m 40 s) **",100)
- add_menu_item($Speed,"Fast (1000000 in 23 s) ***",10)
- declare $count
- declare $g
- declare %VALUES[2001]
- move_control($i,3,2)
- move_control($Low,6,1)
- move_control($High,6,2)
- move_control_px($Speed,342,2)
- set_control_par(get_ui_id($Speed),$CONTROL_PAR_WIDTH,179)
- set_text($i,"")
- set_text($t,"Displayed Value -> Engine Value")
- add_text_line($t,"-------------------------------")
- make_persistent($Low)
- make_persistent($High)
- make_persistent($Speed)
- make_persistent(%VALUES)
- message("")
- end on
- on ui_control($Run)
- set_text($t,"Displayed Value -> Engine Value")
- add_text_line($t,"-------------------------------")
- $count := $Low
- $g := 1
- set_engine_par($PARAM,$count,$GROUP,$SLOT,$FX)
- while ($count <= $High)
- if (find_group(get_engine_par_disp($PARAM,$GROUP,$SLOT,$FX)) = $g)
- add_text_line($t,get_engine_par_disp($PARAM,$GROUP,$SLOT,$FX) & " -> " & get_engine_par($PARAM,$GROUP,$SLOT,$FX))
- %VALUES[$g-1] := get_engine_par($PARAM,$GROUP,$SLOT,$FX)
- inc($g)
- inc($count)
- set_engine_par($PARAM,$count,$GROUP,$SLOT,$FX)
- else
- message("")
- end if
- if ($count mod 10000 = 0)
- set_text($Run,"Running.")
- end if
- if ($count mod 10000 = 1000)
- set_text($Run,"Running..")
- end if
- if ($count mod 10000 = 2000)
- set_text($Run,"Running...")
- end if
- if ($count mod 10000 = 3000)
- set_text($Run,"Running....")
- end if
- if ($count mod 10000 = 4000)
- set_text($Run,"Running.....")
- end if
- if ($count mod 10000 = 5000)
- set_text($Run,"Running......")
- end if
- if ($count mod 10000 = 6000)
- set_text($Run,"Running.......")
- end if
- if ($count mod 10000 = 7000)
- set_text($Run,"Running........")
- end if
- if ($count mod 10000 = 8000)
- set_text($Run,"Running.........")
- end if
- if ($count mod 10000 = 9000)
- set_text($Run,"Running..........")
- end if
- set_text($i,"Current Engine Parameter Value: " & $count)
- inc($count)
- set_engine_par($PARAM,$count,$GROUP,$SLOT,$FX)
- wait($Speed)
- end while
- set_text($Run,"Done!")
- wait(750000)
- $Run := 0
- set_text($Run,"Run")
- end on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement