Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetItem
#1
Not Solved
Curremntly, I have been using:

Code:
hwndZip =  Window("text:=" & ZipDialogName & ".*").GetROProperty("hwnd")
SetobjWinListView = Window("hwnd:=" & hwndZip).WinListView("nativeclass:=SysListView32", "Location:=0")
Call objWinListView.WaitProperty("visible", "true", 10000)
objWinListView.Highlight
ItemCountZip =objWinListView.GetItemsCount

Where ItemCountZip  = 1
But when I use:
Code:
For PDFCount = 0 to ItemCountZip - 1
       PDFReportName = objWinListView.GetItem(PDFCount)

I get an error the SysListView32 is not recognized.

Error Message: Cannot identify the specified item of the [ SysListView32 ] object. Confirm that the specified item is included in the object's item collection.
Line (12):
Code:
"PDFReportName = objWinListView.GetItem(PDFCount)".


I have looked this up but I have read neo answer. am i using perhaps the wrohod?

thx
Reply
#2
Not Solved
Hello

I have some question or doubt in for condition.

For example PDFCount = 0 to ItemCountZip -1 for this formula ( start with 0 and end with 0) .

Now zero(0) will go to the PDFCount as getItem ...

that's can be problem.

For more help. Please let me know what is 0 Value and 1 value. if 0 have value then you will receive else not.

Modify code to ...remove the -1 and try to run..You will receive 2 out put..one is 0 and 1
Reply
#3
Not Solved
thx QTPScript for your time


There is only one selection with the SysListView32 area.

Using SysListView32, i cannot exactly pick the report that i need. From my reading/research the first opbject using SysListView32 is always 0 (zero).

I have tried PDFCount = 1 to ItemCountZip for this formula (start with 1 and end with 1) but this errors also.

L
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Operation happening while selecting "GetItem" Angel 2 5,799 01-04-2011, 01:28 PM
Last Post: rajeshwar

Forum Jump:


Users browsing this thread: 1 Guest(s)