How to use error handling to deal with Websocket Error
How to use error handling to deal with Websocket Error
While using Chrome.ahk to do repeated stuff.
Re: How to use error handling to deal with Websocket Error
That's a pretty unspecific question. But generally, the default maximum for websocket connections (at least the way it is done by Chrome.ahk) is 6. If you exceed it, you'll probably get some kind of "security error". Afaik, this limit can be raised by changing the registry (at your own risk).
But generally it is more important to use Chrome.ahk's Disconnect() method on tabs that you are done with. From the Chrome.ahk source code:
If your question is about something else, please elaborate!
But generally it is more important to use Chrome.ahk's Disconnect() method on tabs that you are done with. From the Chrome.ahk source code:
Code: Select all
/*
Disconnect from the page's debug interface, allowing the instance
to be garbage collected.
This method should always be called when you are finished with a
page or else your script will leak memory.
*/
Disconnect()
{ ; [...]
Re: How to use error handling to deal with Websocket Error
Thanks, I had been used the Disconnect() function already, but the problem persists.Here is the main structure of my code in a loop.gregster wrote: ↑09 Apr 2021, 04:58That's a pretty unspecific question. But generally, the default maximum for websocket connections (at least the way it is done by Chrome.ahk) is 6. If you exceed it, you'll probably get some kind of "security error". Afaik, this limit can be raised by changing the registry (at your own risk).
But generally it is more important to use Chrome.ahk's Disconnect() method on tabs that you are done with. From the Chrome.ahk source code:If your question is about something else, please elaborate!Code: Select all
/* Disconnect from the page's debug interface, allowing the instance to be garbage collected. This method should always be called when you are finished with a page or else your script will leak memory. */ Disconnect() { ; [...]
Code: Select all
open a new tab(used the Findtext library)
GetPage()
do something...
Call("Page.close")
Disconnect()
Re: How to use error handling to deal with Websocket Error
Now I just comment out the "Websocket Error!" exception in the Chrome.ahk library, and it seems there is no side effects so far.