Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

hold down gamepad button


  • Please log in to reply
8 replies to this topic
redfire123
  • Members
  • 6 posts
  • Last active: Mar 26 2012 03:33 PM
  • Joined: 26 Mar 2012
i want a script to hold down gamepad button like {ctrldown}{ctrlup}

well i need it to keep lock on enemy without keeping my hand on the lock on button all the time

just one press to hold down and one press to release

i hope you understand me

thanks

the button is {joy5}

joedf
  • Administrators
  • 986 posts
  • AutoHotkey Foundation
  • Last active: Sep 06 2016 01:13 AM
  • Joined: 20 May 2012
This will help u a lot just scroll down a tiny bit
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=69474">viewtopic.php?t=69474</a><!-- l -->
Why ahkscript.org? - autohotkey.com is outdated

redfire123
  • Members
  • 6 posts
  • Last active: Mar 26 2012 03:33 PM
  • Joined: 26 Mar 2012
I am very sorry ut idont know which part will help me.

joedf
  • Administrators
  • 986 posts
  • AutoHotkey Foundation
  • Last active: Sep 06 2016 01:13 AM
  • Joined: 20 May 2012
Check the toggle code that is what need?!
Why ahkscript.org? - autohotkey.com is outdated

Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004

Joy5::

Loop,

{

Send,{Ctrl Down}

GetKeyState, vState, NumPad0  ;NumPad 0 will stop the script

if vState = D

 Break

}




----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
toggle := 0

Joy5:: Send, % "{Ctrl " ( ( toggle := !toggle ) ? "Down" : Up ) "}"

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio Fran├ža -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004
hehehe.. Master is always cleaning up my silly coding ;-) nice job on that.. i always for get the fun Toggle
----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------

undine
  • Members
  • 15 posts
  • Last active: Nov 22 2012 01:28 AM
  • Joined: 12 Aug 2012
autohotkey can't send joystick/gamepad buttons
it can only react to them passively

Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004

autohotkey can't send joystick/gamepad buttons
it can only react to them passively

was that a joke or a real statement?
as my AHK scripts send joystick and gamepad buttons commands to what ever I want it to. Even had fun coding a joystick alalog stick to move the mouse pointer with my PS3 game pad plugged into my systems. (I do have to run Remote Joy first)
----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------