Try
Escape::
Winclose, ElectrEm
That assumes the window name is ElectrEm
If the window title bar name is correct and it still doesn't work, this will kill it.
Escape::
Process, close, ElectrEm.exe
In that one, use the name of the exe.
It's similar to what your script is doing though.
I'm betting that your window name isn't correct, so it's never seeing that window as active. Run the emulator windowed and see what it says in the title bar. You script should have that exact name for the window
sent from my phone while driving