Hi there, I've been trying to start learning AHK and i've gotten to a part that's causing me to pull my hair out.
I'm ok when it comes to making 2 button hotkeys with the joypad, but what I need is this... a 3 button joypad
hotkey where the order of those 3 key presses DOES matter.
Example: I need to Hold Joy 5, THEN Hold Joy6, and only THEN press Joy1 and release all. But I also need one
that is the reverse of that such that it Holds 6, THEN 5, then 1. Because of that, the order matters. Here is what I've
come up with so far, but none of it quite works. Thanks in advance for proving me the noob that I am and showing me
what i've done wrong.
Below are some of my attempts to get it working.
Joy1::
;This one Works
If GetKeyState("Joy5") & !GetKeyState("Joy6")
MsgBox, you pressed Joy1 while holding down Joy5!
;This one Works
Else if GetKeyState("Joy6") & !GetKeyState("Joy5")
MsgBox, you pressed Joy1 while holding down Joy6!
;This Works if 5 and 5 order does not matter.... But sadly it does
Else if GetKeyState("Joy5") & GetKeyState("Joy6")
MsgBox, you pressed Joy1 while holding down Joy5&Joy6
;But what I need is two for when order DOES matter
;i.e. Key presses need to be Hold Joy 5, Then Hold Joy6, Then press Joy1
;i.e. Key presses need to be Hold Joy 6, Then Hold Joy5, Then press Joy1
Return
;Below are a Few things I've Tried.
;This one Fires off even without pressing Joy6
Joy6 & Joy1::
If GetKeyState("Joy5")
MsgBox, Held Joy 5, Then Held Joy6, Then pressed Joy1!
Return
;This one Fires off reguardless of which of the 3 buttons are pressed.
;even when only 1 is pressed.
Joy1::
Joy6::
Joy5::
MsgBox, Held Joy 5, Then Held Joy6, Then pressed Joy1!
Return
;This one is similar to the one near the top where it it works in either order
;Joy5 then Joy6 then Joy1 works
;But so does Joy6 then Joy5 then Joy1 so that is not good.
Joy1::
If GetKeyState("Joy6")
If GetKeyState("Joy5")
MsgBox, Held Joy 5, Then Held Joy6, Then pressed Joy1!
Return
I will also need to have Joy5>Joy6>POVhat Up , Joy6>Joy5>POVhat Up, and so on, but I haven't quite made it to that point yet.
Thanks again for any and all help/advice.
- Home Board index AutoHotkey (v1.1 and older) Ask for Help (v1)
- Search
-
- It is currently 29 Mar 2024, 01:00
- All times are UTC-05:00
Game Controller 3 Button Question
Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)
Who is online
Users browsing this forum: Google [Bot] and 115 guests