Can KM9 Focus on a Dialog Box?

I am trying to use KM9 to automate a dialog box created inside an app. The dialog box presents a scrolling list to select an item.

KM9 acts as if the dialog box does not exist. Characters typed via Macro are not entered in the dialog. If I use Find Image to select the item I want to choose from the list, nothing is ever found.

Is there any way to automate the completion of Dialog box?

We need a lot more info to be helpful:

  1. What app?
  2. Post screenshot of dialog window

Please read:
Tip: How Do I Get The Best Answer in the Shortest Time?

The App is Devonthink 3 Beta 7

An example dialog window is:

DT is very scriptable. Have you tried that to accomplish your automation?

Not yet

There is actually an easier workaround for this particular problem in DT - I can change to the desired group via an item Link

But I am curious in case this situation occurs in future KM scripts in other apps. Is it generally true that a dialog box is off limits to KM?

No. I just depends on how the app dev coded the dialog box.
For example, KM easily can interact with most open/save dialogs.

Hey Richard,

The main things Keyboard Maestro fails to see are floating windows and palettes.

In your case KM doesn't see the pop-over-window, but AppleScript UI-Scripting does:

# Populate DEVONthink 3 Find Field in the Go-To pop-over-window.
tell application "System Events"
   tell application "System Events"
      tell application process "DEVONthink 3"
         tell (first window whose subrole is "AXStandardWindow")
            tell pop over 1
               tell text field 1
                  set value to "TESTING"
               end tell
            end tell
         end tell
      end tell
   end tell
end tell

Run this from an Execute an AppleScript action while the pop-over is open.

-Chris

1 Like

Thanks.. how do I enter a Return after the input so the box will act on the input? I tried /n and %LineFeed% and those did not work.

Hey Richard,

Good question...

This doesn't work, and it should.

Download ⇢ DEVONthink 3 -- Go-To v1.00.kmmacros
      (6.2 KB, Creator: KM 9.0.1)

Even Keyboard Maestro's Type a Keystroke action fails...

It looks like there's a bug in DEVON's accessibility for DT3. It should respond to AXConfirm, and it doesn't.

Someone should report it.  :smile:

To contrast – try this in the Keyboard Maestro 9 Editor:

tell application "System Events"
   tell application process "Keyboard Maestro"
      tell (first window whose subrole is "AXStandardWindow")
         tell text field 1
            set value to "test"
            perform action "AXConfirm"
         end tell
      end tell
   end tell
end tell

-Chris

Thanks - I will ask support at Devonthink

Problem identified and to be fixed by Devonthink

Thank you @ccstone

1 Like