Peter - In the past, I’ve experienced several instances where limiting the image search to a specific area, that it wouldn’t find the image at all. This was pre-7.1.
Is this something you’re aware of, or should I try to come up with a test case to show you? Thanks.
With the KM Editor open and filling most of the screen, look for a unique image - say, the circled question mark at the bottom-right. Limit the search area to the location and size of the question mark, give or take. On my machine, anyway, it won’t find it until I change it to search the entire main screen (I have dual monitors, but I’m keeping KM on the main screen).
I believe it will also find it if I set the search area really large, but I tried that now and it didn’t seem to work, so not sure what I did differently this time.
I thought about doing it as you mentioned, but I stopped that implementation because I suspected other similar menu bar items would interfere.
Especially this one:
Turns out the Tyme app has a keyboard shortcut for opening the menu bar.
What it doesn't have is a shortcut for the "Turn back start time" and "Stop timer" sub-menus. I can make a shortcut using images but I really liked the Menu > Sub-Menu features in Keyboard Maestro so I figured you'd want to replicate those with Menu Bar items.
Obviously there's no good way to do it so thanks for the consideration.
There’s nothing I can’t do when combining the apps existing keyboard shortcuts with found image macros so this feature request is more of a convenience ask for accessing menu bar items in general.
Since I don't have Tyme I've done this detective work with Default Folder as a demonstration of the methodology involved. (It helps to have UI Browser, but that's a $55.00 dollar bill U.S.)
Substitute “tyme” and go through the steps in the Script Editor.app.
Look carefully at the result of each test and make the appropriate substitutions for the next test.
There's a reasonable chance you can get the Tyme menulette to open at the very least.
(It's certain – I found the Demo and tested with it.)
From there it's likely you can access menu items.
-Chris
-----------------------------------------------------
# Test 1
-----------------------------------------------------
tell application "System Events"
UI elements whose name contains "Default Folder"
end tell
-----------------------------------------------------
# Test 2
-----------------------------------------------------
tell application "System Events"
tell UI element "Default Folder X"
UI elements
end tell
end tell
-----------------------------------------------------
# Test 3
-----------------------------------------------------
tell application "System Events"
tell UI element "Default Folder X"
tell menu bar 2
UI elements
end tell
end tell
end tell
-----------------------------------------------------
# Test 4
-----------------------------------------------------
tell application "System Events"
tell UI element "Default Folder X"
tell menu bar 2
tell menu bar item 1
actions
end tell
end tell
end tell
end tell
-----------------------------------------------------
# Final Working Script
-----------------------------------------------------
ignoring application responses
tell application "System Events"
tell UI element "Default Folder X"
tell menu bar 2
tell menu bar item 1
perform action "AXPress"
end tell
end tell
end tell
end tell
end ignoring
-----------------------------------------------------