Jump to content

Accessing the ListView from another script


Recommended Posts

Hi all,

I have two scripts Script1 and Script2, where i will call Script2 in Script1.

In Script1 a ListView control is created which should be accessed by Script2.

How to pass the ListView control handle to another script.

Note: I have made ListView handle as Global.Still it doesn't work.

Please help me.

Link to comment
Share on other sites

Hi all,

I have two scripts Script1 and Script2, where i will call Script2 in Script1.

In Script1 a ListView control is created which should be accessed by Script2.

How to pass the ListView control handle to another script.

Note: I have made ListView handle as Global.Still it doesn't work.

Please help me.

I am posting the List View creation which is in SCript1 and also the function which is written in Script2

$ListView1 = GUICtrlCreateListView("|||", $dwidth - 280, 165, 209, $dheight - 300,$LVS_REPORT,BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT));Written in Script1

Func Write_Status($tcxrow, $lvrow);Written in Script2
    
    $ListView  = GUICtrlGetHandle($ListView1)
    $tcxcolumn = 6 ; The variabe to represent the column in testcases for IPSCA


    $readexcel3 = _ExcelReadCell($oExcelInput, $tcxrow, $tcxcolumn);Reading the 5th column in the in the above row of an excel sheet
    msgbox(0,"IPSCA Status",$readexcel3)
  _GUICtrlListView_AddSubItem($ListView, $lvrow, $readexcel3, 2, 2)

GUISetState()
EndFunc

Please Help...

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