Advertisement
Guest User

14.08.18

a guest
Aug 14th, 2018
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #IfWinActive UFDispatchSimpleSmallParcel
  2. \::
  3.     Send, ^15
  4.     Send, про
  5.     Sleep, 200
  6.     Send, {Enter}
  7.     Send, ^16
  8.     Send, ^a^c
  9.     Send, ^17
  10.     Send, ^a^v
  11.     Send, ^02
  12.     Sleep, 3000
  13.     IfWinActive, Сообщение
  14.         Send, {Enter}
  15. Return
  16. #IfWinActive
  17.  
  18. #IfWinActive UFDispatchClient
  19. \::
  20.     FindRecepient()
  21. Return
  22.  
  23. NumpadEnter::
  24.     FindRecepient()
  25. Return
  26.  
  27. FindRecepient()
  28. {
  29.     ControlGetText, Surname, WindowsForms10.EDIT.app.0.a0f91b_r14_ad112
  30.     ControlGetText, FirstName, WindowsForms10.EDIT.app.0.a0f91b_r14_ad113
  31.     ControlGetText, Patronymic, WindowsForms10.EDIT.app.0.a0f91b_r14_ad114
  32.     Name := Surname . " " . FirstName . " " . Patronymic
  33.     Clipboard :=
  34.     ;Send, {ctrl}04
  35.     Clipboard := Name
  36.     Sleep, 100
  37.     Send, {Right}
  38.     Sleep, 200
  39.     Send, {Enter}
  40.     Send, ^v
  41.     Goto, Skip
  42.     Send, {ctrl}02
  43.     Loop, 5
  44.         Send, {tab}
  45.     Send, {up}
  46.     Send, {ctrl}01
  47.     Sleep, 3000
  48.     IfWinActive, Сообщение
  49.     {
  50.         Send, {enter}
  51.         Name := Surname . " " . SubStr(FirstName, 1, 1) . " " . SubStr(Patronymic, 1, 1)
  52.         Clipboard := Name
  53.         Sleep, 100
  54.         Send, {ctrl}11
  55.         Send, ^a
  56.         Send, ^v
  57.         Send, {ctrl}02
  58.         Loop, 5
  59.             Send, {tab}
  60.         Send, {up}
  61.         Send, {ctrl}01
  62.         Sleep, 1000
  63.         Send, {ctrl}12
  64.         Send, ^a%Surname%
  65.         Send, {ctrl}13
  66.         Send, ^a%FirstName%
  67.         Send, {ctrl}14
  68.         Send, ^a%Patronymic%
  69.         Sleep, 1000
  70.     }
  71.     IfWinActive, Сообщение
  72.     {
  73.         Send, {enter}
  74.         Send, {ctrl}00
  75.         Send, {enter}
  76.         Send, {ctrl}02
  77.         WinWaitActive, Атрибуты РПО
  78.         GoToAddress()
  79.         Return
  80.     }
  81.     Send, {ctrl}02
  82.     Sleep, 5000
  83.     Skip:
  84. Return
  85. }
  86.  
  87. TryInitials()
  88. {
  89.     Send, {enter}
  90.     Name := Surname . " " . SubStr(FirstName, 1, 1) . " " . SubStr(Patronymic, 1, 1)
  91.     Clipboard := Name
  92.     Sleep, 100
  93.     Send, {ctrl}11
  94.     Send, ^a
  95.     Send, ^v
  96.     Send, {ctrl}02
  97.     Loop, 5
  98.         Send, {tab}
  99.     Send, {up}
  100.     Send, {ctrl}01
  101.     Sleep, 1000
  102.     Send, {ctrl}12
  103.     Send, %Surname%
  104.     Send, {ctrl}13
  105.     Send, %FirstName%
  106.     Send, {ctrl}14
  107.     Send, %Patronymic%
  108.     Sleep, 1000
  109. Return
  110. }
  111. #IfWinActive
  112.  
  113. #IfWinActive Атрибуты РПО
  114. RButton::
  115. \::
  116.     FinishPacket()
  117. Return
  118.  
  119. FinishPacket()
  120. {
  121.     ControlGetText, weight, WindowsForms10.EDIT.app.0.a0f91b_r14_ad111
  122.     foundPos := InStr(weight, "кг")
  123.     if foundPos = 0
  124.         Goto, InsertWeight
  125.     kilograms := SubStr(weight, 1, foundPos - 1)
  126.     grams := SubStr(weight, foundPos + 2, StrLen(weight) - foundPos - 3)
  127.     EnvMult, kilograms, 1000
  128.     weight := kilograms + grams
  129.     InsertWeight:
  130.     ControlFocus, WindowsForms10.EDIT.app.0.a0f91b_r14_ad18
  131.     ControlGetFocus, control
  132.     if control = WindowsForms10.EDIT.app.0.a0f91b_r14_ad18
  133.         Send, ^a%weight%
  134.     ControlClick, WindowsForms10.Window.b.app.0.a0f91b_r14_ad128
  135.     Sleep, 3000
  136.     IfWinActive, Сообщение
  137.         Send, {Enter}
  138.     WinWaitClose, Атрибуты РПО
  139.     WinWaitActive, Атрибуты РПО
  140. }
  141.  
  142. FinishLetter()
  143. {
  144.     Click, 950, 400
  145.     Loop, 4
  146.         Send, {tab}
  147.     Send, {f4}
  148.     Send, 04
  149.     Send, {enter}
  150.     Loop, 8
  151.         Send, {tab}
  152.     Send, {enter}
  153.     WinWaitClose, Атрибуты РПО
  154.     WinWaitActive, Атрибуты РПО
  155.     Sleep, 500
  156.     FillName()
  157. }
  158.  
  159. GoToAddress()
  160. {
  161.     ControlClick, WindowsForms10.Window.8.app.0.a0f91b_r14_ad116
  162.     Send, {F4}
  163.     WinWaitActive, Почтовый терминал
  164.     Sleep, 500
  165.     Send, {ctrl}18
  166. }
  167.  
  168. AutofillAddress()
  169. {
  170.     Send, {ctrl}12
  171.     Sleep, 200
  172.     Send, ста
  173.     Sleep, 200
  174.     Send, {enter}
  175.     Send, {ctrl}13
  176.     Sleep, 200
  177.     Send, 620092
  178.     Send, {ctrl}18
  179. }
  180.  
  181. FillName()
  182. {
  183.     ControlClick, WindowsForms10.Window.8.app.0.a0f91b_r14_ad115
  184.     Send, {f4}
  185.     Sleep, 200
  186. }
  187.  
  188.  
  189. Numpad1::
  190.     FillName()
  191. Return
  192.  
  193. Numpad0::
  194.     GoToAddress()
  195. Return
  196.  
  197. Numpad2::
  198.     ControlClick, WindowsForms10.Window.8.app.0.a0f91b_r14_ad117
  199.     Send, {f4}
  200. Return
  201.  
  202. Numpad3::
  203.     ControlClick, WindowsForms10.Window.8.app.0.a0f91b_r14_ad118
  204.     Send, {f4}
  205. Return
  206.  
  207. Numpad4::
  208.     ControlClick, WindowsForms10.Window.b.app.0.a0f91b_r14_ad119
  209.     Sleep, 200
  210.     Send, 04
  211.     Sleep, 200
  212.     Send, {Enter}
  213. Return
  214.  
  215. Numpad5::
  216.     ControlClick, WindowsForms10.Window.8.app.0.a0f91b_r14_ad17
  217.     Send, {Alt}{Enter}
  218.     Sleep, 200
  219.     Send, {F4}
  220.     Sleep, 200
  221.     Send, воз
  222.     Send, {Enter}
  223.     Sleep, 200
  224.     Send, ^02
  225. Return
  226. #IfWinActive
  227.  
  228. #IfWinActive Почтовый терминал
  229. \::
  230.     AutofillAddress()
  231. Return
  232.  
  233. StartDelivery()
  234. {
  235.     Send, {enter}
  236.     Send, {ctrl}11
  237.     Loop, 3 {
  238.         Send, {enter}
  239.     }
  240.     Send, {alt}{enter}
  241.     WinWaitActive, UFHandleRPO
  242.     Sleep, 200
  243.     ;Send, {shift down}{tab}{shift up}
  244.     Send, 20
  245.     Send, {ctrl down}a{ctrl up}
  246. }
  247. #IfWinActive
  248.  
  249. #IfWinActive UFHandleRPO
  250. \::
  251. NumpadEnter::
  252.     Send, {ctrl}02
  253.     Sleep, 200
  254.     Send, {enter}{enter}
  255.     Send, 1
  256. Return
  257. #IfWinActive
  258.  
  259. NumpadSub::
  260.     Loop
  261.     {
  262.         WinWaitActive, Сообщение
  263.         IfWinNotActive, Сообщение
  264.             continue
  265.         Send, {right}
  266.         ControlGetFocus, control, Сообщение
  267.         ControlGetText, text, %control%
  268.         if text = Отмена
  269.             StartDelivery()
  270.         else if text = Cancel
  271.         {
  272.             Send, {enter}
  273.             Send, +{tab}
  274.         }
  275.     }
  276. Return
  277.  
  278. AppsKey::
  279.     Send, {ctrl}02
  280. Return
  281.  
  282. RWin::
  283.     Send, {ctrl}00{Enter}
  284. Return
  285.  
  286. !1::
  287.     Reload
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement