Can the Display Time of Brief Text Display Notifications be Changed? (with sidetrack to setting the icon image for AppleScript notices)

The Subroutine works for me as originally written. LOCAL__Text To Display and LOCAL__Timer Duration

To double-check that your Macros are not set up differently to mine, here is the Subroutine Macro and an Example Macro calling it.

Display Text with HTML Prompt - Top Right - Custom Timer @martin v2.00.kmmacros (4.1 KB)

EXAMPLE Caller Macro for Subroutine.kmmacros (2.0 KB)

Click to Show Image of Macro

Click to Show Image of Macro

Yes and no.

Try using a differing number of spaces in an otherwise similar variable name.

I.E.

local GoofyVariableName

vs.

`local  GoofyVariableName`

While

local goofyvariablename

Will work.

The version with two spaces will not.

Ah HA! I was looking at a version where the macro name said "v2.00" and for some reason the variables in the HTML had no spaces. I don't know how that happened, but both the v2.00 macro much earlier in the thread and this immediate preceding macro have the spaces in the names; I just checked. Maybe somehow I got an intermediate version, maybe I made edits last December that I've forgotten, I don't know. The behavior is as expected and I was mistaken.

Thanks for helping me sort this out.

1 Like

I have been using this HTML Prompt macro for notifications and repeatedly I encounter situations wher the seconds counter goes into the negative and just keeps on going indefinitely.

I've examined the code and found that it's supposed to quit if the value is less than 0:

            i.innerHTML = parseInt(i.innerHTML) - 1;
            if (parseInt(i.innerHTML) <= 0) {
                window.close();
            }

but that doesn't seem to catch it, it just keeps on decrementing, displaying larger and larger negative numbers.

image
image

When appropriately triggered, a new notification window will appear, count down appropriately, close, and be replaced by this one that was waiting in the background, counting away. The only way I can get this zombie window to close is to stop the KBM Engine.

Any suggestions on what to try or where to look to ensure that these zombies are not created, or close when they are supposed to?