fatodubs wrote: ↑19 Oct 2020, 09:18
I'm running into the same scripting SecurityError as detailed early on.
Afaik, there is a limit of 6 connections for IE (and IE component) websocket connections - as I don't know your code, I don't know if that's the problem here (but it seems like a typical error message for that scenario).
Edit: I guess, there are more reasons for this rather generic error message.
If you are trying to use more than
six websocket instances (tabs or Chrome instances), you'll need to edit the registry (at your own risk), afaik, to allow the
AutoHotkey.exe process to use more than 6 connections (because that process - via Chrome.ahk - uses an IE component to establish these websockets). You could change it manually, or via AHK script (run as admin, if you get
Errorlevel = 1 and
A_LastError = 5):
Code: Select all
limit := 10 ; values between 2 and 128 are allowed
RegWrite, REG_DWORD, HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER, AutoHotkey.exe, % limit
; RegWrite, REG_DWORD, HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_WEBSOCKET_MAXCONNECTIONSPERSERVER, AutoHotkey.exe, % limit
msgbox % "Errorlevel: " errorlevel "`nA_LastError: " A_LastError ; 0 means success
You could change it for the current user or the 'local machine' - but both might be prohibited on a work computer, I suppose.
Usually admin rights are required to create or change these keys (at least for the 'local machine' key).
There will probably be ways around this specific problem when/if GeekDude introduces the new Websocket API, he mentioned above.
Please anyone correct me, if I am wrong.
Edit: It seems you are not able to establish any websocket connection at all...? Then that is an even more fundamental obstacle, I guess, and this won't help you at all. Sorry.
I am not aware of a solution (other than what is outlined in the
StackOverflow thread, or by tmplinshi
here), but I think there have been questions about the IE websocket limit (of 6) before (so I hope this is at least helpful for other people).