Communication between WASM plugin and external application

Sorry, misread your code in my first response.
The code you posted is just creating a client data area with name “(>H:AS01B_FMC_1_BTN_0)” and setting a hard-coded value to it. Seems a strange thing to do, as I thought hvars are for executing only (and without a parameter)? Or are you mixing up hvars (for activating) with lvars (for reading/writing)?

Anyway, if you want to read that value then you need to just map to that client data area name on your client as you do in your WASM but use RequiestClientData instead.

To do this, you just need to know what event the clicking of the FMC Zero key produces, and then register for that event in your SimConnect client. There is no WASM module necessary - although you can of course register for that event in your WASM module as well.

I’m putting the finishing touches to my WASM module + client API implementation, and hope to release this as a beta in the next week or so. I’ll provide more details of the approach I’ve taken and the API provided in the next day or so.

LATER: I have posted more information on this in the following topic: Demo: LVAR write access for any aircraft control - #68 by ImpoliteGem5317