AutoHotkey Community

It is currently May 26th, 2012, 8:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Macro for game
PostPosted: August 30th, 2009, 11:47 am 
Offline

Joined: August 29th, 2009, 12:46 pm
Posts: 15
Code:
#NoEnv
SendMode Input

_auto := true

~LButton::autofire()
Numlock::_auto := ! _auto
F1::ExitApp

autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 10
mouseXY(0, 6)
SendInput {LButton Up}
Sleep 45
}
else
break
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}


Its works good but when i shoot it brings the mouse downward right
i want it to go downward left
Is it possible?

[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 30th, 2009, 2:06 pm 
Offline

Joined: August 26th, 2009, 11:15 pm
Posts: 38
Location: Canada
Misc wrote:
Its works good but when i shoot it brings the mouse downward right i want it to go downward left
Is it possible?



Yeah I copied one of the other no recoil scripts and played with the ints in the dll call. no / less recoil and the added bonus of single fire at the rate of auto.

Code:
~lbutton::
loop
{
GetKeyState,updn, LButton, P
if updn = U
break

MouseClick, left,,, 1, 0, D
sleep, 5
MouseClick, left,,, 1, 0, U
DllCall("mouse_event", uint, 1, int, -3, int, 2, uint, 1, int, 1)
}
RETURN


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 30th, 2009, 6:06 pm 
Offline

Joined: August 29th, 2009, 12:46 pm
Posts: 15
Thanx man im going to try this right now


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Macro for game
PostPosted: August 30th, 2009, 8:05 pm 
Offline

Joined: August 29th, 2009, 12:46 pm
Posts: 15
Misc wrote:
Code:
#NoEnv
SendMode Input

_auto := true

~LButton::autofire()
Numlock::_auto := ! _auto
F1::ExitApp

autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 10
mouseXY(0, 6)
SendInput {LButton Up}
Sleep 45
}
else
break
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}


Its works good but when i shoot it brings the mouse downward right
i want it to go downward left
Is it possible?

[Title edited. Please write descriptive titles for your topics. ~jaco0646]


Hey how to change this up and make it go down or somewhere else each time i click it instead of holding it


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], coinman, joetazz, Leef_me, Yahoo [Bot] and 58 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group