Ivan_L

MainMenu

Mar 15th, 2020
439
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <Misc.au3>
  2. #include <Constants.au3>
  3. #include <MsgBoxConstants.au3>
  4. #include <WinAPI.au3>
  5. #include <Array.au3>
  6. #include <GUIConstants.au3>
  7.  
  8.  
  9. Local $hGUI = GUICreate("Пульт для пульта",280,250)
  10. Local $start =          GUICtrlCreateButton("Предпусковая подготовка",10,10,200,25)
  11. Local $calibrating =                 GUICtrlCreateButton("Калибровка",10,45,200,25)
  12. Local $goFar =                         GUICtrlCreateButton("Туда",220,10,50,50)
  13. Local $prepear =             GUICtrlCreateButton("Подготовка детали",10,80,200,25)
  14. Local $SketchUpList =             GUICtrlCreateButton("HotKeys SketchUP",10,115,200,25)
  15. Local $goToZero =                      GUICtrlCreateButton("Сюда",220,70,50,50)
  16. Local $goToSoplo =                     GUICtrlCreateButton("Смена сопла" ,220,130,50,50,$BS_MULTILINE)
  17. Local $LongCut =              GUICtrlCreateButton("Длинный рез",10,150,200,25)
  18.  
  19. Local $TopLeft =              GUICtrlCreateButton("",10,180,15,15)
  20. Local $Top =                      GUICtrlCreateButton("",30,180,15,15)
  21. Local $TopRight =             GUICtrlCreateButton("",50,180,15,15)
  22. Local $MidLeft =              GUICtrlCreateButton("",10,200,15,15)
  23. Local $Center =               GUICtrlCreateButton("",30,200,15,15)
  24. Local $MidRight =             GUICtrlCreateButton("",50,200,15,15)
  25. Local $BottLeft =             GUICtrlCreateButton("",10,220,15,15)
  26. Local $Bottom =                   GUICtrlCreateButton("",30,220,15,15)
  27. Local $BottRight =            GUICtrlCreateButton("",50,220,15,15)
  28.  
  29.  
  30. Func TopLeft()
  31.     WinActivate ("[CLASS:TfrmCypCut]","")
  32.     MouseClick("left", 87,47 ,1,1)
  33.     MouseClick("left", 370,100 ,1,1)
  34.     MouseClick("left", 521,478 ,1,1)
  35.     Sleep(50)
  36.     Send("{ENTER}")
  37. EndFunc
  38.  
  39. Func Top()
  40.     WinActivate ("[CLASS:TfrmCypCut]","")
  41.     MouseClick("left", 87,47 ,1,1)
  42.     MouseClick("left", 370,100 ,1,1)
  43.     MouseClick("left", 585,478 ,1,1)
  44.     Sleep(50)
  45.     Send("{ENTER}")
  46. EndFunc
  47.  
  48. Func TopRight()
  49.     WinActivate ("[CLASS:TfrmCypCut]","")
  50.     MouseClick("left", 87,47 ,1,1)
  51.     MouseClick("left", 370,100 ,1,1)
  52.     MouseClick("left", 660 ,478 ,1,1)
  53.     Sleep(50)
  54.     Send("{ENTER}")
  55. EndFunc
  56.  
  57. Func MidLeft()
  58.     WinActivate ("[CLASS:TfrmCypCut]","")
  59.     MouseClick("left", 87,47 ,1,1)
  60.     MouseClick("left", 370,100 ,1,1)
  61.     MouseClick("left", 514,498 ,1,1)
  62.     Sleep(50)
  63.     Send("{ENTER}")
  64. EndFunc
  65.  
  66. Func Center()
  67.     WinActivate ("[CLASS:TfrmCypCut]","")
  68.     MouseClick("left", 87,47 ,1,1)
  69.     MouseClick("left", 370,100 ,1,1)
  70.     MouseClick("left", 600,500 ,1,1)
  71.     Sleep(50)
  72.     Send("{ENTER}")
  73. EndFunc
  74.  
  75. Func MidRight()
  76.     WinActivate ("[CLASS:TfrmCypCut]","")
  77.     MouseClick("left", 87,47 ,1,1)
  78.     MouseClick("left", 370,100 ,1,1)
  79.     MouseClick("left", 670,500 ,1,1)
  80.     Sleep(50)
  81.     Send("{ENTER}")
  82. EndFunc
  83.  
  84. Func BottLeft()
  85.     WinActivate ("[CLASS:TfrmCypCut]","")
  86.     MouseClick("left", 87,47 ,1,1)
  87.     MouseClick("left", 370,100 ,1,1)
  88.     MouseClick("left", 520,520 ,1,1)
  89.     Sleep(50)
  90.     Send("{ENTER}")
  91. EndFunc
  92.  
  93. Func Bottom()
  94.     WinActivate ("[CLASS:TfrmCypCut]","")
  95.     MouseClick("left", 87,47 ,1,1)
  96.     MouseClick("left", 370,100 ,1,1)
  97.     MouseClick("left", 600,520 ,1,1)
  98.     Sleep(50)
  99.     Send("{ENTER}")
  100. EndFunc
  101.  
  102. Func BottRight()
  103.     WinActivate ("[CLASS:TfrmCypCut]","")
  104.     MouseClick("left", 87,47 ,1,1)
  105.     MouseClick("left", 370,100 ,1,1)
  106.     MouseClick("left", 670,520 ,1,1)
  107.     Sleep(50)
  108.     Send("{ENTER}")
  109. EndFunc
  110.  
  111.  
  112. GUISetState(@SW_SHOW,$hGUI)
  113. Sleep(5)
  114. WinMove("Пульт для пульта","",980,680)
  115. Sleep(5)
  116. WinSetOnTop("Пульт для пульта","",1)
  117. While 1
  118.     Switch GUIGetMsg()
  119.         Case $GUI_EVENT_CLOSE
  120.         ExitLoop
  121.  
  122.         Case $start
  123.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/SatrtWork.exe")
  124.  
  125.         Case $calibrating
  126.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/Calebraiting.exe")
  127.  
  128.         Case $goFar
  129.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/GoToFarPosition.exe")
  130.  
  131.         Case $prepear
  132.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/PredCutSettings.exe")
  133.  
  134.         Case $goToZero
  135.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/GoToZeroPosition.exe")
  136.  
  137.         Case $SketchUpList
  138.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/HotKeysList.exe")
  139.  
  140.         Case $LongCut
  141.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/LongCutImpruved.exe")
  142.  
  143.         Case $goToSoplo
  144.         Run("C:\Program Files (x86)\AutoIt3\ScriptsForLaser\exe/GoTo ChangeSoplo.exe")
  145.  
  146.         Case $TopLeft
  147.             TopLeft()
  148.  
  149.         Case $Top
  150.             Top()
  151.  
  152.         Case $TopRight
  153.             TopRight()
  154.  
  155.         Case $MidLeft
  156.             MidLeft()
  157.  
  158.         Case $Center
  159.             Center()
  160.  
  161.         Case $MidRight
  162.             MidRight()
  163.  
  164.         Case $BottLeft
  165.             BottLeft()
  166.  
  167.         Case $Bottom
  168.             Bottom()
  169.  
  170.         Case $BottRight
  171.             BottRight()
  172.  
  173.  
  174.  
  175.  
  176.     EndSwitch
  177. WEnd
RAW Paste Data