How do i use a rapid fire controller on a pc?

I have an xbox 360 wireless adapter and controller so im able to play games just fine. I play Black ops 2 alot and found a rapid fire script that works well but only works for my mouse.

 

The sript  is :

f9::Suspend
LButton::
Loop
{
SetMouseDelay 100
Click
If (GetKeyState("LButton","P")=0)
Break
}

 

Works for all games but i dont know how to make it work for my 360 controller. Any help will be appreciated.