The display text in window action is very very useful. It allows me to consult detailed technical notes containing text and images while I am working in other apps.
Is there any way to toggle the displayed text in window ?
thank you very much
Do you mean toggle the window or toggle the text? You said "toggle the text." I presume you meant to say "toggle the window."
The issue is that the window is associated with the running macro. If you run two macros concurrently, then two copies of the window appear concurrently. So each window is independent, which means there is nothing global that you can "toggle." The only way the window closes is when the user presses OK. (Although if you read the following page, you can close the window by talking to the system with AppleScript...)
When the display text in window action completes (ie, when the user presses OK) then the macro that displayed the window continues.
One possible alternate solution is to switch to using the action called Custom Floating HTML, which has direct support for asynchronous windows. It sounds like that's what you really should be using. Another reason you may want to consider that is that it can solve the problem of the window grabbing focus. I suspect that you don't want the window to grab user focus if you just want it to display notes. So you should look into it, here:
https://wiki.keyboardmaestro.com/action/Custom_HTML_Prompt
Basically, I think you are using the wrong tool for the job. It may be possible to get your idea to work, but I think it will be much cleaner using Custom HTML.
Yes, you are right. thank you for correcting me.
I tried with named clipboard and will give html a try.
thank you very much @Airy and happy new year !