09-07-2016, 09:30 AM
Hello All
I am new to automation using UFT and new to programming as well. My question is around how to manipulate Substrings (a string within a string)
I want to find the position of a certain character in the string and find its start position and pass this start position to the mid function to capture the
substring. The reason I need the position is because the position of the substring keeps moving.
I also have it in a Do Loop Until
Do
Window("Warehouse Management.ws").Type micF5
Wait (2)
Window("Warehouse Management.ws").WinObject("Workstation ID:").Output CheckPoint("Workstation ID:_2")
L_Sline2 = DataTable.Value("G_Status_20",Global)
L_Status_20 = Instr(L_Sline2,"20 Print")
L_Status_20_Valid = mid(L_Sline2,L_Status_20,8)
Loop Until L_Status_20_Valid = "20 Print"
I keep getting the error "invalid procedure call or argument: 'mid'" The line with the error is underlined
Could someone take a look at this one please......
I am new to automation using UFT and new to programming as well. My question is around how to manipulate Substrings (a string within a string)
I want to find the position of a certain character in the string and find its start position and pass this start position to the mid function to capture the
substring. The reason I need the position is because the position of the substring keeps moving.
I also have it in a Do Loop Until
Do
Window("Warehouse Management.ws").Type micF5
Wait (2)
Window("Warehouse Management.ws").WinObject("Workstation ID:").Output CheckPoint("Workstation ID:_2")
L_Sline2 = DataTable.Value("G_Status_20",Global)
L_Status_20 = Instr(L_Sline2,"20 Print")
L_Status_20_Valid = mid(L_Sline2,L_Status_20,8)
Loop Until L_Status_20_Valid = "20 Print"
I keep getting the error "invalid procedure call or argument: 'mid'" The line with the error is underlined
Could someone take a look at this one please......