### Requires Keyboard Maestro 7.1+ ### --- Set AppleScript Variables to KM Variable Name and Value --- set myKMVar to "My KM Var Name" set myASVar to "TBD" -- default value of KM variable, will be updated tell application "Keyboard Maestro Engine" ### GET ### -- IF KM Variable does NOT exist, the AS Variable will be set to empty string -- -- Use Explicit Quoted Text -- set myASVar to getvariable "My KM Var Name" -- OR, Use Previously Defined AppleScript Variables -- set myASVar to getvariable myKMVar ### SET ### -- IF KM Variable does NOT exist, it will be created -- -- Use Explicit Quoted Text -- setvariable "My KM Var Name" to "A new value" -- OR, Use Previously Defined AppleScript Variables -- setvariable myKMVar to myASVar end tell