Automating the Keyboard Maestro Editor with AppleScript


SHARE THE SELECTED ITEMS IN THE KEYBOARD MAESTRO EDITOR TO THE FORUM


Hey Folks,

I finally got tired of doing this manually. The macro takes you to the point of sharing {Both} to the forum – just as if you manually clicked through the process.

-Chris

--------------------------------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2016/08/11 22:43
# dMod: 2016/08/11 23:19
# Appl: System Events & Keyboard Maestro Editor
# Task: Share the Selected Items in the Keyboard Maestro Editor to the Forum.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @System_Events, @Keyboard_Maestro, @Editor, @Send, @Forum
--------------------------------------------------------------------------------

tell application "System Events"
   
   tell application process "Keyboard Maestro"
      set frontmost to true
      
      tell window "Keyboard Maestro Editor"
         tell group 2
            tell button 1
               perform action "AXShowMenu" -- Open the Share Button Menu.
            end tell
         end tell
      end tell
   end tell
   
   keystroke "k"
   key code 36
   
   tell application process "Keyboard Maestro"
      tell window "Keyboard Maestro Editor"
         tell button "Both" of sheet 1
            perform action "AXPress"
         end tell
      end tell
   end tell
   
end tell

--------------------------------------------------------------------------------
1 Like