Posts: 27
Threads: 10
Joined: Sep 2010
some time Object not found error generated...
If this error occour. Macro is stop.
I want macro not stop.
Macro is stop only when log out / close web page
Posts: 1,000
Threads: 253
Joined: Feb 2008
code that generates error; err
Can add code to execute special on error as well. Search help file for "err".
Also search the help file for "opt" to find out how to turn errors off in a function completely.
Posts: 27
Threads: 10
Joined: Sep 2010
Suppose I have nested loop If any error occur
Then
How I can sign out out application
Give me example
Posts: 1,000
Threads: 253
Joined: Feb 2008
In loop...use break, or continue.
Search the help file.
Posts: 12,140
Threads: 142
Joined: Dec 2002
Several examples are in Help.
We could help you better if you post your macro, with comments.
Posts: 27
Threads: 10
Joined: Sep 2010
SUPPOSE
int rowCounts=es.NumRows
for iRow 1 rowCounts
es.GetCell(searchJobId 1 iRow)
if CellCheck(searchJobId)
Htm el_setJobId=htm("INPUT" "txtJobNumber" "" win("Vendor Solution - Windows Internet Explorer" "IEFrame") "2" 3 0x221)
el_setJobId.SetText(searchJobId)
out "JobId set focus"
My next step is to click submit button
Htm CmdFind=htm("INPUT" "btnFind" "" win("Vendor Solution - Windows Internet Explorer" "IEFrame") "2" 8 0x121)
CmdFind.Click
and When Invalid data is enter then Button not work. Macro cannot go forward next step and generate error "object not found"
How I can solve this problem.
........
I want to say, If searchJobId is Invalid. Then macro is running continue and go to for loop
Problem is when data is Invalid macro "object not found"
Posts: 12,140
Threads: 142
Joined: Dec 2002
Which line generates error?
To post QM code, copy it in QM using menu Edit -> Other Formats -> Copy For QM Forum. Because now tabs are lost.
Posts: 12,140
Threads: 142
Joined: Dec 2002
example
Macro
Macro1466
out
run "notepad"
1
int i
for i 0 3
,out "activate Notepad"
,act "Notepad" ;;throws error if Notepad not found
,err ;;handles the error
,,out "Notepad not found"
,,continue
,out "close Notepad"
,clo "Notepad"