I'm trying to read an excel spreadsheet(SWW_TestFlow, Worksheet=Controller) and creating a dropdown list from all the cell values within a specific column("G").
I would like to have the dropdown behave in such a way as to allow multiple selections and for all those selections to be written to a file.
I attached a file I started with to experiment with gui and controls etc but got totally lost.......
Can somebody help me?
I've never worked with an array or dropdown menu before and I can't seem to wrap it around my head this morning. Maybe I just need more coffee but I'm trying to populate a GUI dropdown menu with section names of a .ini file. Here is what I have for this part but I don't know where to go from here. The msgbox thing was only testing it but I kinda got stuck here.
local $aSectionnames = IniReadSectionNames(@DesktopDir & "\Scripts\BatteryConfig.ini") if Not @error Then For $i = 1 to $aSectionnames MsgBox($MB_SYSTEMMODAL, "Test", $aSectionnames[$i]) Next EndIf
Here is my very basic dropdown menu I want to populate
#include <ButtonConstants.au3> #include <ComboConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 413, 213, 192, 124) $Combo1 = GUICtrlCreateCombo("Combo1", 80, 24, 241, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL)) $Button1 = GUICtrlCreateButton("Button1", 152, 56, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
I was working with an intranet site today and there is a huge combo box that you can click on where it says "All", underneath 'Model' (Capture.png). After selecting a model, there are numerous lines to choose from that do other things, which I can work with perfectly well. I have to deal with other pages similar to this one, but on this particular page the only "firing" event is the choice of the dropdown menu.
Here is the source for that particular field: (The id we care about is "cphBody_rgdModelDrawing_ctl00_ctl02_ctl02_rcbModel")
I am able to read and write to the dropdown using either _IEGetFormCollection (by index because the page always has the same input indices) or _IEGetObjectById, and then using _IEFormElementSetValue. What I cannot seem to do is to use the "child" method whereby one would address the list object by using _IEFormGetCollection. That returns an error code of either 7 or 2 (it's been a long day. I forget which)
The problem with writing to the dropdown with setValue is that the form doesn't fire after you change the list box. In fact, it won't even fire if a user clicks on it, then hits return. It is only by changing the value manually and then changing it again that you can get the part number that you want to display as it should.
How should one go about selecting the dropdown value that would allow the page to fire as it should?
;this works but doesn't fire - I use formCollection because there are other things that I have to use fields for in this document and the indices don't change Local $oForm = _IEFormGetCollection($oIE, 0) $modelTextBox = _IEFormElementGetCollection($oForm, 7) _IEFormElementSetValue($modelTextBox, $chargerPartNumber)
I can't seem to figure out how to select Category and Sub-Category with autoit from a Dropdown in IE.
I am building this for a private site so I will be unable to give you a link to it, however I have found a form online that is almost exactly the same as the one I am using... Here is the link to it: https://www.ksl.com/index.php?nid=1126
I need to somehow select a Category and Sub-Category... the site I will be using it on has quite an extensive list for Categories and Sub-Categories so I will need to be able to make sure it is working periodically and posting to the correct categories... "Am building an auto blogger type of software for private use Pls let me know if this is against forum rules!"
In advanced Thank You for all of your help!
"P.S. This is part of the code I have figured out so far... (You will have to login to see the form I am talking about...)
;Set category! $cat = _IEGetObjById($ie, "cat") ;Set subcategory! $subcat = _IEGetObjByID($ie, "subcat") ;Time to submit the form! $oButtons = _IETagnameGetCollection($ie, "input") For $oButton in $oButtons If String($oButton.value) = "Submit" Then _IEAction($oButton, "click") MsgBox("Success", "Button Clicked", "Next Step!") ExitLoop Else MsgBox("Failed", "The Button " & $oButton & "Does Not Have The Value", "Try Again!") EndIf Next
I just started recently with AutoIT and I am trying to make two dropdownlists where the selectable values of the second dropdownlist will be depending on what is selected on the first one.
Dropdown 1 Dropdown 2
xxx => 01-15 ("01" , "02" ,"03" , ...)
yyy => a - f ("a" , "b" ,"c" ,"d" ,"e" ,"f" )
zzz => "new", "old", "spare"
I started with this code that I've found in this Forum:
; Here is the array
Global $aArray = ["SORT", "PCM", "UNIF", "KKE", "GMS", "CDY"]
; And here we get the elements into a list
$sList = ""
For $i = 0 To UBound($aArray) - 1
$sList &= "|" & $aArray[$i]
; Create a GUI
$hGUI = GUICreate("DropDown", 500, 500)
; Create the combo
$hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20)
; And fill it
Any idea how to start on this one...