Menu.Call 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Menu.Call
  2. if $ARGS[0] = '':EXIT
  3. !!----------
  4. ARGS[10] = arrsize('otg_Menyu_<<$ARGS[0]>>')
  5. if ARGS[10] = 0:EXIT
  6. !!----------
  7. $otg_Menu_Current = 'otg_Menyu_<<$ARGS[0]>>'
  8. killvar 'otg_Menyu_Vyzyvaemoe'
  9. killvar 'otg_Menu_Compliance'
  10. !!----------
  11. ARGS[11] = 0
  12. :otg_menyu_metka_2
  13. if ARGS[11] < ARGS[10]:
  14. dynamic "
  15. $ARGS[0] = $<<$otg_Menu_Current>>_parameters['<<ARGS[11]+1>>y']
  16. if $ARGS[0] = '':
  17. $otg_Menyu_Vyzyvaemoe[] = $<<$otg_Menu_Current>>[<<ARGS[11]>>]
  18. otg_Menu_Compliance[] = <<ARGS[11]+1>>
  19. else
  20. if dyneval($ARGS[0]) <> 0:
  21. $otg_Menyu_Vyzyvaemoe[] = $<<$otg_Menu_Current>>[<<ARGS[11]>>]
  22. otg_Menu_Compliance[] = <<ARGS[11]+1>>
  23. end
  24. end
  25. "
  26. ARGS[11] += 1
  27. !!----------
  28. jump 'otg_menyu_metka_2'
  29. end
  30. !!----------
  31. otg_Menu_Time = 0
  32. dynamic "
  33. <<$otg_Menu_Current>>_selected = 0
  34. <<$otg_Menu_Current>>_VybrannyyPunkt = 0
  35. <<$otg_Menu_Current>>_time = MSECSCOUNT
  36. "
  37. !!----------
  38. menu 'otg_Menyu_Vyzyvaemoe'
  39. !!----------
  40. dynamic "
  41. if <<$otg_Menu_Current>>_selected = 0:
  42. <<$otg_Menu_Current>>_time = MSECSCOUNT-<<$otg_Menu_Current>>_time
  43. $ARGS[0] = $<<$otg_Menu_Current>>_ModuliSobyty['failure of the choice']
  44. if $ARGS[0]<>'':dynamic $ARGS[0]
  45. else
  46. $ARGS[0] = $<<$otg_Menu_Current>>_ModuliSobyty['selecting processing after']
  47. 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']")+"
  48. end
  49. "
  50. !!----------
  51. killvar 'otg_Menyu_Tekuschee'
  52. killvar 'otg_Menyu_Vyzyvaemoe'
  53. killvar 'otg_Menu_Compliance'
  54. !!----------
  55. Result = dyneval("Result = otg_Menyu_<<$ARGS[0]>>_selected")
  56. --- Menu.Call ---------------------------------