AHK v2 delete the text without any reason

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
xMaxrayx
Posts: 136
Joined: 06 Dec 2022, 02:56
Contact:

AHK v2 delete the text without any reason

Post by xMaxrayx » 25 May 2023, 23:52

Hi, I made this simple script but AHK delete the text for no reason (after AHK move the text cursor)

Code: Select all

$^b::SendInput "{CtrlDown}{ShiftDown}{Left 1} {ShiftUp}{CtrlUp} "
I tired this but same problem

Code: Select all

^b::Send "{CtrlDown}{ShiftDown}{Left 1} {ShiftUp}{CtrlUp} "

User avatar
xMaxrayx
Posts: 136
Joined: 06 Dec 2022, 02:56
Contact:

Re: AHK v2 delete the text without any reason

Post by xMaxrayx » 26 May 2023, 03:31

ok this work with me idk why

Code: Select all

^b::Send("{shift Down}^{Left}{shift Up}") 
-----------------------ヾ(•ω•`)o------------------------------
https://github.com/xmaxrayx/

User avatar
mikeyww
Posts: 26602
Joined: 09 Sep 2014, 18:38

Re: AHK v2 delete the text without any reason

Post by mikeyww » 26 May 2023, 05:18

If needed, the :arrow: KeyHistory can show you what is happening with the keys.

Code: Select all

#Requires AutoHotkey v2.0
^b::Send '{Blind}+{Left}'

User avatar
xMaxrayx
Posts: 136
Joined: 06 Dec 2022, 02:56
Contact:

Re: AHK v2 delete the text without any reason

Post by xMaxrayx » 29 May 2023, 06:25

mikeyww wrote:
26 May 2023, 05:18
If needed, the :arrow: KeyHistory can show you what is happening with the keys.

Code: Select all

#Requires AutoHotkey v2.0
^b::Send '{Blind}+{Left}'
I see, thank you I never heard about {Blind} before
-----------------------ヾ(•ω•`)o------------------------------
https://github.com/xmaxrayx/


User avatar
xMaxrayx
Posts: 136
Joined: 06 Dec 2022, 02:56
Contact:

Re: AHK v2 delete the text without any reason

Post by xMaxrayx » 10 Jun 2023, 13:48

@thx again ^^



turn out some keys interface with code so you need the other mothed

Code: Select all


^b::
f2::
{
Send '{Blind}+{Left}'
}
here Ctrl+b will work correctly but F2 will fail so you need to use the other code

Code: Select all

f2:: Send("{shift Down}^{Left}{shift Up}")
-----------------------ヾ(•ω•`)o------------------------------
https://github.com/xmaxrayx/

Post Reply

Return to “Ask for Help (v2)”