# Bug in DT3 / AXStandardWindow?

**URL:** https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822
**Category:** DEVONthink
**Created:** [September 5, 2019, 1:50am UTC](https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822 "2019-09-05T01:50:27Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rkaplan](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://discourse.devontechnologies.com/u/rkaplan)
#### Post date: [September 5, 2019, 1:50am UTC](https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822/1 "2019-09-05T01:50:27Z")

</div>

See this thread from the Keyboard Maestro forum (which began as a question on this Forum).

Might there be an error in the way DT3 implements accessibility?

> **[Can KM9 Focus on a Dialog Box?](https://forum.keyboardmaestro.com/t/can-km9-focus-on-a-dialog-box/15171/10)**
>
> Thanks - I will ask support at Devonthink

---

<div class="post-metadata">

### Author: ![cgrunenberg](https://discourse.devontechnologies.com/user_avatar/discourse.devontechnologies.com/cgrunenberg/32/7172_2.png) [@cgrunenberg](https://discourse.devontechnologies.com/u/cgrunenberg)
#### Post date: [September 5, 2019, 7:34am UTC](https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822/2 "2019-09-05T07:34:08Z")

</div>

The next release will support this. However, still wondering what’s the purpose of this script/macro. Wouldn’t it be better to just search via the “search” command for groups and bypass the Go To popover?

```auto
tell application id "DNtp"
	set theGroups to search "name:testing* kind:group kind:!tag"
	set root of viewer window 1 to (item 1 of theGroups)
end tell
```

---

<div class="post-metadata">

### Author: ![rkaplan](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/r/a3d4f5/32.png) [@rkaplan](https://discourse.devontechnologies.com/u/rkaplan)
#### Post date: [September 5, 2019, 10:59am UTC](https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822/3 "2019-09-05T10:59:50Z")

</div>

Thanks for the follow-up.

This question evolved out of this discussion:

> [@"To group..." dialog box](https://discourse.devontechnologies.com/t/to-group-dialog-box/49609):
>
> Hello, When opening the “Go \> To Group…” dialog box via Keyboard Maestro and pasting in a group name, the Enter key press sent by KM isn’t registered in DT (although it does if I press Enter myself). Is this a KM issue or a DT issue? I’m asking here because the “To Group…” seems non-standard and doesn’t have a button. It’s the only hiccup I have in an otherwise very useful macro… Thanks.

As the OP there noted: “Thank you. I am aware of that. If I could do this with Apple Script I wouldn’t be using KM.”

A more nuanced response is that demonstrating the apparent bug in Applescript helped to isolate it to a DT3 issue rather than an issue with KM or some other non-DT3 problem.

In the larger picture, I think for many of us KM hits just the right sweet spot in terms of benefit from time invested. I spend a lot of time on the knowledge domain for which I use DT3. Applescript is a wonderful tool and I have used it when it is the only option; but it tends to take time and research to apply it to a new project. On the other hand, with KM the concepts generalize both elsewhere in DT3 and to other apps. I can go from idea to solution with KM very rapidly; Applescript usually takes a lot more time to figure out so to do an Applescript project just for me I may invest more time than the completed project would save me.

As I have mentioned before, I do think it would be immensely helpful to have a curated set of Applescript solutions on this Forum rather than randomly in the Discourse archives. Even better would be an entire book of examples of Applescript for Devonthink. For now, KM is just right as a tool to quickly make me more productive so I can focus more on my primary knowledge domain.

---

<div class="post-metadata">

### Author: ![Altostratus](https://discourse.devontechnologies.com/letter_avatar_proxy/v4/letter/a/51bf81/32.png) [@Altostratus](https://discourse.devontechnologies.com/u/Altostratus)
#### Post date: [September 5, 2019, 12:22pm UTC](https://discourse.devontechnologies.com/t/bug-in-dt3-axstandardwindow/49822/4 "2019-09-05T12:22:22Z")

</div>

> [@rkaplan](#):
>
> Applescript usually takes a lot more time to figure out

I have to agree with @rkaplan on this. I’ve had my time with small-scale solutions using Python, C# and PHP, so I’m not a stranger to programming. After my post on the KM/DT problem I’ve started looking around for AppleScript tutorials, saying to myself that it would be nice to stop staring blankly at those scripts and get to know the basics. I’ve gone through a few introductory steps and tried expanding what I was learning by trying things on my own, which is generally how I’ve learned most of what I know.

After spending hours looking through dictionaries and getting cryptic error messages while trying to do the simplest of things, I think I’ve definitely abandoned the idea. I find the syntax of this language unintuitive and frankly terrible to look at. I’m sure it’s incredibly useful in the hands of people who are used to it, but most of what I’d like to automate can be accomplished with KM, as @rkaplan pointed out.

So actually it’s not a coding issue. Yes, it’s probably better, not to mention faster, to use the code snippet above. But when you have a 40-step macro that does _exactly_ what you need — and that took you a minute to create — I think you’d rather focus on the one step that’s misbehaving than learning a new computer language.

Anyway, good news, as always, from @cgrunenberg about the next release supporting this.

Thanks.
