The challenge is, in our test with the console all works well (see the screen video above). So the question is why does it not work on your machine?
Some ideas:
-
Permission issue. XClick and XType use the same module. Thus my questions about XClick. But you said, XClick in general works on your Mac?
-
Test: Does XType work with other apps, e. g. Send text to Notes?
-
Lets ignore XRun vs XClick for now and make this small test macro by manually launching iterm2:
-
Pause | 3000 <= During Pause, open iterm2 and give it the focus with a mouse click
-
XType | Hello! <= does it work now?
-
(same test I used for another XType issue here: Running xmodules as administrator - #6 by admin )
-