Skip to content

Instantly share code, notes, and snippets.

@iratqq
Created May 10, 2010 05:20
Show Gist options
  • Select an option

  • Save iratqq/395709 to your computer and use it in GitHub Desktop.

Select an option

Save iratqq/395709 to your computer and use it in GitHub Desktop.
#!/bin/sh
# xdotoolのdemo
# usage: ./xdodemo.sh [ローマ字文字列]
if [ x$1 = x ]; then
in=kanji
else
in=$1
fi
leafpad &
f=""
while [ x$f = x ]
do
f=`xdotool search --class --onlyvisible leafpad`
sleep 1
done
xdotool windowfocus $f
for k in Zenkaku_Hankaku `echo $in|sed 's,\(.\),\1 ,g' | tr "[:lower:]" "[:upper:]"` space Return Zenkaku_Hankaku ctrl+q
do
xdotool key $k
done
sleep 3
xdotool key alt+n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment