New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
123 views

Tell me the function to search test in terminal emulator

Jump to solution
Hi all,

I would like to know the function to search a text in the terminal emulator screen.

The function should return the coordinates(row number and column number) of the text specified.

Thanks,
Uday.
0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
You can use the below code.

str_totalRow = TeWindow("TeWindow").TeScreen("TeScreen").RowCount

For i = 1 To str_totalRow
str_getText = TeWindow("TeWindow").TeScreen("TeScreen").GetText(i, 1, i)
If InStr(1, str_getText, , 1)>0 Then
str_row = i
str_column = InStr(1, str_getText, , 1)
Exit For
End If
Next

Thanks..
Arpan

View solution in original post

1 Reply
Highlighted
Absent Member.
Absent Member.
You can use the below code.

str_totalRow = TeWindow("TeWindow").TeScreen("TeScreen").RowCount

For i = 1 To str_totalRow
str_getText = TeWindow("TeWindow").TeScreen("TeScreen").GetText(i, 1, i)
If InStr(1, str_getText, , 1)>0 Then
str_row = i
str_column = InStr(1, str_getText, , 1)
Exit For
End If
Next

Thanks..
Arpan

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.