Is it possible to programmatically add in checkboxes to an input form?
I have the number of checkboxes I want as well as the label next to the checkboxes.
I also like to respond to each individual checkbox as well.
I wanted to ask first just in case I spent relentless hours trying to test something that couldnt be done in the first place.
ok so i managed to separate the xml into three parts. Begin, Process and End.
The process is where I concatenate the number of dictionaries where dictionary looks like this
and then I merge that all into one variable along with Begin and End and named it "merged"
and then I tried to get applescript to process it but it wouldnt work.
tell application "Keyboard Maestro Engine"
set clip to process tokens "%merged%"
end tell
I hope the devs make a better solution for us cos the XML format could change and id hate to change every one of these XML forms manually.
Ben
I'm not very clear on what you're up to but you can construct a variable consisting of HTML form tags as needed and use JavaScript to display that variable in a Custom HTML Prompt.
I do that to construct select form elements in a few of my macros, like Mirror Mirror, which shows the general approach.
learning keyboard maestro is one, rust is another and now i have to learn applescript.
All these things ive ever asked for has done before by someone else so why is it so difficult to find it the answer?
Annoyed.
When I find the time i'll try to do it via Applescript unless you have a solution that works right off the bat.
I have 1 new macro that is so hard to maintain that ive literally shot myself in the foot.
Ive just learned how to read and write JSON values directly. Next is Applescript.
I search up applescript tutorial on the keyboard maestro website only to find the bare basics. When I open up someone elses applescript, im like "Where did that come from? What is that? !!!!"
Annoyed. Lack of documentation for applescript on keyboard maestro to fully absorb it and get into the flow.
The only way forward is for me to write more in Applescript cos the way im going is causing me headaches with actions.
I thought engrouping actions would help simplify and improve flow but then I realised that it cant cos I find myself expanding groups so many times its ridiculous.
I will try to duplicate the macros and shrink one of them down without losing function so that I can get it done in less actions (a mix of applescript and actions). For me, thats a big task cos I dont even know Applescript.
For anyone else that reading this, can someone please point to some really useful applescript tutorial with KM. Dont send me to the basics.
Personally, I prefer JavaScript for Automation (JXA). It sounds like you know javascript, so this might be a better option. There isn't a lot of documentation, but you can at least find some if you look. And there's examples on this forum.