Jump to content

Recommended Posts

Posted

I am trying to get the text inside listview inside an edit,which is read only.

image.png.59bfb0544b25d999c07108c58d5b7f1d.png

I am trying to get item number.

AutoItSetOption("MouseCoordMode",0)
   WinWait("SAMLTD - P/O Receipt Entry")
   WinActivate("SAMLTD - P/O Receipt Entry")
   MouseClick("primary",307,392,2)
   Sleep(3000)
   ControlClick("SAMLTD - P/O Receipt Entry", "", "[CLASS:AccpacEDIT; INSTANCE:2]",2)
   $Text=ControlGetText("SAMLTD - P/O Receipt Entry", "", "[CLASS:AccpacEDIT; INSTANCE:2]")
   MsgBox(0,"itemid",$Text)

The output I am getting is 

image.png.18690a6fbf8ed9e985a00b8e3e6ea885.png

And I have tried to get all items to an array as well using below code.

$aItem = _GUICtrlListView_GetItemTextArray("[CLASS:ATL:SysListView32;INSTANCE:3]",1)

;$arr = WinGetText("SAMLTD - P/O Receipt Entry")

_ArrayDisplay($aItem)

The output is

image.png.618aab0acf4e0419c20e4c1a3154dfca.png

 What am I doing wrong

Posted (edited)
Posted (edited)

Zedna

I tried with your code the below is the output

WinWait("SAMLTD - P/O Receipt Entry")
 WinActivate("SAMLTD - P/O Receipt Entry")
 $hLV = ControlGetHandle("SAMLTD - P/O Receipt Entry","","[CLASS:ATL:SysListView32;INSTANCE:3]")
 $aItem = _GUICtrlListView_GetItemTextArray($hLV,1)
 _ArrayDisplay($aItem)

image.png.33d93429cc494579cfc71341ffc21814.png

 

 

 

Edited by Nithila
change output
Posted (edited)

Zedna, 

Ok If so what could be the solution. How else I can achieve it.I need the data inside listview inside read only edit.As you can see in my question the below code is not giving the output as well.

ControlClick("SAMLTD - P/O Receipt Entry", "", "[CLASS:AccpacEDIT; INSTANCE:2]",2)
$Text=ControlGetText("SAMLTD - P/O Receipt Entry", "", "[CLASS:AccpacEDIT; INSTANCE:2]")

I can get Output from normal edit(text box) inside the same listview. Not from read only textbox. Are there any alternatives to get text from read only textbox.

Edited by Nithila

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...