Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Repeat Not Working After Error routine
#1
Greetings,

I have a set of code that works perfectly except when it routes through the error routine; it does not repeat the next cycle.
The code within the error routine works fine though.
Kindly advise.
Also, advise if this is the way to write an error routine for a particular specific incident. I mean, I don't want any other error to route through this:
Macro Vehicle Price Amendment
Code:
Copy      Help
,err+
,,int w13=win("Showroom Enquiries - Enquiry Search Results " "KCMLMasterForm_32")
,,Acc a8.Find(w13 "PUSHBUTTON" "Previous" "class=ToolBar_Class[]id=66" 0x1005)
,,a8.Mouse(1); 0.5
,,int w14=win("Showroom Enquiries - Find Customer Enquiries " "KCMLMasterForm_32")
,,Acc a9.Find(w14 "PUSHBUTTON" "Previous" "class=ToolBar_Class[]id=66" 0x1005)
,,a9.Mouse(1); 0.5
,,act w1
,,lef 349 109 w1 1; 0.75 ;;property page 'Ribbon', grid drop down button 'Font Color'
,,lef 30 161 wait(15 win("" "Net UI Tool Window")) 1 ;;NetUIHWND 'Font Color', list item 'Red'
,,wait 0.5
,,goto endHere

Thanks,
Philip
Best Regards,
Philip
#2
this does not repeat after error:
Macro Macro2461
Code:
Copy      Help
rep
,0.5
,out 1
,act 0
,;g1
,out 2

err+
,out "error"
,goto g1

this repeats after error:
Macro Macro2461
Code:
Copy      Help
rep
,err-
,0.5
,out 1
,act 0
,;g1
,out 2
,err+
,,out "error"
,,goto g1

Quote:Also, advise if this is the way to write an error routine for a particular specific incident.
Macro Macro2461
Code:
Copy      Help
rep
,0.5
,out 1
,act 0
,err
,,out "error"
,out 2
or
Macro Macro2461
Code:
Copy      Help
rep
,0.5
,out 1
,act 0
,err sub.ErrorRoutine
,out 2


#sub ErrorRoutine v
out "error"
#3
Thanks Gintaras,

However, what I mean by 'goto endHere', is to goto the end of the repeated codes without executing them, then on it should just take on the repeat cycle.
Because the repeat codes is to run only a specific number of times even when an error occurs. If in your above example, the code goes to 'label g1' then there would be effectively an extra repeat cycle than what was initially given.

Best Regards,
Philip
Best Regards,
Philip
#4
Replace
goto g1
to
continue
#5
Thanks Gintaras.
Yes, that worked.
Best Regards,
Philip


Forum Jump:


Users browsing this thread: 1 Guest(s)