RichEditBoxICW "0","ENTER","=>","T","From date:"
wait 1
RichEditBoxICW "0","ENTER","Through","T^20","Through date:"
wait 1
RichEditBoxICW "0","ENTER","No=>","N","Do you want to queue this activity?"
'***********************************
'* RICHEDITBOX
'**********************************
'************************
'* ICW
'* @Documentation Used to perform valid actions on RichEdit objects.
'************************
Function RichEditBoxICW(index,action,lineText,valueToEnter,comment)
On Error Resume Next
'*****************************************
' SET OR PATH BASED ON ENV
'*****************************************
set strICWPath = Browser("CF").Page("CF").Frame("WorkSpace").SwfObject("IEController")
strParse = strings("PARSE",valueToEnter,"LEFT","","") 'this would return False string does not contain ^
Select Case UCASE(action)
Case "ENTER"
intXY = getTextXY(lineText)
arrXY = Split(intXY,"^")
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Click arrXY(0),arrXY(1)
If strParse = "False" Then
Reporter.Filter = rfEnableAll
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type micRight
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type valueToEnter
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type micReturn
strReportMsg = "ENTERED ->" & valueToEnter
ELSE
strEnterValue = geString("PARSE",strValueToEnter,"LEFT","","")'Get Value to Enter
strRightCount = geString("PARSE",strValueToEnter,"RIGHT","","")'Get # of right keys to press before entering text
for nTabs = 1 to strRightCount
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type micRight
next
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type strEnterValue
strICWPath.WinObject("regexpwndclass:=RichEdit20A").Type micReturn
strReportMsg = "ENTERED ->" & strEnterValue
end select
End Function
'---------------------------------------------------------
'@Function Name: getTextXY
'@Documentation Return X and Y coordinates of text
'@Parameters: The text to find
'@Created By: Joe Colantonio
'@Return Values: X & Y coord separated by a ^
'@Example: intXY = getTextXY(strLineText)
'-------------------------------------------------------------
Function getTextXY(strTextToFindXYFor)
set strICWPath = Browser("CF").Page("CF").Frame("WorkSpace").SwfObject("IEController")
l = -1
t = -1
r = -1
b = -1
rc = strICWPath.WinObject("regexpwndclass:=RichEdit20A").GetTextLocation(strTextToFindXYFor, l, t, r, b)
getTextXY = r & "^" & t
End function