Menu.Call 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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>>_In']
  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['after selection processing']
  47. if $ARGS[0]<>'': dynamic $ARGS[0],$<<$otg_Menu_Current>>_Parameters[str(<<$otg_Menu_Current>>_VybrannyyPunkt)+'_W']"+dyneval("$Result = $<<$otg_Menu_Current>>_Parameters[str(<<$otg_Menu_Current>>_VybrannyyPunkt)+'_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 ---------------------------------