Skip to content

Commit

Permalink
Solved FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
richelbilderbeek committed May 8, 2016
1 parent 6623597 commit 80781cd
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions FAQ.md
Expand Up @@ -2,12 +2,32 @@

## Can `xdotool` work with hexadecimal window IDs?

Yes, see 'How to let `xdotool` work with Qt applications?'.
Yes. You can easily check this, by using `wmctrl` as
an alternative way to obtain a window ID in hexadecimal.

This will show the window ID in hexadecimal of
a window with title `My dialog title`:

```
wmctrl -l | egrep "My dialog title" | cut -f 1 -d ' '
```

I got the value of `0x02800003` displayed on my screen,
but you will probably have a different value.

Feeding that hexadecimal value to `xdotool` does activate the window:

```
xdotool windowactivate $(wmctrl -l | egrep "My dialog title" | cut -f 1 -d ' ')
```

## How to let `xdotool` work with Qt applications?

`xodotool` cannot directly extract the ID of a Qt application
from its window title (yet). A workaround is to use `wmctrl`
`xdotool` can unsually extract the ID of a Qt application
from its window title, as shown by
[this StackOverflow question](http://stackoverflow.com/questions/37050159/xdotool-cannot-find-qt-application-window-where-wmctrl-can).

If something is wrong, a workaround is to use `wmctrl`
to obtain the window ID:

```
Expand Down

0 comments on commit 80781cd

Please sign in to comment.