I design a macro for setting trigger via applescript, but the problem is that after clicking adding a trigger, It waits several second before select "hot key trigger" I don't know whytrigger.kmmacros (2.4 KB)
tell application "System Events"
tell process "Keyboard Maestro"
tell (first window whose subrole is "AXStandardWindow")
tell group 1
tell splitter group 1
tell scroll area 3
if button 4 exists then
set focused of button 4 to true
else
click button "New Trigger"
click menu item "Hot Key Trigger" of menu 1
end if
end tell
end tell
end tell
end tell
end tell
end tell