As the title says, what I want is when I active the macro by hotkey, the large size text would display there and do not disappear. When I press Esc key, the text disppear immediately, and do not need to wait for 5 seconds, just like how "Custom prompt with HTML text" works.
I prefer “Display text large" rather than "Custom prompt with HTML text" because:
Another reason is "Custom prompt with HTML text" could not display Chinese well, and show messy code, and you may see that in the attachment.
I want to use “Display text large" to display hotkeys of each software and the large size shows the information much more clearly. (the window of "Custom prompt with HTML text" is too small)
No experience to edit HTML code.
Could you please help and provide some ideas? Thanks.
thanks, I could under the logic of your macros but they do not work, it seems the "Display text large" action is not "display text" action but repeating "display & 5 seconds" many times and could not be stopped by 1-time Esc key.
His macro works for me. If it didn't work for you, I can think of three possible causes: (1) it could be because you inserted a Pause action inside the loop. Is that possible? (2) Or it could be because you didn't wait long enough after pressing Escape (his approach creates scores of invisible windows which require time to close.) (3) Or it could be because you didn't set the action's setting to "Display Text Large."
If it's not one of these three things, show us a copy of your macro.
Personally, I think it's a bad idea to use Escape as the mechanism for closing the window, for a couple of reasons. My preferred approach is to have the user move the mouse to the top of the screen (or the top left corner.)
There were several things in my solution that differed from Tiff's approach. Some of my differences were cosmetic (e.g., "color") but some of them made the macro work better. For example I avoided his approach of starting up lots of windows simultaneously, and so my approach launches only one window at a time. My method also demonstrates a more reliable way of stopping the macro: by moving the Mouse to the top of the screen. So I don't think my macro is "extending" his macro, I think it's "improving its reliability."
Now, now @Airy - since the Display Text action executes in a synchronous fashion, only one window is active at a time. You can test that by putting a Play Sound action after the display action like this:
Having said that I'm not fond of my solution...
In that case you've done something incorrect. Show your macro for us to test.
Not entirely synchronous. If you have set the duration of the Display Text action to, say, 5 seconds, which is the default, the window will appear on the screen for five seconds AFTER the Display Text action has finished. To me, that's asynchronous.
When I run your latest code, with the Tink, I get five windows layered on top of each other. That's because the Display Text window stays alive for five seconds after the action completes, and the Tink action lasts for about 1 second. Five divided by one gives five layered windows. You can tell because the window is much darker than usual, which is caused by five translucent windows in the same position.
Another way to tell, is when I run your original version, without the Tink, my free RAM drops instantly from about 80% free to about 5% free, and that's probably because hundreds (or thousands) of windows are being displayed on my screen simultaneously.
I have no idea why your KM Engine works differently from mine. Maybe other people can chime in with their results? Here's what happens to my system when I run your code. You can see that after a couple of seconds all my RAM is consumed by the KM Engine which jumps from 200MB RAM to 20GB RAM as soon as I run your macro. I think it's a direct result of calling Display Text Large in an unrestricted loop.
Moreover, if I run this, I can see the Counter variable increasing at a rate of about 50 per second (although the rate drops considerably as system RAM disappears.) That's how many windows appear each second, and with a 5 second time to disappear, that means there are 250 windows on my screen at the same time. Since each window is in the same location, it's difficult for anyone to see that multiple windows are open at once.
Here's your macro (the one without the Tink) enhanced to show the count of hundreds of windows being created in the KM Progress Bar window. Do you see the count going up by 50 per second?
Interesting that my KM Engine memory use goes from 167 MB to a maximum of 303 MB while the memory pressure graph shows no increase at all from the low starting level.
Yes, it does display a count that increases at an alarming rate so I take your point about the not quite synchronous behaviour!
That's curious. I can't explain the difference between your numbers and mine. Your numbers aren't too worrisome, but 20GB of RAM in 5 seconds is worrisome.
Exactly. Opaque means "tens" or "hundreds" of windows overlapping each other (in my case, "50"). If you see some transparency, there's probably under 5 windows overlapping. I thought that Tiff would have noticed that.
Come to think of it, 50 per second means 250 overlapping windows on my Mac because the timeout for Display Text Large is 5 seconds. 50 times 5 is 250.
As my above post said, I meet the same problem (a lot of windows & memory pressure), and I tried to change the delay time from 5 seconds to 0 second, it seemed to work now and I will do more tests.
Just to be sure, I ran your original macro @Airy (without my simplifications) and the results are more or less the same - a few hundred MB extra RAM usage and no memory pressure change for the KM engine.
I'm at a loss to explain why there's a difference between our two systems. Just so you know, this is my Mac