AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Question: releasing a button -> clicking a button

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Thu May 08, 2008 3:25 pm    Post subject: Question: releasing a button -> clicking a button Reply with quote

Uhm, for the game call of duty 4, there is no way to do this ingame, so I want to do this with AHK. I want to make my gun shoot, after I release the right mouse button (Pressing right mouse button -> zoom in, releasing it -> zoom out.) Now, if the gun would shoot when zooming out, it would be really fantastic Very Happy Only I have no clue to achieve this, though I had it working once in Counter-strike: Source
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Thu May 08, 2008 6:00 pm    Post subject: Reply with quote

I now got:

$RButton up::

Click, Left
Return


It does shoot when I release the right mouse button ,but it doesn't zoom in anymore when I press it too Sad what's wrong? In windows, the right mouse button doesn't bring up any menus anymore too, like I totally disabled it :'D
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Thu May 08, 2008 6:06 pm    Post subject: Reply with quote

$RButton::

Click, Right

$RButton up::

Click, Left

Only brings op the menu for 0,1 second, then clicks when I hold my mouse button
Back to top
View user's profile Send private message
james
Guest





PostPosted: Thu May 08, 2008 9:18 pm    Post subject: use ~ Reply with quote

if u put ~before $RButton eg ~$RButton it wont block its native function that should do it, never played cod4 but would be surprised if that cannot be done by modifying the settings i play a few first person shooters and have all allowed me to do this by editing the relative config files, hope this helped.
Back to top
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Thu May 08, 2008 11:31 pm    Post subject: Re: use ~ Reply with quote

james wrote:
if u put ~before $RButton eg ~$RButton it wont block its native function that should do it, never played cod4 but would be surprised if that cannot be done by modifying the settings i play a few first person shooters and have all allowed me to do this by editing the relative config files, hope this helped.

thanks a lot james, I will try it Smile
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Sat May 10, 2008 12:29 pm    Post subject: Reply with quote

~$RButton up::

Click, Left

This nearly works. The only problem I have now that it zooms out 1ms before it shoots, so the shots don't land because it shoots without being scoped. Now, is there a way to make it zoom out after I shot? (It zooms out when I release my right mouse button, and it shoots when I do this too)
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 702

PostPosted: Sat May 10, 2008 8:14 pm    Post subject: Reply with quote

you can try:
Code:
$RButton::Click R Down
$RButton up::
Click
Click R Up
return

_________________
My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Mon May 12, 2008 12:41 am    Post subject: Reply with quote

[VxE] wrote:
you can try:
Code:
$RButton::Click R Down
$RButton up::
Click
Click R Up
return

This works like a charm Very Happy thanks a lot! now I'm figuring out how to enable / disable the script with my Mouse4 / Mouse5 buttons, the pause command didn't work -_-'
Back to top
View user's profile Send private message
[VxE]



Joined: 07 Oct 2006
Posts: 702

PostPosted: Mon May 12, 2008 5:15 am    Post subject: Reply with quote

pr0phecy wrote:
how to enable / disable the script with my Mouse4 / Mouse5 buttons, the pause command didn't work -_-'

You could try the Suspend or Hotkey commands
_________________
My Home Thread
More Common Answers: 1. It's in the FAQ 2. Ternary ( ? : ) guide 3. Post code with [code][/code] tags
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Mon May 12, 2008 11:15 am    Post subject: Reply with quote

[VxE] wrote:
pr0phecy wrote:
how to enable / disable the script with my Mouse4 / Mouse5 buttons, the pause command didn't work -_-'

You could try the Suspend or Hotkey commands

I'll take a look at it, thanks man! Smile
Back to top
View user's profile Send private message
pr0phecy



Joined: 08 May 2008
Posts: 8

PostPosted: Mon May 12, 2008 11:23 am    Post subject: Reply with quote

$RButton::Click R Down
$RButton up::
Click
Click R Up
return
^!S::Suspend ,Toggle ; Mouse5

I now added this line to the script, but it didn't work Sad
Back to top
View user's profile Send private message
Guest






PostPosted: Tue May 13, 2008 9:12 am    Post subject: Reply with quote

bumpiebump, I really can't get it to work, do I have to add it to the top of the script maybe?
Back to top
Guest






PostPosted: Wed May 14, 2008 10:20 pm    Post subject: Reply with quote

bump
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group