ID:1913600
 
(See the best response by Kaiochao.)
Heya, so I was doing some research about how to emulate a key press (since my javascript code was failing for some super weird reason) and I came across this topic and Lumox talked about a byond.fn.fireMacro() procedure.

Lummox JR wrote:
Rather than try to force an event--to be honest, I never found a good multi-platform way to generate a key event--why not call byond.fn.fireMacro()? (Or if this is for a control, call its fireMacro() member directly.) Calling fireMacro('Space') ought to do the trick.

[edit]
Or maybe not. If this is being done outside of the iframe, that's gonna be tougher to handle. I don't know if you can generate events and have them trigger inside an iframe, at least not one with a different domain.


I did some research but I couldn't find anything relevant about that fireMacro function. Can you explain me what it does and how it works?

Thanks as always for your help,
,MistY

Best response
It's a function for the webclient.

Webclient doc, Ctrl+F "fireMacro".
In response to Kaiochao
Oh thanks kai. I thought it was a new DM function (non-webclient)... I haven't explored the webclient yet. Thanks for the reference document, it will be very useful when studying the new webclient stuff.


Thanks