Page 1 of 1

Delay then reconnect

Posted: Tue Jan 24, 2023 6:41 am
by itzybitzyspider
Hi, just like some advice.

I was playing around with the following

Code: Select all

 
If OpenWebSocket(2, "ws://127.0.0.1:8090" ) 
  Debug "Trying to open the websocket"
Else
  Debug "Web socket not supported."
  ;Wait 5 seconds then try OpenWebSocket() again
EndIf
I have a websocket in PB running. I can capture events such as disconnects but how do I then put a wait / delay then try again instead of trying again and again immediately?

Re: Delay then reconnect

Posted: Tue Jan 24, 2023 11:57 am
by AZJIO

Code: Select all

AddWindowTimer(#Window, #Timer, Delay)