caramen Posted February 26, 2015 Posted February 26, 2015 Hello all I tryed in my script 2 methode to change the general GUI color but nothing happen... If $readinputNUMPC = "Num_PC : OK" And $readinputUAC = "Etat UAC : UAC Désactivé!" And $readinputArchive = "Archivage auto : Activé" And $readinputArchive2 = "Cycle Jours : 14" And $readinputArchive3 = "Cycle Mois : 2" And $readinputArchive4 = "Prompt : Désactivé" And $readinputArchive5 = "Old items : Moved" And $readinputArchive6 = "Mailbox Items : Archiver" Then GUICtrlSetBkColor( $hGui , 0x22B14C ) GUISetBkColor(0x22B14C) EndIf All condition is OK but GUICtrlSetBkColor( $hGui , 0x22B14C ) GUISetBkColor(0x22B14C) does not change the color i do somthing whrong ? My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
jguinch Posted February 26, 2015 Posted February 26, 2015 (edited) If you want to change the GUI background, you must use a GUISetXXX function, not GUICtrlSetXXX Without the condition, does it work ? Edited February 26, 2015 by jguinch Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
caramen Posted February 26, 2015 Author Posted February 26, 2015 it s not a condition probleme becose look : Local $readinputNUMPC = GUICtrlRead ( $ScanNUMPC ) Local $readinputUAC = GUICtrlRead ( $ScanUAC ) Local $readinputArchive = GUICtrlRead ( $ScanArchivage ) Local $readinputArchive2 = GUICtrlRead ( $ScanCycleJours ) Local $readinputArchive3 = GUICtrlRead ( $ScanCycleMois ) Local $readinputArchive4 = GUICtrlRead ( $ScanPrompt ) Local $readinputArchive5 = GUICtrlRead ( $ScanOldItems ) Local $readinputArchive6 = GUICtrlRead ( $ScanBoxITEM ) If $readinputNUMPC = "Num_PC : N/A" Then GUICtrlSetBkColor( $ImageNUMPClabel , 0xFFC90E ) ;ORANGE ElseIf $readinputNUMPC = "Num_PC : Non config '000'" Then GUICtrlSetBkColor( $ImageNUMPClabel , 0x000000 ) ;Noir ElseIf $readinputNUMPC = "Num_PC : OK" Then GUICtrlSetBkColor( $ImageNUMPClabel , 0x22B14C ) ;VERT EndIf If $readinputUAC = "Etat UAC : UAC Activé!" Then GUICtrlSetBkColor( $ImageUAClabel , 0x000000 ) ;Noir ElseIf $readinputUAC = "Etat UAC : UAC Désactivé!" Then GUICtrlSetBkColor( $ImageUAClabel , 0x22B14C ) ;VERT EndIf If $readinputArchive = "Archivage auto : Activé" And $readinputArchive2 = "Cycle Jours : 14" And $readinputArchive3 = "Cycle Mois : 2" And $readinputArchive4 = "Prompt : Désactivé" And $readinputArchive5 = "Old items : Moved" And $readinputArchive6 = "Mailbox Items : Archiver" Then GUICtrlSetBkColor( $ImageARCHIVElabel , 0x22B14C ) ;Vert ElseIf $readinputArchive = "Archivage auto: N/A" And $readinputArchive2 = "Cycle Jours : N/A" And $readinputArchive3 = "Cycle Mois : N/A" And $readinputArchive4 = "Prompt : N/A" And $readinputArchive5 = "Old items : N/A" And $readinputArchive6 = "Mailbox Items : N/A" Then GUICtrlSetBkColor( $ImageARCHIVElabel , 0xFFC90E ) ;Orange Else GUICtrlSetBkColor( $ImageARCHIVElabel , 0x000000 ) ;Noir EndIf If $readinputNUMPC = "Num_PC : OK" And $readinputUAC = "Etat UAC : UAC Désactivé!" And $readinputArchive = "Archivage auto : Activé" And $readinputArchive2 = "Cycle Jours : 14" And $readinputArchive3 = "Cycle Mois : 2" And $readinputArchive4 = "Prompt : Désactivé" And $readinputArchive5 = "Old items : Moved" And $readinputArchive6 = "Mailbox Items : Archiver" Then GUICtrlSetBkColor( $hGui , 0x22B14C ) GUISetBkColor($hGUI,0x22B14C) EndIf everything else is working exept last need My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
BrewManNH Posted February 26, 2015 Posted February 26, 2015 ; change this GUICtrlSetBkColor( $hGui , 0x22B14C ) ; to this GUISetBkColor( $hGui , 0x22B14C ) If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
caramen Posted February 27, 2015 Author Posted February 27, 2015 Not working and i tryed two way to complet conditions. ;~ If $readinputNUMPC = "Num_PC : OK" And $readinputUAC = "Etat UAC : UAC Désactivé!" And $readinputArchive = "Archivage auto : Activé" And $readinputArchive2 = "Cycle Jours : 14" And $readinputArchive3 = "Cycle Mois : 2" And $readinputArchive4 = "Prompt : Désactivé" And $readinputArchive5 = "Old items : Moved" And $readinputArchive6 = "Mailbox Items : Archiver" Then If $ImageARCHIVElabel = 0x22B14C And $ImageUAClabel = 0x22B14C And $ImageNUMPClabel = 0x22B14C Then GUISetBkColor( $hGui , 0x22B14C ) EndIf My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Solution jguinch Posted February 27, 2015 Solution Posted February 27, 2015 Your GUISetBkColor syntax is not correct : the parameters are in the wrong order Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
caramen Posted February 27, 2015 Author Posted February 27, 2015 Solved Your GUISetBkColor syntax is not correct : the parameters are in the wrong order thx My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
caramen Posted February 27, 2015 Author Posted February 27, 2015 ps this should be added in the help file My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
BrewManNH Posted February 27, 2015 Posted February 27, 2015 What should be in the help file? The syntax is already listed there, you just didn't read it correctly. I also contributed to this by not checking the parameter order when I posted what I did, but I rarely use either function but should have known better. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
caramen Posted March 2, 2015 Author Posted March 2, 2015 (edited) expandcollapse popupGUISetBkColor Sets the background color of the GUI window. GUISetBkColor ( background [, winhandle] ) Parameters background Background color of the dialog box. winhandle [optional] Windows handle as returned by GUICreate() (default is the previously used window). Return Value Success: 1. Failure: 0. Remarks None. Related GUICreate() Example Copy to clipboard #include <ColorConstantS.au3> #include <GUIConstantsEx.au3> Example() Func Example() GUICreate("My GUI") ; will create a dialog box that when displayed is centered GUISetBkColor($COLOR_RED) ; will change background color GUISetState(@SW_SHOW) ; will display an empty dialog box ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete() EndFunc ;==>Example This is the help file and there is no order specified Not enouth explicit for noobs like me ;p Edit: and the exemple script dont even show an order or even a color ID insteed of $COLOR_RED with that include. The confusion for me is winhandle =/= ControlID in help file My bad ?^^ Edited March 2, 2015 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Moderators Melba23 Posted March 2, 2015 Moderators Posted March 2, 2015 caramen, This is the help file and there is no order specifiedAnd what do you think this is:GUISetBkColor ( background [, winhandle] )if not an example of function syntax showing 2 parameters in a specific order? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
jguinch Posted March 2, 2015 Posted March 2, 2015 GUISetBkColor ( background [, winhandle] ) gives the order : - background = first parameter - winhandle (optionnal) = second parameter Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
caramen Posted March 2, 2015 Author Posted March 2, 2015 Nvm my english is not good enouth to explain what i dont get in this exemple Forget this. Thx for help My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
jguinch Posted March 2, 2015 Posted March 2, 2015 Alors explique-le en Français. On devrait se comprendre entre nous... Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
caramen Posted March 2, 2015 Author Posted March 2, 2015 Alors explique-le en Français. On devrait se comprendre entre nous... Dac ba enfaite je pensé que le winhandle été comme pour le winmove une sorte de titre de fenêtre au lieu d'un control ID d’où ma confusion. Je voulais également dire que la méthode de choix de couleur n’était pas assez explicite dans le helpdoc pour les gents qui débute comme moi... car il y a une include qui n'est pas explicité alors qu'elle n'a pas de rapport avec le call de la GUI color bien que le sujet reste la couleur j’entends bien. Mais j'ai bien compris que le problème venait de moi c'est pourquoi je préfère m’écraser My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Moderators Melba23 Posted March 2, 2015 Moderators Posted March 2, 2015 (edited) caramen,Compris - je vais peutetre changer l'exemple pour le clarifier. je pensé que le winhandle été comme pour le winmove une sorte de titre de fenêtre au lieu d'un control IDMake sure you understand the difference between a handle and a ControlID: - A handle is a unique ID given by Windows to everything - GUIS, controls, etc.- A ControlID is a value used by the app (or AutoIt itself) to identify the control.Any control created by a GUICtrlCreate* function returns an AutoIt controlID which is an index to an internal array listing all the native controls. A GUI, or a control created by a UDF, returns a handle. You can get the actual Windows handle from the AutoIt ControlID by using GUICtrlGetHandle - going the reverse way is more complicated and has very little application. Clearer? M23Edit:Summary: caramen feels the use of a constant for the colour in the Help file example was confusing. I will look at changing it. He was also confused by the handle/ControlID/ duality. Edited March 2, 2015 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
caramen Posted March 2, 2015 Author Posted March 2, 2015 (edited) Wow Melba23 thx man for that explaination. This is exactly the kind of informations that i need to improve myself in autoit. I dont expected so much moderation members are frenchs I feel like happy ;p And... I realy like the fact to trying improve the autoit help file even with my low skills xD this is realy cool. Thx for listenning to me Edited March 2, 2015 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
Moderators Melba23 Posted March 2, 2015 Moderators Posted March 2, 2015 caramen, so much moderation members are frenchsJe suis un anglais quasiment bilangue, pas francais du tout! Do you know that there is a French language forum? M23Trad: I am a nearly bilingual Englishman - not French at all! Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
caramen Posted March 2, 2015 Author Posted March 2, 2015 caramen, Je suis un anglais quasiment bilangue, pas francais du tout! Do you know that there is a French language forum? M23 Trad: I am a nearly bilingual Englishman - not French at all! Unfortunatly i got a bad experience in french forums. I realy prefer this forum for some reason... 1) More users here. 2) Answer faster here. 3) Skills better here. 4) I prefer official forum. 5) I want improve my english xD (if you watch all my first post you will see it's what i am doing ) 6) etc... My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki
jguinch Posted March 2, 2015 Posted March 2, 2015 Caramen, you forgot to say that you don't want to use the french forum because we said you that the french forum does not help users with game automation. That is your own choice. Nobody prevents you to come and ask questions that follow the rules (as here). Even if the French community is less active than here, many quality-members provide answers every day. Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now