Jump to content
Nithila

Readonly textbox inside the listview not able to get the info and giving wrong value

Recommended Posts

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

Share this post


Link to post
Share on other sites

You need the handle to use _GUICtrlListView* functions.  It doesn't work with special definitions.  If that doesn't solve your issue, show the au3info tool information about this control.

Edited by Nine

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...