Jump to content

Search the Community

Showing results for tags 'buttoncolor'.

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 2 results

  1. collection of round buttons ; https://www.autoitscript.com/forum/topic/211721-round-buttons/ ;---------------------------------------------------------------------------------------- ; Title...........: RoundButtons.au3 ; Description.....: collection of round buttons ; AutoIt Version..: 3.3.16.1 Author: ioa747 ; Note............: Testet in Win10 22H2 ;---------------------------------------------------------------------------------------- #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #include <GUIConstantsEx.au3> #include <StaticConstants.au3> Global $MyGui, $aBtn[7][2] Example() Func Example() $MyGui = GUICreate(" My GUI Icons", 300, 500) $aBtn[0][0] = 6 ; cnt of buttons $aBtn[1][1] = "red" $aBtn[1][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[1][1] & "_normal.ico", 0, 20, 20, 64, 64, $SS_NOTIFY) $aBtn[2][1] = "yellow" $aBtn[2][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[2][1] & "_normal.ico", 0, 20, 100, 64, 64, $SS_NOTIFY) $aBtn[3][1] = "green" $aBtn[3][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[3][1] & "_normal.ico", 0, 20, 180, 64, 64, $SS_NOTIFY) $aBtn[4][1] = "turquoise" $aBtn[4][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[4][1] & "_normal.ico", 0, 20, 260, 64, 64, $SS_NOTIFY) $aBtn[5][1] = "cyan" $aBtn[5][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[5][1] & "_normal.ico", 0, 20, 340, 64, 64, $SS_NOTIFY) $aBtn[6][1] = "magenta" $aBtn[6][0] = GUICtrlCreateIcon(@ScriptDir & "\Buttons\" & $aBtn[6][1] & "_normal.ico", 0, 20, 420, 64, 64, $SS_NOTIFY) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $aBtn[1][0] ConsoleWrite($aBtn[1][1] & @CRLF) Case $aBtn[2][0] ConsoleWrite($aBtn[2][1] & @CRLF) Case $aBtn[3][0] ConsoleWrite($aBtn[3][1] & @CRLF) Case $aBtn[4][0] ConsoleWrite($aBtn[4][1] & @CRLF) Case $aBtn[5][0] ConsoleWrite($aBtn[5][1] & @CRLF) Case $aBtn[6][0] ConsoleWrite($aBtn[6][1] & @CRLF) EndSwitch _IsOver() WEnd GUIDelete() EndFunc ;==>Example Func _IsOver() Local Static $iActive, $iClicked = 0 Local $aActive = GUIGetCursorInfo($MyGui) If $aActive[2] And $iClicked = 1 Then Return If $iActive <> $aActive[4] Then $iActive = $aActive[4] For $i = 1 To $aBtn[0][0] If $aBtn[$i][0] = $aActive[4] Then GUICtrlSetImage($aBtn[$i][0], @ScriptDir & "\Buttons\" & $aBtn[$i][1] & "_hover.ico") Else GUICtrlSetImage($aBtn[$i][0], @ScriptDir & "\Buttons\" & $aBtn[$i][1] & "_normal.ico") EndIf Next EndIf If $aActive[2] Or $iClicked = 1 Then For $i = 1 To $aBtn[0][0] If $aBtn[$i][0] = $aActive[4] Then If $iClicked = 0 Then GUICtrlSetImage($aBtn[$i][0], @ScriptDir & "\Buttons\" & $aBtn[$i][1] & "_click.ico") $iClicked = 1 Else GUICtrlSetImage($aBtn[$i][0], @ScriptDir & "\Buttons\" & $aBtn[$i][1] & "_hover.ico") $iClicked = 0 EndIf EndIf Next EndIf EndFunc ;==>_IsOver Extract buttons folder in @ScriptDir Buttons.zip Please, every comment is appreciated! leave your comments and experiences here! Thank you very much
  2. 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...