自定义Class类注入测试对象

'***********************************************************'
'脚本名称:自定义Class类注入测试对象
'脚本功能:归类SwfTable对象常用基本方法
'编写日期:2014/01/10
'***********************************************************'
Class customSwfTable
 Private oSwfTable,rowNum,columnNum
 Public property set item(pObject)
  Set oSwfTable=pObject
 End Property
 
 Public property let item(pObject)
  Set item=oSwfTable
 End Property 
 '取Text属性
 Function GetText()
  GetText=oSwfTable.GetROProperty("text")
 End Function
 '取hwnd属性
 Function GetHWND()
  GetHWND=oSwfTable.GetROProperty("hwnd")
 End Function
 '取visible属性
 Function GetVisible()
  GetVisible=oSwfTable.GetROProperty("visible")
 End Function
 '取height属性
 Function GetHeight()
  GetHeight=oSwfTable.GetROProperty("height")
 End Function
 '取width属性
 Function GetWidth()
  GetWidth=oSwfTable.GetROProperty("width")
 End Function
 '取focused属性
 Function GetFocused()
  GetFocused=oSwfTable.GetROProperty("focused")
 End Function
 '取abs_y属性
 Function GetAbs_y()
  GetAbs_y=oSwfTable.GetROProperty("abs_y")
 End Function
 '取abs_x属性
 Function GetAbs_x()
  GetAbs_x=oSwfTable.GetROProperty("abs_x")
 End Function
 '取x属性
 Function GetX()
  GetX=oSwfTable.GetROProperty("x")
 End Function
 '取y属性
 Function GetY()
  GetY=oSwfTable.GetROProperty("y")
 End Function
 '取FocusedRow
 Function GetFocusedRow()
  GetFocusedRow=oSwfTable.Object.FocusedView.FocusedRowHandle
 End Function
 '取RowCount
 Function GetRowCount()
  GetRowCount=oSwfTable.RowCount
 End Function
 '表示Menu
 Function ShowMenu()
  oSwfTable.Click 1,1,micRightBtn
 End Function
 'SelectRow
 Function SelectRow(rowNum)
     oSwfTable.SetView ""
  oSwfTable.SelectCell rowNum,1
 End Function
 '表示指定Cell的Menu
 Function ShowCellMenu(rowNum,columnNum)
  oSwfTable.SetView ""
  oSwfTable.SelectCell rowNum,1
  WaitCursorDefault oSwfTable
  Dim x,y
  x=oSwfTable.GetCellProperty(rowNum,columnNum,"x")
  y=oSwfTable.GetCellProperty(rowNum,columnNum,"y")
  oSwfTable.Click x,y, micRightBtn
 End Function
End Class

Function cSwfTable(pObject)
   Set cSwfTable=nothing
   Set cSwfTable=new customSwfTable
   Set cSwfTable.item=pObject
End Function
RegisterUserFunc "SwfTable", "Extend", "cSwfTable", True

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值