While loop - Cancel Respondida

David Erkelius

Hi, How do I cancel or break a While-loop with ESC och Ctrl-C or something? 

I will have a dedicated SAP client which has a While Loop checking for new orders created with SAP API fom our ecommerce paltform. When a new order appears I want to run a macro. But if something goes wrong I want o stop it. Or do you have a better suggestion how to solve scheduling macros?

Next problem is that the whileloop stops after some minutes? 

@STORE98 = 0;

While (?USERNOTCANCELED?) BEGIN;
@STORE1 = SQL(SELECT ... check if new order..);
IF (@STORE1 <> '') BEGIN
UF(UF-GO_ORDER); //Process order
END
CHECKIFUSERCANCEL???
@STORE98 = @STORE98 + 1;
// MessageBox(@STORE98);
Sleep(10);
Statusbar(Loop @STORE98|S)
END

Regards 

David 

 

 

Comentarios

1 comentario

  • Comment author
    Yaremi Miranda Lopez
    • Comentario oficial

    Hello David,

    There is no command to end a LineLoop, the only thing is that you can test it on Debug first before implementing it.

Iniciar sesión para dejar un comentario.