Jump to content

kkelley

Members
  • Posts

    19
  • Joined

  • Last visited

Community Answers

  1. kkelley's post in ComboBox Select was marked as the answer   
    I have figured it out! here is the code
    #include <ButtonConstants.au3> #include <ComboConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include "utils.au3" $consoleGUI = GUICreate("Console Launcher", 418, 251, 433, 177) GUISetBkColor(0xFF0000) $userLabel = GUICtrlCreateLabel("User Name", 56, 23, 100, 22) GUICtrlSetFont(-1, 12, 800, 0, "Algerian") $passwordLabel = GUICtrlCreateLabel("Password", 56, 71, 94, 22) GUICtrlSetFont(-1, 12, 800, 0, "Algerian") $activityLabel = GUICtrlCreateLabel("Select Activity", 56, 119, 148, 22) GUICtrlSetFont(-1, 12, 800, 0, "Algerian") $userInput = GUICtrlCreateInput("", 56, 47, 313, 21) $passwordInput = GUICtrlCreateInput("", 56, 95, 313, 21) $activitySelect = GUICtrlCreateCombo("", 56, 143, 313, 25) GUICtrlSetData(-1, "Study|Practice|Certify", "Study") $continueButton = GUICtrlCreateButton("Continue", 56, 184, 99, 25, $WS_GROUP) GUICtrlSetFont(-1, 12, 800, 0, "Algerian") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) $exitButton = GUICtrlCreateButton("Exit", 296, 184, 75, 25, $WS_GROUP) GUICtrlSetFont(-1, 12, 800, 0, "Algerian") GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUISetState(@SW_SHOW) Global $count While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $continueButton ;Converting the input boxes so they can be used. $user=GUICtrlRead($userInput) $pwd=GUICtrlRead($passwordInput) $activity=GUICtrlRead($activitySelect) ExitLoop Case $GUI_EVENT_CLOSE, $exitButton Exit EndSwitch WEnd ShellExecute("C:\Certiport\iQsystem\CertiportConsole.exe") Sleep(5000) Send($user) Send("{TAB}") Sleep(1000) Send($pwd) Send("{ENTER}") Sleep(5000) ;Clicking Study/Practice/Certify _ScreenCapture_Capture("C:\TEMP\real(1).tif", 0, 0, -1, -1, False) _LoadImage("C:\TEMP\real(1).tif") $xyStudy=_FindText("Study", True) Sleep(5000) If $activity = "Study" Then _ScreenCapture_Capture("C:\TEMP\real(2).tif", 0, 0, -1, -1, False) _LoadImage("C:\TEMP\real(2).tif") $xyStudy=_FindText("Study", True) Sleep(5000) EndIf If $activity = "Practice" Then _ScreenCapture_Capture("C:\TEMP\real(2).tif", 0, 0, -1, -1, False) _LoadImage("C:\TEMP\real(2).tif") $xyPractice=_FindText("Practice", True) Sleep(5000) EndIf If $activity = "Certify" Then _ScreenCapture_Capture("C:\TEMP\real(2).tif", 0, 0, -1, -1, False) _LoadImage("C:\TEMP\real(2).tif") $xyCertify=_FindText("Certify", True) Sleep(5000) EndIf
×
×
  • Create New...