get autohotkey from
http://www.autohotkey.com/. It's free, it's great, it can do anything except cleaning my friggin kitchen.
Copy && paste the code snippet in a file 'aiawars.ahk'. Adjust the 'send' statements to your liking. The keys can be found in the help file under 'hotkeys'. Optionally delete the two comments, now 'z' and 'y' are swapped (non-US keyboards). Remember to hit 'z' when scrapping things..
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetTitleMatchMode, 3
#IfWinActive, AI War
; lower mouse button
XButton1::
Send, p
return
; upper mouse button
XButton2::
Send, {Tab}
return
/* delete this line to swap y/z on non US-keyboards
y::Send {z Down}
y UP::Send {z UP}
z::Send {y Down}
z UP::Send {y UP}
/* delete this line to swap y/z on non US-keyboards
Double-click the aiwars.ahk file. Thats it.
Hope someone finds it helpful