Is this event emitter in AHK?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DanielToward13
Posts: 74
Joined: 18 May 2017, 10:56

Is this event emitter in AHK?

09 Nov 2019, 05:47

I'm reading Chrome.ahk lib and trying to implementing it in Python. Is the code below an event emitter in AHK? Can you give a simple example code for the _Event function so that I can understand it better?

Code: Select all

			; Called by the JS in response to WS events
			_Event(EventName, Event)
			{
				this["On" EventName](Event)
			}
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Is this event emitter in AHK?

09 Nov 2019, 07:18

you might want to ask directly in the Chrome.ahk thread as well, they might know better

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Is this event emitter in AHK?

09 Nov 2019, 10:35

have u seen the websocket dependency? https://github.com/G33kDude/WebSocket.ahk/blob/8a0c1f609551c206cacde83cef9c95746af04ab9/WebSocket.ahk
store a callback to this method in ahkevent
create a websocket. see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
rig the websocket's event handlers to invoke ur callback

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: jollyjoe and 178 guests