Jump to content

Drop down selection not working properly


Recommended Posts

Hi Experts, 

i am new to Autoit, i need a help on following scripts,

i used the below script to select the option "NETWORK" from the drop down, but its selecting "RECORDS CORRECTION" as shown in below pic,

please suggest me to correct the errors if any...

ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]", "ShowDropDown")
Sleep(1000)
ControlSend("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]", "NETWORK")
sleep(1000)
ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:2]", "ShowDropDown")
sleep(1000)
ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:2]", "900-N/A")

image.png.57caf101b2a37865a39ebc4c8ec37491.png

Link to post
Share on other sites

Hi Zedna,

      Thanks for your quick reply, 

 Yes, you are right, i tried 

 

ControlSend("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]", "N")

its working fine now, its selecting "NETWORK" now...

but in further filter combos, i have more than 50 dropdowns list, from that list,how can i select particular dropdown....any idea?

image.png.02e32bd98bb18f83528e77a03733eeeb.png

Link to post
Share on other sites

now again the same problem, i just tried this code,it opens dropdown but remains in NETWORK...

Dont know, where i made mistake :(

ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]", "ShowDropDown")
Sleep(1000)
ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]","R")
sleep(1000)
ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:2]", "ShowDropDown")
sleep(1000)
ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:2]", "510")

 

Link to post
Share on other sites
6 hours ago, amb2301 said:

Please help me on this topic

 

Maybe if you could make a runable snippet of your problem, more ppl will be incited to help you. What do you think ?

Link to post
Share on other sites

runable snipnet? please give me any example script...that selects a string from dropdown button.......

i will try to learn with that script, please someone help me on this topic as its urgent 

 

Edited by amb2301
update
Link to post
Share on other sites

Try if _GUICtrlComboBox_GetList() works with your "nonstandard ClassName" control.

If answer is YES then you can get all entries from list and you can try to use send desired precise number of "arrow down" keys in opened list.

 

Also look at all functions in ...\Include\GuiComboBox.au3 ...

Edited by Zedna
Link to post
Share on other sites
On 12/19/2019 at 5:48 PM, amb2301 said:

ControlCommand("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]","R")

You've left out the "SelectString" parameter, and I'm not sure this command was designed to work like this.

You could also try something like this --

$hCombo = ControlGetHandle("Job Creation", "", "[CLASS:SNET$combobox;INSTANCE:1]")
_GUICtrlComboBox_SelectString($hCombo, "Network")

 

Link to post
Share on other sites
  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...