开发者

programmatically close popup in ubuntu

开发者 https://www.devze.com 2023-02-17 15:10 出处:网络
How would I programmatically close a popup window in ubuntu? I can do it using AppleS开发者_如何学Gocript on OSX:

How would I programmatically close a popup window in ubuntu?

I can do it using AppleS开发者_如何学Gocript on OSX:

tell application "System Events"
    tell process "SketchUp"

        set frontmost to true
        keystroke return

    end tell
end tell

Now I'm looking for the equivalent on Ubuntu (version 10.10).


You want to install the wmctrl package, then man wmctrl to see how to use it to select windows and ask them to close. (I would give more detail but my Ubuntu VM is in the progress of upgrading to Natty.)


Ok, using backup of my VM since Natty and Parallels Tools don't talk to each other (yet):

jinx:1458 Z$ wmctrl -l
0x03e00037  0 jinx jinx {allbery} [~//lib]
0x03e00027  0 jinx jinx {allbery} [~]
0x03e00042  0 jinx jinx {allbery} [////xkb]
jinx:1459 Z$ wmctrl -c -i 0x03e00042
jinx:1460 Z$ _

By default (without -i) it matches against the window title.

0

精彩评论

暂无评论...
验证码 换一张
取 消