hi guys , I'm new here

Ok I have a question:

Is it possible to code up a "Rapid Fire Hack" on VB , because I want to create one. I don't want to use Autoscript , because I want to make a GUI and I know VB better :P

I found a C++ Code from a DLL for CoD 4 MW 1 which is injected to the exe. I tried to "translate" the Code , these are my results:

 
Code:
if(GetAsyncKeyState(VK_RBUTTON))

... AutoFireTMR as Integer , and AutoStageFire2 as Boolean , the logical yes or no if it is activated.

{
if(hack[AUTO_FIRE].on)
{
AutoFireStage2 = true;
}
}
else AutoFireStage2 = false;

if(AutoFireStage2)
{
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);

if(clock() - AutoFireTMR > 40)
{
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
AutoFireTMR = clock();
}
}


This is my "translation" :

The code is placed in a ticking Timer.


'actistatus , a boolean , is changed by a hotkey , and activate/deactivates the script.

 
Code:
If GetAsyncKeyState(2) Then
If actistatus = True Then
AUTOFIRESTAGE2 = True
Else
AUTOFIRESTAGE2 = False
End If
End If

If AUTOFIRESTAGE2 = True Then
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
If clock - autofiretmr > 40 Then
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
autofiretmr = clock()
End If
End If


It seems that the clock function is the time that elapsed in milliseconds since the programm started. I have problems to realise this in VB.

Can you help me, or recommened a better source code?

BTW: Sorry for my english , I'm an Austrian guy