Jump to content

Send/Receive data from external listview


Monica
 Share

Recommended Posts

Hi guys!! I'm going crazy... please help me -.- :)

First, open the attached screenshot. Second: I'd like to grab info from external window. The program is "Metatrader4", a tool for trading and charts analysis.

The function _GUICtrlListView_GetItemText() return an empty string! I tried to change the index $index (the second parameter) into Number($index), as recommended by other similar posts in this forum, but this did not solve my problem :sweating:

Well, why I'm going mad? Because in my mind an UDF approach works great or it does not work at all; instead, in my code something works and something else does not. I really don't understand why... and you?

THXX!!!! :) 

$handle=ControlGetHandle("Expert - "&$expertname,"",1383);List: Variable|Value
For $i=0 To _GUICtrlListView_GetItemCount($handle)-1;WORKS!!!
    $temp=_GUICtrlListView_GetItemText($handle,0+$i);RETURN EMPTY STRING :-(
    MsgBox(0, "", $temp)
    $temp = _GUICtrlListView_GetItemSelected($handle,$i);WORKS!!!
    MsgBox(0, "", $temp)
Next

 

Immagine.png

Link to comment
Share on other sites

On ‎17‎/‎12‎/‎2017 at 3:01 AM, jdelaney said:

What about if you include the third parameter 'sub item'...maybe getting each value independently will work.

Hi jdelaney,

not work for me :-( the 3d param is 0 if omitted; i try with 1,2,3... the getText string is empty :sweating:

Not a lucky question :D but i really don't understand this behavior. The child item is recognized but fewUDF functions does not work properly. Another idea? :blink::)

Thanks, M.

Link to comment
Share on other sites

well...if *_getitemselected works, you can loop through selecting each and calling that...either that or just trying each _guictrllistview* function until you get your result is all I can tell you.

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

  • 1 month 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
 Share

×
×
  • Create New...