I see the difference. I think I would settle for reformatting if that cleans up the mess. But I was hoping for rendering. And I would also settle for a button that opens a browser so that the rendering is done there.
As I said, I have lots of variables that contain HTML, and reading raw HTML is a pain. I can't remember what all these variables are storing. So anything at all that you can provide would help.
Wouldn't a button to open the variable in a browser be fairly trivial?
I... don't actually know. Maybe - it depends on what the browser does with partial HTML snippets.
Can you post a few examples? I'm guessing you know to to do that, but if not, put 3 backticks on a line by itself, then paste the HTML below it, and end with a line of 3 backticks. (```)
I just browsed through all my global and dictionary variables on this Mac, and didn't find any. I guess that means I must be using Local Variables for my HTML (probably obtained through curl statements), due to good programming practices, so I'm hereby withdrawing my request. Sorry about that.
I was inspecting the variables in a macro with Accessed Variables set to 1 and the other options left blank, and I was surprised to see over 160 variables accessed. After some troubleshooting, there seems to be something funky going on with the Custom Floating HTML Prompt action.
I set up a new macro with only two actions 1) a blank Custom Floating HTML Prompt action, 2) a Variable Inspector Prompt action:
Hey @evanfuchs, there is a known βbugβ where if you use a custom prompt, and then use the accessed variables token it returns every single variable in your database. Thereβs a thread floating around somewhere that discusses it but I canβt remember where right now.
Ah man! I searched around a bit before posting because I vaguely remembered kinda sorta maybe something about that. Thanks for pointing me in the right direction.
Hi Dan, sometime in the not-too-distant past I started seeing a sizing issue on the Inspector. Namely, it does not save any adjustments I had previously made to it's location and size, and whenever reducing it's height the buttons disappear.
I perused the topic here and downloaded the most recent version but the issue still persists. I thought you had helped me with this issue in the past but I'm not seeing anywhere in this topic about it.
Attached is a screen recording in case that helps. Any ideas where I can start to debug the issue?
My guess is that somewhere in your macro, you set the size or position manually. Or else you're deleting or resetting the DND__VipAppData variable somewhere.
Ok I realized my error. I had forgotten that it saves it's current position to the DND__ variable upon closing... and since I'm having that issue where the Reload and Done buttons disappear when reducing it's height I never clicked Done after resizing... so it was never updating it's size.
I was able to change the size/location now. I do still have the disappearing buttons issue but it's not a big deal.
I used this for the first time today. Very slick! Easy to use and helped me clean up the mess I made from my early scripts before I learned of local and instance variable. Thank you for creating and sharing this.
Installed the new version today and I get this error:
MACRO ERROR OCCURRED on 2024-09-05 02:05:12
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This info was pulled from the KM Engine Log for the
Last Macro error that occurred.
MACRO:
------------------------------------------------------------------------------------------------------------
25)Inspect All Global Variables & Dictionaries
------------------------------------------------------------------------------------------------------------
Action Type: Custom Prompt
Action Name: Custom Floating HTML Prompt βVariable Inspector Windowβ
ACTION ERROR: get HTML file.
KM Engine Log:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Custom Prompt failed to get HTML file. Macro β25)Inspect All Global Variables & Dictionariesβ cancelled (while executing Custom Floating HTML Prompt βVariable Inspector Windowβ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Log File: ~/Library/Logs/Keyboard Maestro/Engine.log
Looks like the same error I got as well. Meesa thinks he has an HTML prompt that references a file (instead of embedded HTML), but I havenβt had time to troubleshoot. Thanks for posting this.
Referencing a HTML File is actually the right thing this macro should doβ¦ the Macro creates the File as temporary one which gets deleted after the Prompt is closed β¦ Thatβs the normal behavior of this Macro.
Well, crap, guys. The comments are missing from the version I just uploaded. It'll work just fine as it is, but I'll upload a fix for that either later tonight, or tomorrow morning.
I've been working on a semi-automated way to offload large comments, and other things, and I guess I tested it on VIP.