Thanks for helping out on maintaining the KM Wiki!
Please make sure that whenever you make an edit, that you create a new topic in the Wiki
forum category so that we all know about it, and provide others with the opportunity to review.
Your script is good, but could result in misleading results. Whenever you get a KM Variable, you always need to test to make sure it has a value. So, I updated your script with a test and error command:
tell application "Keyboard Maestro Engine"
set macroGroup to getvariable "macroGroup"
if (macroGroup = "") then error "[ERROR]" & linefeed & "Invalid Macro Group Name. KM Variable \"" & "macroGroup" & "\" was empty or undefined."
end tell
tell application "Keyboard Maestro" -- Editor
if exists macro group macroGroup then
return true
else
return false
end if
end tell
Also, please make sure you have tested and validated the exact script that you post. I just had to remove another script because it would not even compile.
Your description of your changes was good, but it would be helpful (but not required) if you could follow this format in the future. If all Wiki editors will follow the same format, it will make it easier for all of us to quickly read/understand the changes.
- Topic Title: Wiki Update:
<Title of Wiki Page/Section>
- Topic Body:
Submitted for your review, comment, and/or revision, the following Wiki article has been updated:
###
<link to Wiki page/section>
###
Primary Changes:
•
If there are any parts of this article (existing or revised) that you are not sure about, or that you would like confirmation on, please include that you your post here, and link-to, or quote, the specific text of concern/interest.
Thanks again for your help on the wiki.