Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Window Text not finding string variable item
#1
Greetings,

I have implemented the below code to find a line item on our ERP system.
I have declared a variable 'lineDescription' which is a string variable obtained from an Excel file.

However, the code gives an error message that object not found.
But when I test the code in Window Text wizard, it finds the same using actual text value

Error:
Error (RT) in Unaccounted Line - Recoverable: object not found. ?

Macro Unaccounted Line - Recoverable
Code:
Copy      Help
;Obtain Line Description
,ARRAY(str) lineDesc
,es.CellsToArray(lineDesc "sel")
,str lineDescription = lineDesc
,lineDescription.trim
,lineDescription.LimitLen(21)

Macro Unaccounted Line - Recoverable
Code:
Copy      Help
;Search description line & double click to open
,int wMain3=win("Vehicle Administration " "KCMLMasterForm_32")
,int w11111=child("" "KCMLGridPad_32" wMain3 0x0 "id=100" 2)
,wt.Init(w11111)
,wait 1
,wt.Mouse(4 wt.Find(lineDescription))
Best Regards,
Philip
#2
I would use this:

Macro Macro2793
Code:
Copy      Help
,str lineDescription = lineDesc[0 0]
,lineDescription.trim
,lineDescription.LimitLen(21)
,out lineDescription
;...
,int wMain3=win("Vehicle Administration " "KCMLMasterForm_32")
,int w11111=child("" "KCMLGridPad_32" wMain3 0x0 "id=100" 2)
,wait 1
,wt.Init(w11111)
,wt.Mouse(4 wt.Find(lineDescription))


Forum Jump:


Users browsing this thread: 1 Guest(s)