#include #include #include #Region ### START Koda GUI section ### Form=C:\Users\trioptics\Desktop\Autopositioner\JSF.kxf Global $JSF = GUICreate("JSF", 402, 485, -1, -1) Global $First = GUICtrlCreateButton("T8-77454200-05", 0, 0, 75, 25) Global $Second = GUICtrlCreateButton("77454212-001", 0, 24, 75, 25) Global $Third = GUICtrlCreateButton("T8-77454200-06", 0, 48, 75, 25) Global $Fourth = GUICtrlCreateButton("77454211-001", 0, 72, 75, 25) $Button5 = GUICtrlCreateButton("Button5", 0, 96, 75, 25) $Button6 = GUICtrlCreateButton("Button6", 0, 120, 75, 25) $Button7 = GUICtrlCreateButton("Button7", 0, 144, 75, 25) $Button8 = GUICtrlCreateButton("Button8", 0, 168, 75, 25) $Button9 = GUICtrlCreateButton("Button9", 0, 192, 75, 25) $Button10 = GUICtrlCreateButton("Button10", 0, 216, 75, 25) $Button11 = GUICtrlCreateButton("Button11", 0, 240, 75, 25) $Button13 = GUICtrlCreateButton("Button13", 0, 288, 75, 25) $Button12 = GUICtrlCreateButton("Button12", 0, 264, 75, 25) $Button14 = GUICtrlCreateButton("Button14", 0, 312, 75, 25) $Button15 = GUICtrlCreateButton("Button15", 0, 336, 75, 25) $Button16 = GUICtrlCreateButton("Button16", 0, 360, 75, 25) $Button17 = GUICtrlCreateButton("Button17", 0, 384, 75, 25) $Button18 = GUICtrlCreateButton("Button18", 0, 408, 75, 25) $Button19 = GUICtrlCreateButton("Button19", 0, 432, 75, 25) $Button20 = GUICtrlCreateButton("Button20", 0, 456, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $First StartFirst() Case $Second StartSecond() Case $Third StartThird() Case $Fourth StartFourth EndSwitch WEnd Func StartFirst();T8-77454200-05 WinActivate('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]') ControlCommand('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:45]', 'Check') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:6]') Send('{HOME}{DOWN}{DOWN}{DOWN}{ENTER}') Sleep(1000) ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:3]') Send('{HOME}{DOWN}{DOWN}{ENTER}') Sleep(1000) WinWait('OptiCentric 3.3.11') Send('{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:RichEdit20A; INSTANCE:8]', '200') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:24]', 'left', 1) EndFunc Func StartSecond();77454212-001 WinActivate('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]') ControlCommand('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:45]', 'UnCheck') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:6]') Send('{HOME}{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Edit; INSTANCE:7]', '258.318') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:3]') Send('{HOME}{DOWN}{DOWN}{ENTER}') Sleep(1000) WinWait('OptiCentric 3.3.11') Send('{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:RichEdit20A; INSTANCE:8]', '128') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:24]', 'left', 1) EndFunc Func StartThird();T8-77454200-06 WinActivate('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]') ControlCommand('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:32]', 'Check') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:5]') Send('{HOME}{DOWN}{DOWN}{DOWN}{ENTER}') Sleep(1000) ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:1]') Send('{HOME}{DOWN}{DOWN}{ENTER}') Sleep(1000) WinWait('OptiCentric 3.3.11') Send('{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:RichEdit20A; INSTANCE:5]', '200') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:12]', 'left', 1) EndFunc Func StartFourth();7745211-001 WinActivate('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]') ControlCommand('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:32]', 'UnCheck') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:5]') Send('{HOME}{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Edit; INSTANCE:3]', '151.13') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:ComboBox; INSTANCE:1]') Send('{HOME}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}') Sleep(1000) WinWait('OptiCentric 3.3.11') Send('{ENTER}') Sleep(1000) ControlSetText('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:RichEdit20A; INSTANCE:5]', '355.778') ControlClick('OptiCentric 3.3.11 - Trioptics GmbH - [Reflection]', '', '[CLASS:Button; INSTANCE:12]', 'left', 1) EndFunc