Jump to content

Search the Community

Showing results for tags 'combo'.

  • 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


Member Title


Location


WWW


Interests

Found 14 results

  1. Hello, i searched the forum for something near, but with no success... I have Combobox control with $CBS_DROPDOWNLIST style with some items (for example (one, two, nine). When i want to select the item, using keyboard, the items are selected only on First letter base (for example when i type "on", Nine is selected). Is there some trick to force the combobox with $CBS_DROPDOWNLIST style to accept more than the First letter during selecting the items from the list? Mi wanted result is the same as for example - when you type "fir" on the desktop, Firefox is automatically selected. Thank you so much. Fenzik
  2. I'm working on a script that needs to work with a huge database inside a combobox. I'm looking for the best way to link a multidimensional array to that data to load that data on to textfields. example: combo item 0 = "A", data = [index linked to combo item 0] [1,0,5,4,87,9,"xyz"] combo item 1 = "B", data = [index linked to combo item 1] [1,6,5,4,87,9,"zzz"] combo item 3 = "A", data = [index linked to combo item 3] [1,6,4,4,87,9,"aaa"] ; yes also double items! Would also like to be able to delete and add items on the fly btw.. Local $INDEX[0][10] ; ubound wil be resized like a stack while loading from a textfile ;inside gui: local $Combo = GUICtrlCreateCombo('...', 10, 10, 290, 25) ;gui loop: While True Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $Combo display() ; how do i link my array index to the combo labels to know what to show in the textfields? ; NOTE: (there are duplicate items in the combobox!) EndSwitch WEnd Any toughs are welcome. I was thinking about using _GUICtrlComboBox_GetCurSel($Combo) and use that integer to refer to the index (dimension 1) of the array Thanks, TheAutomator
  3. Hey everyone, I'm curious if there is a way to incorporate a checkbox with a combo GUICtrl? so for instance I have a GUI that has a bunch of checkboxes that allow me to open certain programs as needed. (this is just some parsing of my code, sorry, noob here and not sure what the preferred method of displaying code is, please enlighten me) $L0742 = GUICtrlCreateCheckbox("L07 4.2", 110, 320, 100) $L07502 = GUICtrlCreateCheckbox("L07 5.0.2", 110, 350, 100) $GenComm = GUICtrlCreateCheckbox("GenComm", 110, 380, 100) $Templates = GUICtrlCreateCheckbox("Templates", 110, 410, 100) $MCT = GUICtrlCreateCheckbox("MCT", 110, 440, 100) $Desktop_Shortcuts = GUICtrlCreateCheckbox("Desktop Shortcuts by Tester", 110, 470, 200) ... Case $msg = $RunBtn RunPrograms() ... Func RunPrograms() if GUICtrlRead($L0742) = $GUI_CHECKED then Run("C:\Program Files\Varian\Paxscan\L07 Rel4.2\viva\viva.exe", "") if GUICtrlRead($L07502) = $GUI_CHECKED then Run("C:\Program Files\Varian\Paxscan\L07 Rel5\viva\viva.exe", "") if GUICtrlRead($GenComm) = $GUI_CHECKED then Run("\\Fpanelfs1\FPShared\Desktop_Shortcuts_by_Tester\Matt\CPI Generator\CPI Generator Windows 7 64 Bit\GenComm\GenComm.NET.exe", "") if GUICtrlRead($Templates) = $GUI_CHECKED then ShellExecute("\\Fpanelfs1\FPProjects\Documentation Controlled\Test_Templates") if GUICtrlRead($MCT) = $GUI_CHECKED then Run("\\Fpanelfs1\FPProjects\Documentation Controlled\Manufacturing Software\MCT\MCT.exe","") if GUICtrlRead($Desktop_Shortcuts) = $GUI_CHECKED then ShellExecute("\\Fpanelfs1\fpshared\Desktop_Shortcuts_by_Tester") EndFunc so i click some checkboxes, and hit a run button and the programs which are checked run, great. BUT i want to add a bunch of options under one checkbox. A combo that will list a bunch of versions of a program that can be opened. something like this... but I want that program to be part of a checkbox $ViVAComboBox = GUICtrlCreateCombo("L01 Rel 13", 110, 320, 100) GUICtrlSetData($ViVAComboBox, "L04|L05|L07 Rel 4.2|L07 Rel 5.0.2|L09", "L07 Rel 4.2") is this possible? is there another GUICtrl that does this better that i am not aware of?
  4. Hi all, I created a little script we use at work for inputing date and time stamps into our ticket system. Now I thought it would look nice in a Metro style GUI, I found an UDF on the forum what does almost everything I want. I have but one thing I can't seem to find and don't have the skills to create. The gui uses one pulldown menu (GUICtrlCreateCombo) it stays in the older looking style. I attached the script and files I have, also in the zip you find an example of what I am looking for. Hope you guys can help me Hotkey.zip
  5. I'm trying to use GUICtrlCreateCombo but I need it to get the list values from an excel spreadsheet column - that makes it dynamic. My method is to prompt for the Module name (this gives me the application to run the automation test) this also gives me the name of the folder that stores all the spreadsheets. 1.I then get the list of spreadsheet names and use that as input for another list (this can be select 1 or many or all - don't know which control to use...) 2.On selection I then go to the spreadsheets selected and display columns C, E from TestController tab in a further combo box to select 1 or many or all. 3. keep doing point 2 above until all selected in 1 are complete. I'm wondering if I just display as many combo boxes as items selected in point 1 or loop thru them somehow. Very complex for my little brain - any advice to simplify is greatly appreciated Joe Accounts_TestFlow.xls
  6. I need to find a way to after x amount of seconds set the Autoit gui's ComboBox to next option available, and if it reaches the end of the list start back at beginning. This way I can cycle through checking if users are connected to a network. The combo is populated via a recursive file search that contains folders with each connected user's username. The ComboBox will contain something like " username\config " for every connected user. So I need to make so it cycles through constantly every X seconds I have the gui functioning, and all that I just can't get this one part to work. TL:DR - How do I make so an AutoIt GUI ComboBox will cycle through all of its options every X seconds, and when it reaches bottom of options cycle back to top and continue the process again. Thanks! I can't post any code due to NDA sorry...
  7. Hi all, I am playing with a combo box. The code from help file is working. But the code i wrote is not working. Help file uses "_GUICtrlComboBox_Create" for creating combo box. But i used native "GUICtrlCreateCombo". Then i replaced my native combo creation function with the UDF. Then my code worked. I think the hi word and low word parameters are the problem. Here is my code. #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Local $sCMB_Items = "Apple|Orange|Mango|Banana|Grape" #Region ### START Koda GUI section ### Form= Global $hForm1 = GUICreate("Form1", 283, 188, 312, 166) Global $hCombo1 = GUICtrlCreateCombo("", 40, 48, 185, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetData($hCombo1, $sCMB_Items) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $hCombo1 Switch $iCode Case $CBN_DBLCLK ; Insert your code here MsgBox(0,"","$CBN_DBLCLK") Case $CBN_DROPDOWN ; Insert your code here MsgBox(0,"","$CBN_DROPDOWN") Case $CBN_EDITCHANGE ; Insert your code here MsgBox(0,"","$CBN_EDITCHANGE") Case $CBN_SELCHANGE ; Insert your code here MsgBox(0,"","$CBN_SELCHANGE") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMANDAnd this is the code from help file. Slightly modified. But working #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <WindowsConstants.au3> Global $g_hCombo Example() Func Example() Local $hGUI ; Create GUI $hGUI = GUICreate("(UDF) ComboBox Create", 400, 296) $g_hCombo = _GUICtrlComboBox_Create($hGUI, "", 2, 2, 396, 296) GUISetState(@SW_SHOW) ; Add files _GUICtrlComboBox_BeginUpdate($g_hCombo) _GUICtrlComboBox_AddDir($g_hCombo, "", $DDL_DRIVES, False) _GUICtrlComboBox_EndUpdate($g_hCombo) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func WM_COMMAND($hWnd, $iMsg, $wParam, $lParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode $hWndFrom = $lParam $iIDFrom = BitAND($wParam, 0xFFFF) ; Low Word $iCode = BitShift($wParam, 16) ; Hi Word Switch $hWndFrom Case $g_hCombo Switch $iCode Case $CBN_CLOSEUP ; Sent when the list box of a combo box has been closed MsgBox(0,"","$CBN_CLOSEUP") Case $CBN_DBLCLK ; Sent when the user double-clicks a string in the list box of a combo box MsgBox(0,"","$CBN_DBLCLK") Case $CBN_DROPDOWN ; Sent when the list box of a combo box is about to be made visible MsgBox(0,"","$CBN_DROPDOWN") Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box MsgBox(0,"","$CBN_EDITCHANGE") Case $CBN_EDITUPDATE ; Sent when the edit control portion of a combo box is about to display altered text Case $CBN_ERRSPACE ; Sent when a combo box cannot allocate enough memory to meet a specific request Case $CBN_KILLFOCUS ; Sent when a combo box loses the keyboard focus Case $CBN_SELCHANGE ; Sent when the user changes the current selection in the list box of a combo box MsgBox(0,"","$CBN_SELCHANGE") EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND For those who wants the au3 file; Here it is Code From help file.au3 My code.au3
  8. Hi I'm struggling to clear the display text of of a GUI control combo selection string. I would like to clear the selection like it is clear after it is populated, but not remove any items from the list. Here is a small example. #include <GuiComboBox.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> ; Create GUI $hgui= guicreate("Clear ComboBox Edit Text", 320, 200) $control_combo= guictrlcreatecombo("", 10, 10, 250, 20, $CBS_DROPDOWNLIST) $control_clear_button= guictrlcreatebutton("Reset Blank Combo Selection String", 10, 40, 200, 20) guisetstate() guictrlsetdata($control_combo, "a|b|c"); Populate Combo while 1 switch guigetmsg() case $control_clear_button guictrlsetdata($control_combo, ""); This clears the entire list frustrating me case $gui_event_close exitloop endswitch;guigetmsg() wend;main loopDoes anyone one know how I can reset the selection to "", clear, empty set?I've tried SetEditText but doesn't work CBS_DROPDOWNLIST. SOLVED: Sorry I thought I had tried this: _GUICtrlComboBox_SetCurSel($control_combo, -1) is the solution.
  9. Is it possible to have more than one combobox using _GUICtrlComboBox_AutoComplete with separate item lists? Say I wanted a GUI with two combo's, one with fruit (apple|orange|tomato) and one with vegetables (celery|Turnip|carrot) and wanted both of them to autocomplete. Is this possible? I like the way the _GUICtrlComboBox_AutoComplete example works, but I am having difficulties understanding the code :/ http://www.autoitscript.com/autoit3/docs/libfunctions/_GUICtrlComboBox_AutoComplete.htm my first attempt: #include <GuiComboBox.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Debug_CB = False ; Check ClassName being passed to ComboBox/ComboBoxEx functions, set to True and use a handle to another control to see it work Global $hCombo, $hCombo2 _Main() Func _Main() ; Create GUI GUICreate("ComboBox Auto Complete", 400, 296) $hCombo = GUICtrlCreateCombo("", 2, 2, 396, 296) GUICtrlSetData(-1, "Apple|Orange|Tomatoe") $hCombo2 = GUICtrlCreateCombo("", 2, 42, 396, 296) GUICtrlSetData(-1, "One|Two|Three") GUISetState() ; Add files ;~ _GUICtrlComboBox_BeginUpdate($hCombo) ;~ _GUICtrlComboBox_AddDir($hCombo, @WindowsDir & "\*.exe") ;~ _GUICtrlComboBox_EndUpdate($hCombo) GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ; Loop until user exits Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>_Main Func _Edit_Changed($hCombo) _GUICtrlComboBox_AutoComplete($hCombo) EndFunc ;==>_Edit_Changed Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) #forceref $hWnd, $iMsg Local $hWndFrom, $iIDFrom, $iCode, $hWndCombo, $hWndCombo2 If Not IsHWnd($hCombo) Then $hWndCombo = GUICtrlGetHandle($hCombo) If Not IsHWnd($hCombo2) Then $hWndCombo2 = GUICtrlGetHandle($hCombo2) $hWndFrom = $ilParam $iIDFrom = BitAND($iwParam, 0xFFFF) ; Low Word $iCode = BitShift($iwParam, 16) ; Hi Word Switch $hWndFrom Case $hCombo, $hWndCombo Switch $iCode Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box _Edit_Changed($hCombo) ; no return value EndSwitch Case $hCombo2, $hWndCombo Switch $iCode Case $CBN_EDITCHANGE ; Sent after the user has taken an action that may have altered the text in the edit control portion of a combo box _Edit_Changed($hCombo) ; no return value EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_COMMAND Func _DebugPrint($s_text, $line = @ScriptLineNumber) ConsoleWrite( _ "!===========================================================" & @LF & _ "+======================================================" & @LF & _ "-->Line(" & StringFormat("%04d", $line) & "):" & @TAB & $s_text & @LF & _ "+======================================================" & @LF) EndFunc ;==>_DebugPrint there must be an easier way..
  10. so my script was made to load drivers based on a selection from a combo box. i've created a VERY robust system to load drivers when imaging with wds or ghost using a winPE wim. WDS does not work correctly with injected drivers. so comes into play my script/program that loads from a winPE wim after wds loads. anyone knows WDS is pretty powerful but it does not always have proper drivers once the winPE loads. so my program loads drivers into winPE based on the model / device. so if we get a new model of laptop or desktop and we want to save up that image to wds we find 32bit drivers and we load them into my program. wds then in turn loads my winPE with my program set to autolaunch and presenting all these options. if winPE contained a generic driver then all is good. if not then we go through my list and usually one of the drivers does work but in case it doesn't we add to my list. that's just the pre-amble incase anyone asks what i'm doing. reminder that this has worked flawlessly for the better part of a year. but now with more devices it's getting cumbersome to manually edit my code, then compile, then mount edit and recompile the winPE wim and inject my autoit program into it. takes a maximum of 5 minutes but when you're constantly testing it gets VERY bad. here's a snippet of the array for the combobox. Local $aList[300][2] = [["___________", "___________"], _ ["ASUS", "ASUS"], _ ["HP Probook 4430s", "HP Probook 4430s"], _ ["Lenovo S10-3", "Lenovo S10-3"], _ ["Lenovo x200/x230", "Lenovo x200/x230"], _ so this populates a combo box that lists these entries. i use a case select to determine which box was selected. very manual editing when i need to add another device. Func selection() $sSel = GUICtrlRead($cb_platform) $iIndex = _ArraySearch($aList, $sSel) Select Case $iIndex = 1 ;~ ASUS $driver = (@scriptdir & "\drivers\hp32\Netrtl32.inf") $nothing = $option Case $iIndex = 2 ;~ HP Probook 4430s $driver = (@scriptdir & "\drivers\hp4430\hp86win7.inf") $nothing = $option Case $iIndex = 3 ;~ Lenovo S10-3 $driver = (@scriptdir & "\drivers\lenovos103\Netrtl32.inf") $nothing = $option EndFunc this is the part of the script which i'm trying to revamp. right now my script works very awesome for what we're doing. however i want it more streamlined. as you can see once a combobox selection is selected, then it goes to that CASE and populates those variables then it kicks down to a function that i have that continues either ghost or wds depending on a selected radio box. this is what i have now for the array for the combobox. $drivers_folder=_FileListToArray(@scriptdir & "\drivers\","*",2) $cb_platform = GUICtrlCreateCombo("",10,40,600,120,-1,-1) For $i=1 To Ubound($drivers_folder)-1 GUICtrlSetData($cb_platform,$drivers_folder[$i]) Next this populates the combox based on the folder i have with each individual device. instead of creating a long winded array. the problem i have now is i don't know how to make it load the driver within that folder without a case select. i was thinking maybe something that got the name of the folder selected, then appended a "*.inf" at the end to load. but i'm totally in the dark of how to do this. if you'd like me to post all my code to help, please let me know.
  11. I added a background image on my GUI and now the combo box is not displaying correctly until I click on it. Here is the code I am using With an added GuiCtrlCreate Pic just under the GUICreate() GuiCreate("Am I asleep?", 315, 740) GUICtrlCreatePic("path", 0,0,0,0) GuiCtrlSetState(-1, $GUI_DISABLE) Here are 2 screenshots of the the combo box. The first one is when it first loads then second one is when I click on it.
  12. Hello everybody! Just to demonstrate how to use a combobox like a context menu, maybe that's not very helpful... Sample: Download: ComboBoxContextMenu.au3 Hope you enjoy! Regards, João Carlos.
  13. Have tried below command, Iam unable to set the value. please help. ControlCommand("Energy Profile - Windows Internet Explorer","","[id:PQBBASICTYPE1]","SelectString", "Health Club") Title of the window= Energy Profile - Windows Internet Explorer ID of the object = PQBBASICTYPE1 One of the values in the drop down = Health Club Please see attached file for the attributes of the combo box.
  14. how get the content in the combo list items? how select a item in combo list programly?
×
×
  • Create New...