User`s manual
12. Appendix B – Hydra scripting language definition v1.0
Barco – iStudio – R5976569 – user's manual – revision 09 – March-2007
__________________________________________________________________________________
12-17
12.3 Some example scripts
12.3.1 Aspect script
Set aspect ratio of video windows according to tally status
module module
:loop
active module
state module
total total
expr set c 0
expr set ok 1
:check
select c
type type
string <> test type "Video"
goto test cont
get "source" source
get "width" width
get "aspect" aspect
source source
tally test 0
goto test 16by9
:4by3
string set newaspect "4/3"
expr * width width 3
expr / width width 4
goto 1 cont2
:16by9
string set newaspect "16/9"
expr * width width 9
expr / width width 16
:cont2
set "height" width
string = test aspect newaspect
goto test cont
set "aspect" newaspect
expr set ok 0
:cont
expr + c c 1
expr < test c total
goto test check
goto ok noupdate
update module
:noupdate
sleep 3
goto 1 loop