View Single Post
  #30  
Old 27.10.2010, 12:06
l0co
Guest
 
Posts: n/a
Default Linux solution

Working for me linux solution written as bash scrips is following:

Code:
#!/bin/sh 
  
PLAY=0

while [ true ]; do
  WIN=`xdotool search --title 'please enter'`
  
  if [ -n "$WIN" ]; then
    PLAY=1
  else
    PLAY=0
  fi
  
  if [ $PLAY = 1 ]; then
    aplay /path/to/sound/file/jdsound.wav
  fi
  
  sleep 5
  
done

It requires xdotools and aplay installed (usually from given distribution repository).

Copy code to text file, name it somehow (eg. jdsound.sh), chmod it to 0755, provide wav sound file, replace "/path/to/sound/file/jdsound.wav" part with your sound file path and execute. Sound should appear when window with 'please enter' text in title will be opened.

Tested on gnome (ubuntu hardy).
Reply With Quote