Jump to content

Search the Community

Showing results for tags 'buttoncolor'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


WWW


Interests

Found 1 result

  1. Hello! I am making a GUI on autoit, I would like the button to change color when selected from default to red. I have searched the forums and haven't really found what I am looking for. Any suggestions would be appreciated. Here is my code thus far. #include "utils.au3" ;Setting Constants Global $screenHeight=@DesktopHeight Global $screenWidth=@DesktopWidth Global $expectedScore=0 Global $errors=0 Global $type Global $user Global $pwd Global $program Global $exam Global $platform Global $passScore Global $activity ;Can/Will Change these values later Global $wordRecognitionIntensity=99 Global $tutorialquestions=4 Global $actualquestions=50 Global $SecondsUntilQuestionTimesOut=20 Global $gridSearchIntensity=30 Global $topScreenCutOff=1 Local $failedQuestions="" ;Starts GUI that asks for login information, exam to take, etc.. $allowInput= True StartGUI() $allowInput= False Func StartGUI() ;========================GUI Items=========================; $hGUI = GUICreate("Auto Tester", 601, 436, 433, 170) GUISetBkColor(0xFFFFFF) $certiportLogo = GUICtrlCreatePic("C:\Users\UKELLKI\Dropbox\AutoIt\Images\certiport.jpg", 0, 0, 600, 75, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) $portalButton = GUICtrlCreateButton("Portal", 24, 120, 115, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($portalButton, 0xfffafa) GUICtrlSetBkColor(-1, 0x808080) $lmsButton = GUICtrlCreateButton("LMS", 168, 120, 115, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($lmsButton, 0xfffafa) GUICtrlSetBkColor(-1, 0x808080) $consoleButton = GUICtrlCreateButton("Console", 312, 120, 115, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($consoleButton, 0xfffafa) GUICtrlSetBkColor(-1, 0x808080) $launcherButton = GUICtrlCreateButton("Exam Launcher", 456, 120, 115, 25, $WS_GROUP) GUICtrlSetFont(-1, 10, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($launcherButton, 0xfffafa) GUICtrlSetBkColor(-1, 0x808080) $serviceLabel = GUICtrlCreateLabel("Select Service", 376, 64, 152, 29) GUICtrlSetFont(-1, 16, 800, 0, "Georgia") $exitButton = GUICtrlCreateButton("Exit", 456, 376, 115, 30, $WS_GROUP) GUICtrlSetFont(-1, 14, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($exitButton, 0xfffafa) GUICtrlSetBkColor(-1, 0x000000) ;=======================Hidden Items=======================; $userLabel = GUICtrlCreateLabel("User Name", 376, 192, 94, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $passwordLabel = GUICtrlCreateLabel("Password", 376, 264, 83, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $iuser = GUICtrlCreateInput("", 376, 232, 193, 21) $ipassword = GUICtrlCreateInput("123456", 376, 304, 193, 21, 0x0020) $runLabel = GUICtrlCreateLabel("Run On", 24, 168, 66, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $programLabel = GUICtrlCreateLabel("Program", 24, 232, 76, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $courseLabel = GUICtrlCreateLabel("Course ID", 24, 232, 100, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $courseInput = GUICtrlCreateInput("", 24, 264, 257, 25) $scoringLabel = GUICtrlCreateLabel("Scoring Pass", 24, 296, 108, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $typeSelect = GUICtrlCreateCombo("", 24, 200, 257, 25) GUICtrlSetData($typeSelect, "Staging|Test|Prod", "Staging") $programSelect = GUICtrlCreateCombo("", 24, 264, 257, 25) GUICtrlSetData($programSelect, "Internet and Computing Core Certification|Adobe Certified Associate|Autodesk Certified User|Certiport Training|CompTIA Strata|HP Accredited Technical Associate|Intuit QuickBooks|Microsoft Certified Educator|Microsoft Office Specialist|Microsoft Technology Associate", "Internet and Computing Core Certification") $scoreSelect = GUICtrlCreateCombo("", 24, 328, 257, 25) GUICtrlSetData($scoreSelect, "Smoke Test|1000 Pass|Barely Pass|Barely Fail", "Smoke Test") $iContinue = GUICtrlCreateButton("Continue", 24, 376, 115, 30, $WS_GROUP) GUICtrlSetFont(-1, 14, 400, 0, "Georgia") GUICtrlSetCursor (-1, 0) GUICtrlSetColor($iContinue, 0xfffafa) GUICtrlSetBkColor(-1, 0x000000) $browserLabel = GUICtrlCreateLabel("Select Browser", 24, 168, 125, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $browserCombo = GUICtrlCreateCombo("", 24, 200, 257, 25) GUICtrlSetData($browserCombo, "Internet Explorer|Mozilla Firefox|Google Chrome|Safari", "Internet Explorer") $activityLabel = GUICtrlCreateLabel("Select Activity", 24, 168, 126, 22) GUICtrlSetFont(-1, 12, 800, 0, "Georgia") $activityCombo = GUICtrlCreateCombo("", 24, 200, 257, 25) GUICtrlSetData($activityCombo, "Study|Practice|Certify", "Study") ;=======================Hiding Items=======================; GUICtrlSetState($userLabel, $GUI_HIDE) GUICtrlSetState($passwordLabel, $GUI_HIDE) GUICtrlSetState($iuser, $GUI_HIDE) GUICtrlSetState($ipassword, $GUI_HIDE) GUICtrlSetState($runLabel, $GUI_HIDE) GUICtrlSetState($programLabel, $GUI_HIDE) GUICtrlSetState($scoringLabel, $GUI_HIDE) GUICtrlSetState($typeSelect, $GUI_HIDE) GUICtrlSetState($programSelect, $GUI_HIDE) GUICtrlSetState($scoreSelect, $GUI_HIDE) GUICtrlSetState($iContinue, $GUI_HIDE) GUICtrlSetState($browserLabel, $GUI_HIDE) GUICtrlSetState($browserCombo, $GUI_HIDE) GUICtrlSetState($activityLabel, $GUI_HIDE) GUICtrlSetState($activityCombo, $GUI_HIDE) GUICtrlSetState($courseLabel, $GUI_HIDE) GUICtrlSetState($courseInput, $GUI_HIDE) ;================End of GUI Items/Hidden Items================; GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $exitButton Exit Case $portalButton ;This ensures that the fields change when clicking different browser service GUICtrlSetState($userLabel, $GUI_HIDE) GUICtrlSetState($passwordLabel, $GUI_HIDE) GUICtrlSetState($iuser, $GUI_HIDE) GUICtrlSetState($ipassword, $GUI_HIDE) GUICtrlSetState($runLabel, $GUI_HIDE) GUICtrlSetState($programLabel, $GUI_HIDE) GUICtrlSetState($scoringLabel, $GUI_HIDE) GUICtrlSetState($typeSelect, $GUI_HIDE) GUICtrlSetState($programSelect, $GUI_HIDE) GUICtrlSetState($scoreSelect, $GUI_HIDE) GUICtrlSetState($iContinue, $GUI_HIDE) GUICtrlSetState($browserLabel, $GUI_HIDE) GUICtrlSetState($browserCombo, $GUI_HIDE) GUICtrlSetState($activityLabel, $GUI_HIDE) GUICtrlSetState($activityCombo, $GUI_HIDE) GUICtrlSetState($courseLabel, $GUI_HIDE) GUICtrlSetState($courseInput, $GUI_HIDE) ;Clearing the data in the user and password fields GUICtrlSetState($iuser, "") ;Clears password data, automatically set to 123456 *will need to be changed!* ;GUICtrlSetData($ipassword, ""); will need to decomment when launched ;End Reset Function GUICtrlSetState($userLabel, $GUI_SHOW) GUICtrlSetState($passwordLabel, $GUI_SHOW) GUICtrlSetState($iuser, $GUI_SHOW) GUICtrlSetState($ipassword, $GUI_SHOW) GUICtrlSetState($scoringLabel, $GUI_SHOW) GUICtrlSetState($scoreSelect, $GUI_SHOW) GUICtrlSetState($programLabel, $GUI_SHOW) GUICtrlSetState($programSelect, $GUI_SHOW) GUICtrlSetState($runLabel, $GUI_SHOW) GUICtrlSetState($typeSelect, $GUI_SHOW) GUICtrlSetState($iContinue, $GUI_SHOW) Case $lmsButton ;This ensures that the fields change when clicking different browser service GUICtrlSetState($userLabel, $GUI_HIDE) GUICtrlSetState($passwordLabel, $GUI_HIDE) GUICtrlSetState($iuser, $GUI_HIDE) GUICtrlSetState($ipassword, $GUI_HIDE) GUICtrlSetState($runLabel, $GUI_HIDE) GUICtrlSetState($programLabel, $GUI_HIDE) GUICtrlSetState($scoringLabel, $GUI_HIDE) GUICtrlSetState($typeSelect, $GUI_HIDE) GUICtrlSetState($programSelect, $GUI_HIDE) GUICtrlSetState($scoreSelect, $GUI_HIDE) GUICtrlSetState($iContinue, $GUI_HIDE) GUICtrlSetState($browserLabel, $GUI_HIDE) GUICtrlSetState($browserCombo, $GUI_HIDE) GUICtrlSetState($activityLabel, $GUI_HIDE) GUICtrlSetState($activityCombo, $GUI_HIDE) GUICtrlSetState($courseLabel, $GUI_HIDE) GUICtrlSetState($courseInput, $GUI_HIDE) ;Clearing the data in the user and password fields GUICtrlSetState($iuser, "") ;Clears password data, automatically set to 123456 *will need to be changed!* ;GUICtrlSetState($ipassword, ""); will need to decomment when launched ;End Reset Function GUICtrlSetState($userLabel, $GUI_SHOW) GUICtrlSetState($passwordLabel, $GUI_SHOW) GUICtrlSetState($iuser, $GUI_SHOW) GUICtrlSetState($ipassword, $GUI_SHOW) GUICtrlSetState($scoringLabel, $GUI_SHOW) GUICtrlSetState($scoreSelect, $GUI_SHOW) GUICtrlSetState($browserLabel, $GUI_SHOW) GUICtrlSetState($browserCombo, $GUI_SHOW) GUICtrlSetState($iContinue, $GUI_SHOW) Case $consoleButton ;This ensures that the fields change when clicking different browser service GUICtrlSetState($userLabel, $GUI_HIDE) GUICtrlSetState($passwordLabel, $GUI_HIDE) GUICtrlSetState($iuser, $GUI_HIDE) GUICtrlSetState($ipassword, $GUI_HIDE) GUICtrlSetState($runLabel, $GUI_HIDE) GUICtrlSetState($programLabel, $GUI_HIDE) GUICtrlSetState($scoringLabel, $GUI_HIDE) GUICtrlSetState($typeSelect, $GUI_HIDE) GUICtrlSetState($programSelect, $GUI_HIDE) GUICtrlSetState($scoreSelect, $GUI_HIDE) GUICtrlSetState($iContinue, $GUI_HIDE) GUICtrlSetState($browserLabel, $GUI_HIDE) GUICtrlSetState($browserCombo, $GUI_HIDE) GUICtrlSetState($activityLabel, $GUI_HIDE) GUICtrlSetState($activityCombo, $GUI_HIDE) GUICtrlSetState($courseLabel, $GUI_HIDE) GUICtrlSetState($courseInput, $GUI_HIDE) ;Clearing the data in the user and password fields GUICtrlSetState($iuser, "") ;Clears password data, automatically set to 123456 *will need to be changed!* ;GUICtrlSetState($ipassword, ""); will need to decomment when launched ;End Reset Function GUICtrlSetState($userLabel, $GUI_SHOW) GUICtrlSetState($passwordLabel, $GUI_SHOW) GUICtrlSetState($iuser, $GUI_SHOW) GUICtrlSetState($ipassword, $GUI_SHOW) GUICtrlSetState($scoringLabel, $GUI_SHOW) GUICtrlSetState($scoreSelect, $GUI_SHOW) GUICtrlSetState($activityLabel, $GUI_SHOW) GUICtrlSetState($activityCombo, $GUI_SHOW) GUICtrlSetState($iContinue, $GUI_SHOW) Case $launcherButton ;This ensures that the fields change when clicking different browser service GUICtrlSetState($userLabel, $GUI_HIDE) GUICtrlSetState($passwordLabel, $GUI_HIDE) GUICtrlSetState($iuser, $GUI_HIDE) GUICtrlSetState($ipassword, $GUI_HIDE) GUICtrlSetState($runLabel, $GUI_HIDE) GUICtrlSetState($programLabel, $GUI_HIDE) GUICtrlSetState($scoringLabel, $GUI_HIDE) GUICtrlSetState($typeSelect, $GUI_HIDE) GUICtrlSetState($programSelect, $GUI_HIDE) GUICtrlSetState($scoreSelect, $GUI_HIDE) GUICtrlSetState($iContinue, $GUI_HIDE) GUICtrlSetState($browserLabel, $GUI_HIDE) GUICtrlSetState($browserCombo, $GUI_HIDE) GUICtrlSetState($activityLabel, $GUI_HIDE) GUICtrlSetState($activityCombo, $GUI_HIDE) GUICtrlSetState($courseLabel, $GUI_HIDE) GUICtrlSetState($courseInput, $GUI_HIDE) ;Clearing the data in the user and password fields GUICtrlSetState($iuser, "") ;Clears password data, automatically set to 123456 *will need to be changed!* ;GUICtrlSetState($ipassword, ""); will need to decomment when launched ;End Reset Function GUICtrlSetState($userLabel, $GUI_SHOW) GUICtrlSetState($passwordLabel, $GUI_SHOW) GUICtrlSetState($iuser, $GUI_SHOW) GUICtrlSetState($ipassword, $GUI_SHOW) GUICtrlSetState($scoringLabel, $GUI_SHOW) GUICtrlSetState($scoreSelect, $GUI_SHOW) GUICtrlSetState($iContinue, $GUI_SHOW) GUICtrlSetState($browserLabel, $GUI_SHOW) GUICtrlSetState($browserCombo, $GUI_SHOW) GUICtrlSetState($courseLabel, $GUI_SHOW) GUICtrlSetState($courseInput, $GUI_SHOW) Case $iContinue ;Makes all of the information from GUI available $type=GUICtrlRead($typeSelect) $user=GUICtrlRead($iuser) $pwd=GUICtrlRead($ipassword) $program=GUICtrlRead($programSelect) $passScore=GUICtrlRead($scoreSelect) $activity=GUICtrlRead($activityCombo) $exam="selectLater" ExitLoop EndSwitch WEnd GUIDelete($hGUI) ;delete the file so it can be rewritten and set error log to 0 FileDelete ( "result.log.txt" ) DirRemove ("C:\TEMP",1) DirCreate ("C:\TEMP") _BlockInputEx(1, "{Pause}") if $program="Adobe Certified Associate" then $topScreenCutOff=5 endif ;loads the test up from the correct platform and browser if $platform="Portal Internet Explorer" then _callIE() ElseIf $platform="Portal Chrome" then _PortalBrowser("chrome.exe") ElseIf $platform="Portal Firefox" then _PortalBrowser("firefox.exe") ElseIf $platform="Portal Safari" Then _PortalBrowser("safari.exe") ElseIf $platform="Console" then _CallConsole() EndIf LockdownNav() EndFunc
×
×
  • Create New...