Search the Community
Showing results for tags 'dropdown'.
-
Hi Forum, I am struggling to select an IP address from "Server Interface" dropdown (ComboBox2) of tftpd32 client. tftpd32 is a TFTP server - TFTPD32 : an opensource IPv6 ready TFTP server/service for windows : TFTP server (pagesperso-orange.fr) The IP addresses (and the associated interfaces) are dynamic in ComboBox2. What I want to do is to select an item from ComboBox2 which contains a given IP address (eg. 192.168.2.1) - (which is hidden in the picture as it is at the bottom of the list) and fill the edit field with the selection. (Note : the ComboBox items contain the IP address and the Interface name, therefore IP address is just a part of the item) I am not sure whether functions such as _GUICtrlComboBox_SelectString() are only to be used with Autoit generated ComboBoxes. Please help !!!! My code below, it does not select the ComboBox2 item with my IP address 192.168.2.1. Local $hWnd=ControlGetHandle("Tftpd32 by Ph. Jounin", "", 4008) Sleep(100) ControlFocus("Tftpd32 by Ph. Jounin", "", $hWnd) Sleep(100) Local $IP = "192.168.2.1" _GUICtrlComboBox_SelectString($HWnd, $IP) ComboBox2 ID = 4008
- 21 replies
-
Hi, I am trying to select a value from a drop-down (highlighted in the attached image). There is no control ID associated with the window, so I am unable to use the Control* type functions. There are two values starting with 'C' in the drop-down. I tried fetching the drop-down value by passing Send("{custom}") but it always selects the first occurrence of value starting with 'C'. Please suggest how may I resolve this. Thanks!
-
Hello. For a project of a tool, I have to launch a program. This one: Display Properties control (run desk.cpl) I have to resize it, so we can see what's necessary. I'm getting there. The problem is that there is a drop-down menu: so I want to disable it. How to do this? I already did a test with the notepad. By deactivating the "close" button. Here is the code: Run("Notepad.exe") WinWait("[CLASS:Notepad]") $Hwnd = WinGetHandle("[CLASS:Notepad]") $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $Hwnd, "int",0) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF060, "int", 0x0);SC_CLOSE MsgBox(0,'',1) $menu = DllCall("user32.dll","hwnd","GetSystemMenu","hwnd", $Hwnd, "int",1) DllCall("user32.dll", "int", "RemoveMenu", "hwnd", $menu[0] , "int", 0xF060, "int", 0x0);SC_CLOSE I would like to do the same, but with the drop-down menu (with DllCall). Is it possible to disable / block (or other) the drop-down menu of a program? Thank you for your answers. Sincerely, Thomas.
- 4 replies
-
- dropdown
- external window
-
(and 1 more)
Tagged with:
-
Autoit team are assbags. They want to hold out that they are soooo much smarter than everyone else and they really don't want to help anyone with their questions. In that case then why have a website. Oh i know, they get their kicks out of laughing at everyone.
-
Hello, I have been reading every tutorial and help document I can find trying to figure out how to capture from a website the content of a dropdown in order to populate it into a GUI with checkboxes to run some code based off of the selections... I would like a script to read the options from this form-group and populate a gui. I have all the code written except this part, as of now I have to manually pull this from the site and dump into my code but it changes from time to time so I would like my code to be more flexible... Hope this makes sense?
-
Hello Guru's, I'm trying to write an autoit script to select from the dropdown list as you see in the attached picture. I read the help page for _IEFormElementOptionSelect, but I cannot grasp how to correlate that with the source code that I'm seeing. any suggestions?
-
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? Joe multi-new.au3
-
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[0] 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 Thanks!
-
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") <table cellspacing="0" class="rgMasterTable" id="cphBody_rgdModelDrawing_ctl00" style="width:100%;table-layout:auto;empty-cells:show;"> <colgroup> <col /> <col /> <col /> <col /> <col style="width:45px" /> <col style="width:30px" /> </colgroup> <thead> <tr> <th scope="col" class="rgHeader"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$cphBody$rgdModelDrawing$ctl00$ctl02$ctl01$ctl01','')">Model</a></th><th scope="col" class="rgHeader"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$cphBody$rgdModelDrawing$ctl00$ctl02$ctl01$ctl02','')">Drawing</a></th><th scope="col" class="rgHeader"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$cphBody$rgdModelDrawing$ctl00$ctl02$ctl01$ctl03','')">Station Number</a></th><th scope="col" class="rgHeader"><a title="Click here to sort" href="javascript:__doPostBack('ctl00$cphBody$rgdModelDrawing$ctl00$ctl02$ctl01$ctl04','')">Sort Order</a></th><th scope="col" class="rgHeader"> </th><th scope="col" class="rgHeader"> </th> </tr><tr class="rgFilterRow"> <td style="white-space:nowrap;"> <div id="cphBody_rgdModelDrawing_ctl00_ctl02_ctl02_rcbModel" class="RadComboBox RadComboBox_Default" style="width:200px;"> <table summary="combobox" style="border-width:0;border-collapse:collapse;table-layout:fixed;width:100%"> <tr class="rcbReadOnly"> <td style="margin-top:-1px;margin-bottom:-1px;width:100%;" class="rcbInputCell rcbInputCellLeft"><input name="ctl00$cphBody$rgdModelDrawing$ctl00$ctl02$ctl02$rcbModel" type="text" class="rcbInput" id="cphBody_rgdModelDrawing_ctl00_ctl02_ctl02_rcbModel_Input" value="All" style="display: block;" readonly="readonly" /></td> <td style="margin-top:-1px;margin-bottom:-1px;" class="rcbArrowCell rcbArrowCellRight"><a id="cphBody_rgdModelDrawing_ctl00_ctl02_ctl02_rcbModel_Arrow" style="overflow: hidden;display: block;position: relative;outline: none;">select</a></td> </tr> </table> <div class="rcbSlide" style="z-index:6000;"><div id="cphBody_rgdModelDrawing_ctl00_ctl02_ctl02_rcbModel_DropDown" class="RadComboBoxDropDown RadComboBoxDropDown_Default " style="float:left;display:none;"><div class="rcbScroll rcbWidth" style="height:200px;width:100%;"><ul class="rcbList" style="list-style:none;margin:0;padding:0;zoom:1;"><li class="rcbItem ">All</li><li class="rcbItem ">019-208-17-3Y</li><li class="rcbItem ">019-208-17-6Y</li><li class="rcbItem ">124-ATR-3/0-L10</li><li class="rcbItem ">124-ATR-3/0-L10M</li><li class="rcbItem ">124-ATR-3/0-L10S</li><li class="rcbItem ">124-ATR-3/0-L13</li><li class="rcbItem ">124-ATR-3/0-L15</li><li class="rcbItem ">124-ATR-3/0-L15M</li><li class="rcbItem ">124-ATR-3/0-L15S</li><li class="rcbItem ">124-ATR-3/0-L18</li><li class="rcbItem ">124-ATR-3/0-L20</li><li class="rcbItem ">124-ATR-3/0-L25</li><li class="rcbItem ">124-ATR-3/0-L30</li><li class="rcbItem ">124-ATR-4/0-L10</li><li class="rcbItem ">124-ATR-4/0-L13</li> .....there are thousands of these parts, listed like this. then at the end of the li tag list.... <script type="text/javascript"> function ModelIndexChanged(sender, args) { var tableView = $find("cphBody_rgdModelDrawing_ctl00"); tableView.filter("ModelDrawing_ModelID", args.get_item().get_value(), "EqualTo"); } </script> 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
- 10 replies
-
- autoit
- internet explorer
-
(and 1 more)
Tagged with:
-
Hi, 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. For example: 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: #include <GUIConstantsEx.au3> ; Here is the array Global $aArray[6] = ["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] Next ; Create a GUI #include <GUIConstantsEx.au3> $hGUI = GUICreate("DropDown", 500, 500) ; Create the combo $hCombo = GUICtrlCreateCombo("", 10, 10, 200, 20) ; And fill it GUICtrlSetData($hCombo, $sList) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Any idea how to start on this one... thanks upfront
-
I was just going to make a GUI for the creation of a Youtube Channel, but I can't figure out how to select an Item from the Dropdownlist on this page: https://www.youtube.com/create_channel?action_create_new_channel_redirect=1 I think you have to be logged in with a Google Account, this is the important part (I think it is) from the Code: <span id="PlusPageCategoryHolder" > <select id="PlusPageCategory" name="PlusPageCategory"> <option value="" >Kategorie auswählen</option> <option value="BRAND" >Produkt oder Marke</option> <option value="COMPANY" >Unternehmen, Einrichtung oder Organisation</option> <option value="ENTERTAINMENT" >Kunst, Sport oder Unterhaltung</option> <option value="OTHER" >Sonstiges</option> </select> </span>EDIT: I just noticed if I select ENTERTAINMENT Option (= "Kunst, Sport ...") the HiddenPlusPageCategory seems to look like that: <input value="ENTERTAINMENT" id="HiddenPlusPageCategory" name="PlusPageCategory" type="hidden">But I can't change it like this: $oIE = _IECreate("https://www.youtube.com/create_channel?action_create_new_channel_redirect=1", 0, 1, 1, 0) $oDropDown = _IEGetObjById($oIE, "HiddenPlusPageCategory") _IEFormElementSetValue($oDropDown, "ENTERTAINMENT")
-
- ie
- internet explorer
-
(and 2 more)
Tagged with:
-
Hi! So what I need is a context menu like that from explorer when you right click on desktop. But i don't know if that is possible. I searched a little and I found nothing, maybe you guys have any ideas ? I mean something like that : But...I know how do that from the GUIcreateblahblah side...now the problem is that I want to do that without GUI! Like: if _IsPressed( "02", "user32.dll" ) then _Context(..) endif Please help!
- 1 reply
-
- dropdown list
- dropdown
-
(and 4 more)
Tagged with:
-
I've read many discussions in this forum that relate to that question, but I haven't found anything that answers my questions (for example, several threads relate to self-built AutoIt GUI scripts, but I just want to automate any of a number of already-existing third-party apps). I know that those trying to help us newbs prefer concrete code examples, and I will provide such next. But please keep in mind I want to know how to do this in any general case, not just this specific example. Here, I'm attempting to select the "Compare files" menu item in the "Actions" menu of a third-party app, as follows: $L_Stat = WinMenuSelectItem( $Cmy_AppTitle, "", "&Actions", "Comp&are files" ) (The menu item name shows the letter "a" in "Compare" to be underlined, so I inserted the "&" as instructed) As you can see, I tried using WinMenuSelectItem(), but that call returned an error ($L_Stat was 0). I also tried it without the ampersand in the menu item text, but although that didn't return an error, it also had no effect at all. However, as the Remarks section in the help file notes: WinMenuSelectItem() will only work on standard menus. Unfortunately, many menus in use today are actually custom written or toolbars "pretending" to be menus. Question 1: How can I know whether any arbitrary app uses standard menus or fake ones? Naturally, I tried running Au3Info.exe, but I couldn't find any way to use it to get any information at all about menu items using the Finder Tool. Question 2: Is there any way to use Au3Info.exe to show all the class and other detailed info about menus and all menu items, whether they're standard or simulated (fake)? When I tried using the Finder Tool, no menus would ever drop down so I could examine their elements. If I could discover all that info, perhaps I could try to use the ControlCommand() function, but even then I can't quite determine what arguments I should use for that function. I believe that function needs much better and more thorough documentation of how it should be used... Question 3: How the heck is one supposed to figure out what argument values to use with ControlCommand()? For example, on that function's documentation page (http://www.autoitscript.com/autoit3/docs/functions/ControlCommand.htm), under the heading "Command, Option", one entry reads: "ShowDropDown", "". To me, that means that the second parameter, "Option", must always be an empty string, so how on earth is one supposed to specify which dropdown menu to bring down? But perhaps that's not the correct way to begin to select a menu item with a fake (non-standard) menu. Question 4: What IS the correct way to select any arbitrary menu item in any arbitrary third-party (non-AutoIt) application when the app uses non-standard (fake) menus? And how do I determine what argument values to use? I'm sorry for the long post, but as I indicated initially, I'm a newbie with no good idea what the correct way to do these things are. Thanks for your patience! (I'm using AutoIt v3.3.10.1 under 32-bit Windows XP Pro/SP3)
-
Hi, I've created a custom tool for use in a Windows PE enviroment. Because of the number of buttons in use in de UI, I've planned on using the splitbutton in de UI. When I test the script under Windows, the button works perfectly, but when the button is tested under Windows PE, de button appears correctly (with dropdown arrow), but no dropdown menu is showing when the button is pressed. Is there a special requirement for this dropdown menu, that is not available under Windows PE? It's a Windows PE 3.1 (Win Vista/7) enviroment, so I think it should work. Code for the button: $doPC = _GUICtrlButton_Create($main, "Computer -> ", 255, 285, 90, 25, $BS_SPLITBUTTON) ;==> Create knop ;==> Code from Autoit site Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $wParam Local Const $BCN_HOTITEMCHANGE = -1249 Local $tNMBHOTITEM = DllStructCreate("hwnd hWndFrom;int IDFrom;int Code;dword dwFlags", $lParam) Local $nNotifyCode = DllStructGetData($tNMBHOTITEM, "Code") Local $nID = DllStructGetData($tNMBHOTITEM, "IDFrom") Local $hCtrl = DllStructGetData($tNMBHOTITEM, "hWndFrom") Local $dwFlags = DllStructGetData($tNMBHOTITEM, "dwFlags") Local $sText = "" Switch $nNotifyCode Case $BCN_DROPDOWN _Popup_Menu($hCtrl) Case $BN_PUSHED _Popup_Menu($hCtrl) EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==> WM_NOTIFY Func _Popup_Menu($hCtrl) Local $hMenu Local Enum $idReboot = 1000, $idShutdown, $idInfo $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_InsertMenuItem($hMenu, 0, "Herstarten", $idReboot) _GUICtrlMenu_InsertMenuItem($hMenu, 1, "Afsluiten", $idShutdown) Switch _GUICtrlMenu_TrackPopupMenu($hMenu, $hCtrl, -1, -1, 1, 1, 2) Case $idReboot ;~ Shutdown(6) Exit Case $idShutdown ;~ Shutdown(13) Exit EndSwitch _GUICtrlMenu_DestroyMenu($hMenu) EndFunc ;==> _Popup_Menu
-
- WinPE
- splitbutton
-
(and 1 more)
Tagged with:
-
Hey everyone, I am trying to make a combo box with which the user cannot edit the contents, like the dropdown from the image below. The problem is though, that I have tried $CBS_DROPDOWN and that makes no change. Infact, no styles are making any changes to my dropdown box. I have ensured that I have attached the correct include file (ComboConstants.au3) and I get no errors. I recently installed the most recent release of AutoIT, and I am unsure as to whether this is when the problem started (I rarely use combo boxes) but I am quite sure that it worked properly in one of my older scripts. Can anybody help? Thanks.