mode activation like vim

Get help with using AutoHotkey and its commands and hotkeys
triven
Posts: 1
Joined: 03 Jun 2020, 08:39

mode activation like vim

03 Jun 2020, 08:49

Hi Everyone - Suppose I have complex key combination win+ctrl+x to cut and place text on stack. Now I have cut 15 texts. Pressing win+ctrl+x 15 times in quite time consuming and difficult. I am visualizing something like below.

Step1: Activate some sort of mode lets call in SpecialCutMode
Step2: Pressing . (period) trigger win+ctrl+x or maybe pressing some other key have a specific activation only only relevant while SpecialCutMode is active.
Step3: Exist SpecialCutMode mode

Any hints or guidance will be helpful.
mshafer1
Posts: 49
Joined: 16 Jul 2017, 14:49
GitHub: mshafer1
Contact:

Re: mode activation like vim

03 Jun 2020, 09:49

Check out Suspend command
Also for the number of times, you might find Loop helpful.

Something like this (untested):

Code: Select all

; toggle active or not on Win + p
#p::
	Suspend, Toggle
	if (A_IsSuspended)
		TrayTip, {Tool Name}, not active, 10, 1
	else
		TrayTip, {Tool Name}, Activated, 10, 1
	return

; . = Win + CTRL + X 15 times 
.::
	Loop, 15
	{
		Send, #^x
		Sleep, 500; delay 500 ms to let UI catch up
	}
	return
(update: re-read your post and realized you wanted to trigger on "." to call #^x, adjusted)

Return to “Ask For Help”

Who is online

Users browsing this forum: aftskin, austin4149, Bad husband, Google [Bot], mikeyww, songdg and 51 guests