Code: Select all
sub Switch()
if UO.GetGlobal('state')=='on' then
UO.Exec('terminate Script')
else
UO.Exec('exec Script')
UO.SetGlobal('state','off')
endif
endsub
sub Script()
UO.SetGlobal('state','on')
.....
endsub