schilbiz Posted January 16, 2008 Posted January 16, 2008 (edited) I have a list of computer names that I want to use in a GUICtrlCreateCombo but I do not want the users to have access to the servers; so I would like to either exclude them from the dropdown list and not allow the user to type any information into the combo box, or somehow disable several specific server names from being typed in.I imagined it would be something to do with GuiCtrlSetData but have not found anything that points me in the correct direction yet.Also is there a way to have a list of usernames in the GUICtrlCreateCombo that pertain to a computer and would populate the combo box upon selecting the name?Any help would be appreciated,Code snippet:$L_Username = GUICtrlCreateLabel("Use the down arrow to select a Computer.", 15, 35, 220, 32, $SS_SUNKEN) GUICtrlSetFont($L_Username, 9, 400, "", "Times New Roman") $I_User = GUICtrlCreateCombo("", 15, 80, 220, 21) GUICtrlSetData(-1,"computer1|computer2|computer3|etc") $L_EndProcess = GUICtrlCreateLabel("Use the down arrow to select a Process.", 15, 150, 220, 32, $SS_SUNKEN) GUICtrlSetFont($L_EndProcess, 9, 400, "", "Times New Roman") $I_Process = GUICtrlCreateCombo("", 15, 195, 220, 21) GUICtrlSetData(-1,"excel.exe|outlook.exe|winlogon.exe") Edited January 16, 2008 by schilbiz
Danny35d Posted January 16, 2008 Posted January 16, 2008 not allow the user to type any information into the combo box$CBS_DROPDOWNLIST Ex:$I_User = GUICtrlCreateCombo("", 15, 80, 220, 21, $CBS_DROPDOWNLIST) $I_Process = GUICtrlCreateCombo("", 15, 195, 220, 21, $CBS_DROPDOWNLIST) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Bowmore Posted January 16, 2008 Posted January 16, 2008 I have a list of computer names that I want to use in a GUICtrlCreateCombo but I do not want the users to have access to the servers; so I would like to either exclude them from the dropdown list and not allow the user to type any information into the combo box, or somehow disable several specific server names from being typed in. I imagined it would be something to do with GuiCtrlSetData but have not found anything that points me in the correct direction yet. Also is there a way to have a list of usernames in the GUICtrlCreateCombo that pertain to a computer and would populate the combo box upon selecting the name? Any help would be appreciated, Code snippet: $L_Username = GUICtrlCreateLabel("Use the down arrow to select a Computer.", 15, 35, 220, 32, $SS_SUNKEN) GUICtrlSetFont($L_Username, 9, 400, "", "Times New Roman") $I_User = GUICtrlCreateCombo("", 15, 80, 220, 21) GUICtrlSetData(-1,"computer1|computer2|computer3|etc") $L_EndProcess = GUICtrlCreateLabel("Use the down arrow to select a Process.", 15, 150, 220, 32, $SS_SUNKEN) GUICtrlSetFont($L_EndProcess, 9, 400, "", "Times New Roman") $I_Process = GUICtrlCreateCombo("", 15, 195, 220, 21) GUICtrlSetData(-1,"excel.exe|outlook.exe|winlogon.exe")oÝ÷ Ûú®¢×*.ºÇí7è R å,²Ü¥zë®Ì"Z'&Þi¹^¶ç-צ±úèØ^+-Ê©®âuæ®¶sbb33c´õW6W"ÒuT7G&Ä7&VFT6öÖ&ògV÷C²gV÷C²ÂRÂÂ##Â#Â&D÷"b33c´4%5ôE$õDõtäÄ5BÂb33c´4%5ôUDô45$ôÄÂÂb33cµu5õe45$ôÄÂÂb33cµu5õD%5Dõ "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to build bigger and better idiots. So far, the universe is winning."- Rick Cook
schilbiz Posted January 16, 2008 Author Posted January 16, 2008 (edited) Okay thanks guys! I understand both of those suggestions and how to implement them. Edited January 16, 2008 by schilbiz
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