Jump to content

truble to select combobox text


 Share

Recommended Posts

hello all i am new in auto it  i am   facing  problem   to select text  from combo box  in trading terminal 

 i am using these code but not work for me 

auto.ControlSend("title of window", "", "[CLASS:ComboBox; INSTANCE:6]","Symbol Name");

 

 

char.jpg

Link to comment
Share on other sites

4 hours ago, faustf said:

for help is much  better if  you send code and also application (want automate)

 

acctuly i  automate nest  application and i am using  this code to select symbol name  from combo box using c# 

 auto.ControlSend("title of window", "", "[CLASS:ComboBox; INSTANCE:6]", "TCS");(not working it add symbol text front  of 1 name in combo box )

instead of same code i am able to select option  from another combo box but not in symbol  using this code 

auto.ControlSend("title of window, "", "[CLASS:ComboBox; INSTANCE:3]", "LIMIT");(work fine  for me)

 

 

Link to comment
Share on other sites

According to my previous post: In your c# application you can do this:

Func _GUICtrlComboBox_SelectString($hWnd, $sText, $iIndex = -1)
    If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)

    Return _SendMessage($hWnd, $CB_SELECTSTRING, $iIndex, $sText, 0, "wparam", "wstr")
EndFunc   ;==>_GUICtrlComboBox_SelectString

 

Edited by Zedna
Link to comment
Share on other sites

On 29/11/2018 at 9:18 PM, Zedna said:

According to my previous post: In your c# application you can do this:

Func _GUICtrlComboBox_SelectString($hWnd, $sText, $iIndex = -1)
    If Not IsHWnd($hWnd) Then $hWnd = GUICtrlGetHandle($hWnd)

    Return _SendMessage($hWnd, $CB_SELECTSTRING, $iIndex, $sText, 0, "wparam", "wstr")
EndFunc   ;==>_GUICtrlComboBox_SelectString

 

I just confuse becoz when 2 combo box I get hand and select value using same code  then what is the problem in 3rd one to automate nest trader

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...