- send a named key combination to X using strings
xsendkeys(Source) - get a LIST of all windows needed
xprop -root grep "_NET_CLIENT_LIST(WINDOW)" - Get specified window information
xwininfo -id {{{Just_previously_aquired_Window-ID}}} - raise a window and give it focus
wmctrl -a
Code Sample
import time
import subprocess
time.sleep(5)
subprocess.Popen(["gksudo", "nautilus"]); #could be more interesting
time.sleep(5)
subprocess.Popen(["xsendkeys", '"p+p+a+s+s+w+o+r+d+Return+Return"'])
0 件のコメント:
コメントを投稿