Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash -
- #===============================================================================
- #
- # FILE: minecraft_send_msg.sh
- #
- # USAGE: ./minecraft_send_msg.sh [message]
- #
- # DESCRIPTION: Send specified message to minecraft game chat
- # Bind commands ".../minecraft_send_msg.sh [msg1|msg2|msg3]" to
- # necessary system hotkeys
- #
- # OPTIONS: ---
- # REQUIREMENTS: xdotool
- # CREATED: 03/02/2012 01:15:06 AM MSK
- # REVISION: ---
- #===============================================================================
- #set -o nounset # Treat unset variables as an error
- window="minecraft"
- # Open chat window
- xdotool search --name $window key --delay 1 --window %@ t
- # Type message
- xdotool search --name $window type --delay 1 --window %@ "$1"
- # Send message
- xdotool search --name $window key --delay 1 --window %@ "Return"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement