Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Using one key to send multiple keys after eachother


  • Please log in to reply
9 replies to this topic
HeyDude
  • Guests
  • Last active:
  • Joined: --
I got something like this,

p::
Send {p}
Send {o}
return

Now it does both keys at the exact same time, I want when I press p that It waits for like 0,5 second and then sends the o key.

I've got no clue how to do this. Beginner :roll:

Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
Like this

p:: 
Send {p} 
Sleep, 500
Send {o} 
Return


Hope it helps

Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

HeyDude
  • Guests
  • Last active:
  • Joined: --
Thanks it works, however it doesnt work in game :(

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

Thanks it works, however it doesnt work in game :(

Dude - is the game in Full Screen mode?
what game is it?
----------------------------
Wingfool you fat! I mean, Wingfat you fool!
Line from Woody Allen's movie "What's Up Tiger Lilly?"
-----------------------------

girlgamer
  • Moderators
  • 3263 posts
  • Last active: Feb 01 2015 09:49 AM
  • Joined: 04 Jun 2010
Certain games routinely block autohotkey sends. That can also happen if the game is running in fullscreen mode or if the game has anti-cheat software that specifically targets autohotkey scripts like XTrap or Punkbuster and others. Another way that can happen is if the sends occur too fast to be handled by the game and the keys are simply thrown away.

The universe is a wondrous place! The faster you create unbreakable code, the faster the universe creates people that can break it. All scripting follows the rule Rule Of Twos -- 1) Good, 2) Fast 3) Cheap -- pick any Two.
I guarantee absolutely nothing about any code I provide except that it works in my machine. ●
MMO Fighter   KeyLooperDemo   Key Spammer   TinyClickRecorder  GGs Password Generator.ahk
For the newest version of AutoHotkey and some killer scripts go here.
Rock-on%20kitten.gif


Wingfat
  • Members
  • 937 posts
  • Last active: Oct 14 2015 04:20 PM
  • Joined: 23 Aug 2004
Always great points by GirlGamer! I do run into Speed being a factor a lot. And the SendPlay command helps on some games where the Send isn't cutting it.
----------------------------
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
Related: <!-- m -->http://www.autohotke...s/FAQ.htm#games<!-- m -->

Also, even if that hotkey works, it's valid to mention the $ modifier:
<!-- m -->http://www.autohotke...eys.htm#Symbols<!-- m -->

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

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.


roncarver
  • Members
  • 3 posts
  • Last active: May 13 2015 06:55 PM
  • Joined: 04 Oct 2012
I tried the sample suggested, but my sequence only works have way. My objective is return second monitor screen back to laptop screen.

My entire sequence intended was 4 keys
windows P left enter

I tried this
F12::Send #P
sleep,500
send {left}{return} or {enter ]
;sleep,500
;return
It only works to #p
I tried to split the second part into F11 and that does not work.
;F11::send {left}{return}
;F11::send {left}{enter}
F11:: left
;sleep,500
;return

What I am doing wrong?

Jackie Sztuk _Blackholyman
  • Spam Officer
  • 3757 posts
  • Last active: Apr 03 2016 08:47 PM
  • Joined: 28 Feb 2012
F12::
Send #P
sleep,500
send {left}{enter}
return

The thing is that if you, put the send on the same line as the hotkey, it will take it as a remap of that key.

Hope it helps

Helping%20you%20learn%20autohotkey.jpg?d

[AHK] Version. 1.1+ [CLOUD] DropBox ; Copy [WEBSITE] Blog ; About

roncarver
  • Members
  • 3 posts
  • Last active: May 13 2015 06:55 PM
  • Joined: 04 Oct 2012
Thanks for te response and thanks for 2 more things:
1 It did solve my problem. It works!!!.
2 I was able to learn more about autohotkey.

I was using the Fn F3 to take the screen from laptop to The external monitor. That is 2 key strokes.
Well by reversing the keys selection by using "right and not the left in a F11 assigmnet, so now it takes one key only.

Since you are giving me a winning hand, perhaps you may have the knowing in just how to send the windows screen with the focus only?

In other words now those key combination above, send the whole screen, both open and focused screen.
Is there a combination to just send the screen with the focus?