Need help with something that should be "simple" Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Need help with something that should be "simple"

04 Apr 2018, 15:36

Is possibile with AutoHotKey to be able to have a determinate Input-Key when two different Key-Binds are pressed simultaneosly?

I will try to explain it better...

Example:

I press D, it write D...
I press T, it write T...
I press D and T together, it write P.

If someone need more detail on what I need exactly is pretty much that:

Left Arrow -> Left Arrow
Right Arrow -> Right Arrow
Left Arrow + Right Arrow -> Up Arrow

I would like to be able to do that so I only need these two Keybinds (Left and Right Arrow) to gain access to three Keybinds...
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Need help with something that should be "simple"

04 Apr 2018, 15:50

Code: Select all

#IfWinActive,
d::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return
t::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return
d & t::
  Send,p
return
Left & Right::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return

Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

04 Apr 2018, 16:01

SL5 wrote:

Code: Select all

#IfWinActive,
d::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return
t::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return
d & t::
  Send,p
return
Left & Right::
  Msgbox,`n (%A_LineFile%~%A_LineNumber%) 
return


Wow, so fast.

Thank you very much, but what I need to put in the Code instead of D/T/P for Left/Right/Up Arrows?
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: Need help with something that should be "simple"

04 Apr 2018, 16:07

Harvest_ wrote:
SL5 wrote:

Code: Select all

...

Wow, so fast.

Thank you very much, but what I need to put in the Code instead of D/T/P for Left/Right/Up Arrows?
did you tried reading the manual a minute?

https://autohotkey.com/docs/
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

04 Apr 2018, 16:10

SL5 wrote:
Harvest_ wrote:
SL5 wrote:

Code: Select all

...

Wow, so fast.

Thank you very much, but what I need to put in the Code instead of D/T/P for Left/Right/Up Arrows?
did you tried reading the manual a minute?

https://autohotkey.com/docs/
Not really, I just needed that Script for my Daughter and I asked in the Forum... I'm too old and not expert for these kind of things.

Anyway I tried the script and it does not work...
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

04 Apr 2018, 16:18

SL5 wrote:
Harvest_ wrote:
SL5 wrote:

Code: Select all

...

Wow, so fast.

Thank you very much, but what I need to put in the Code instead of D/T/P for Left/Right/Up Arrows?
did you tried reading the manual a minute?

https://autohotkey.com/docs/

Anyway I tried with logic and I menaged to do that, using:

t::t
d::d
t & d::p

But here is a problem, when I keep the T pressed it does not continue to write (tttttttttttttt), it write only when I release the key, there is something I can do do fix it? Make he input go on pressing and not releasing? (I also noticed that sometime it does not write T if I write really fast)
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: Need help with something that should be "simple"

05 Apr 2018, 00:52

Not really, I just needed that Script for my Daughter and I asked in the Forum... I'm too old and not expert for these kind of things.
:roll:
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Need help with something that should be "simple"

05 Apr 2018, 02:28

To be honest those kind of button chording isn't explained - I also have some problem with it.

@Harvest - chek my topic - https://autohotkey.com/boards/viewtopic.php?f=5&t=35440
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

05 Apr 2018, 05:05

BriHecato wrote:To be honest those kind of button chording isn't explained - I also have some problem with it.

@Harvest - chek my topic - https://autohotkey.com/boards/viewtopic.php?f=5&t=35440
I'm literally going crazy to make this work...
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

05 Apr 2018, 05:09

I found that, https://autohotkey.com/board/topic/4087 ... ng-script/

But I don't even understand what do I need to change in this Script and change with Left Right and UP
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

05 Apr 2018, 05:40

No, I mean which code line I need to change ahahah... I know is "Right","Left" and "Up".

Anyway I menaged to do it with that

Code: Select all

~Right & ~Left::
    Send, {Up down}
    While ( GetKeyState("Left") AND GetKeyState("Right") )

        Continue
    Send, {Up up}
Return
It work PERFECTLY, the only problem is that if you are pressing "Left" and you press "Right", it does not press "Up" it work only with Right pressed and Left pressed after...

If someone have a fix to that I will appreciate it
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Need help with something that should be "simple"

05 Apr 2018, 07:49

You really do not read what people link to you - especially my topic i've linked. "~" and while are completely expendable.

Your script works perfectly as you wrote it : right-then-left.
Harvest_
Posts: 8
Joined: 04 Apr 2018, 15:31

Re: Need help with something that should be "simple"

05 Apr 2018, 10:48

BriHecato wrote:You really do not read what people link to you - especially my topic i've linked. "~" and while are completely expendable.

Your script works perfectly as you wrote it : right-then-left.
Man, I'm not a Scripter... Is the first time I'm touching these kind of codes... I have zero experience, and I'm asking HELP to create something that I need...

I don't really care if something that I wrote is working as I wrote it, since is not doing what I need, I'm asking to more expert people to find a solution... This is the point of my Thread, I have zero clue of what I'm doing, I'm here for an answer
User avatar
BriHecato
Posts: 124
Joined: 18 Jul 2017, 07:17

Re: Need help with something that should be "simple"

05 Apr 2018, 23:14

Harvest_ wrote: I don't really care........ I have zero clue of what I'm doing, I'm here for an answer
That's not the way it works.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Rohwedder, Sniperman and 390 guests