help me create macro keys :(

Get help with using AutoHotkey and its commands and hotkeys
Reika

help me create macro keys :(

23 Jul 2016, 19:07

is it possible to create these macro keys

ex.1
if i press letter B ( keyboard )
it will Hit Ctrl I and after that Ctrl B

or for short
if i press B > CTRL I > STOP ( 0.50ms ) > then CTRL B

i hope someone can help me
thanks in advance
User avatar
Hajin
Posts: 48
Joined: 13 May 2016, 09:16

Re: help me create macro keys :(

23 Jul 2016, 20:28

In this example the ("little" :D ) script: does "Ctrl + a", wait for 1 sec and then writes "aaa"...
Te script starts with key "a" pressed.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetTimer, Button_Pressed, 1
return

Button_Pressed:
	GetKeyState, state, a
	if state = D
	{
		Send {Control down}
		Sleep, 100
		Send {a}
		Sleep, 100
		Send {Control down}
		Sleep, 1000
		Send aaa
	}
	else
	{}
return

Return to “Ask For Help”

Who is online

Users browsing this forum: Frosti, mcl, Rohwedder, Xeo786 and 54 guests