I am wondering if there is any way to make this UDF act more like JavaMonkey than JavaFerret. I have already asked this in a different thread, but it seems to not get a lot of play lately; so I thought I would come right to the source (
).
The reason I ask is that I am trying to retrieve a list that is bigger than the viewing window and place into an Excel CSV file. I have rigged up a shaky Pixel color reference Do... Until that notes if there is a scroll bar and goes until it can no longer click to go any lower. Then it reads the info to an array to separate the uniques from the repeats, pastes those into the CSV and saves for another associate to review.
I am hoping that there will be a way to grab ALL the info from a control (i.e. - How the info is listed in JavaMonkey) someday soon as this would really help me out.
; =======================================================================================================================
; ------ Select the License tab -----------------------------------------------------------------------------------------
WinWait("AGENT")
$Agent = WinGetHandle("AGENT")
_JavaAttachAndWait($Agent)
WinActivate($Agent)
WinSetState($Agent, "", @SW_MAXIMIZE)
Do
Mouseclick("left", 1266, 81)
$sTabState1 = _JavaObjPropertyGet("", "License", "page tab", "", "States")
Until $sTabState1 = "enabled,focusable,visible,showing,selectable,selected"
$sTabState2 = _JavaObjPropertyGet("", "License List", "page tab", "", "States")
; =======================================================================================================================
; ------ Get the License info -------------------------------------------------------------------------------------------
For $i1 = 1 To 50
$sLabel1 = _JavaObjPropertyGet("", "", "label", $i1, "Name")
$sLabel2 = _JavaObjPropertyGet("", "", "label", $i1, "Role")
_ExcelWriteCell($oExcel, $sLabel1, $i1, 1)
If $sLabel2 <> "label" Then ExitLoop
Next
WinActivate($Agent)
$iPixel = Hex(PixelGetColor(1206, 927), 6)
; Sets $iPixelY to 167
$iPixelY = 167
If $iPixel <> "FFFFFF" Then
Do
Do
$iPixelHex = Hex(PixelGetColor(1206, $iPixelY), 6)
$iPixelY = $iPixelY+9
Until $iPixelHex = "CCCCCC"
$iPixelY = $iPixelY-9
If $iPixelY < 927 Then
Mouseclick("left", 1206, $iPixelY)
Sleep(1000)
Else
Mouseclick("left", 1206, 927)
Sleep(1000)
EndIf
For $i2 = 1 To 50
$sLabel1 = _JavaObjPropertyGet("", "", "label", $i2, "Name")
$sLabel2 = _JavaObjPropertyGet("", "", "label", $i2, "Role")
_ExcelWriteCell($oExcel, $sLabel1, $i2+$i1, 1)
If $sLabel2 <> "label" Then ExitLoop
Next
Until Hex(PixelGetColor(1206, 928), 6) = "666699"
EndIf
; =======================================================================================================================
; Saves and closes the Excel spreadsheet
_ExcelBookSaveAs($oExcel, @DesktopDir & "\JAVARead", "csv", 0, 1)
_ExcelBookClose($oExcel, 1, 0)
Exit