# Menu.Call
if $ARGS[0] = '':EXIT
!!----------
ARGS[10] = arrsize('otg_Menyu_<<$ARGS[0]>>')
if ARGS[10] = 0:EXIT
!!----------
$otg_Menu_Current = 'otg_Menyu_<<$ARGS[0]>>'

killvar 'otg_Menyu_Vyzyvaemoe'
killvar 'otg_Menu_Compliance'
!!----------

ARGS[11] = 0

:otg_menyu_metka_2
if ARGS[11] < ARGS[10]:
	dynamic "

		$ARGS[0] = $<<$otg_Menu_Current>>_parameters['<<ARGS[11]+1>>y']
		if $ARGS[0] = '':
			$otg_Menyu_Vyzyvaemoe[] = $<<$otg_Menu_Current>>[<<ARGS[11]>>]

			otg_Menu_Compliance[] = <<ARGS[11]+1>>
		else
			if dyneval($ARGS[0]) <> 0:

				$otg_Menyu_Vyzyvaemoe[] = $<<$otg_Menu_Current>>[<<ARGS[11]>>]

				otg_Menu_Compliance[] = <<ARGS[11]+1>>
			end
		end
	"

	ARGS[11] += 1

	!!----------
	jump 'otg_menyu_metka_2'
end
!!----------

otg_Menu_Time = 0
dynamic "
	<<$otg_Menu_Current>>_selected = 0
	<<$otg_Menu_Current>>_VybrannyyPunkt = 0
	<<$otg_Menu_Current>>_time = MSECSCOUNT

"
!!----------
menu 'otg_Menyu_Vyzyvaemoe'
!!----------
dynamic "

	if <<$otg_Menu_Current>>_selected = 0:
		<<$otg_Menu_Current>>_time = MSECSCOUNT-<<$otg_Menu_Current>>_time
		$ARGS[0] = $<<$otg_Menu_Current>>_ModuliSobyty['failure of the choice']

		if $ARGS[0]<>'':dynamic $ARGS[0]
	else

		$ARGS[0] = $<<$otg_Menu_Current>>_ModuliSobyty['selecting processing after']
		if $ARGS[0]<>'':dynamic $ARGS[0], $<<$otg_Menu_Current>>_parameters[str(<<$otg_Menu_Current>>_ВыбранныйПункт)+'_Z']"+dyneval("$Result = $<<$otg_Menu_Current>>_parameters[str(<<$otg_Menu_Current>>_ВыбранныйПункт)+'_P']")+"

	end
"
!!----------
killvar 'otg_Menyu_Tekuschee'
killvar 'otg_Menyu_Vyzyvaemoe'
killvar 'otg_Menu_Compliance'
!!----------

Result = dyneval("Result = otg_Menyu_<<$ARGS[0]>>_selected")

--- Menu.Call ---------------------------------

