Hi,
At work we are considering a new email client with integrated '@mention' functionality. This system runs through a web browser. In neither the email compose window nor the @mention comment 'box' does "ctrl+L/RArrow" move the text caret by a whole word (either left or right respectively). The developers of this app say that this functionality (or lack of it) is not something coded by them.
This is driving me nuts - in almost every other application I use, this functionality is natively built in to the app and is something that I habitually use.
So my question is, for an app without the ability to move the text caret by a whole word natively built in, can I use any autohotkey scripting to emulate this?
Any advice much appreciated.
AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Re: AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Hallo,
does the application provide a way to search the next Space up and down?
does the application provide a way to search the next Space up and down?
Re: AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Hi Rohwedder,
Thanks for looking and taking time to reply.
Are you wondering if there is a search or find facility within this app's email composer and the @mention comment box? Sadly there is no such facility.
I guess that I could use autohotkey to move, eg., 5 characters to left with Send, ^{Left 5}. But clearly that could leave you in the middle of a word!
Could I script something that would, for a single Send, ^{Left} combination, keep moving the caret one character at a time, testing each time whether the character next to the caret is a space? And then stop moving the caret when the first space is encountered? Even if I could do this, would it be responsive enough to accommodate may successive and quick presses of Send, ^{Left} to rapidly move the caret around the text?
Thanks again for considering and hope I've understood your comment.
Thanks for looking and taking time to reply.
Are you wondering if there is a search or find facility within this app's email composer and the @mention comment box? Sadly there is no such facility.
I guess that I could use autohotkey to move, eg., 5 characters to left with Send, ^{Left 5}. But clearly that could leave you in the middle of a word!
Could I script something that would, for a single Send, ^{Left} combination, keep moving the caret one character at a time, testing each time whether the character next to the caret is a space? And then stop moving the caret when the first space is encountered? Even if I could do this, would it be responsive enough to accommodate may successive and quick presses of Send, ^{Left} to rapidly move the caret around the text?
Thanks again for considering and hope I've understood your comment.
Re: AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Hallo DaveT1,
Are you able to mark the next few characters to the right or left with Send or MouseMove? AutoHotkey could copy it and test it on space or tabs.
Are you able to mark the next few characters to the right or left with Send or MouseMove? AutoHotkey could copy it and test it on space or tabs.
Re: AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Hi Rohwedder,
So, for example, this:will move the text caret 15 to the left and leave those 15 characters highlighted. This is what I would expect the native behaviour to be in most apps ie., that holding shift + left arrow highlights the characters to the left of the original caret location. Is your thinking this - to
(1) copy that highlighted text to a variable with {control down}{c}{control up}.
(2) test that variable string for a space, and find the location in that string of any space.
(3) Then send the caret to that location?
Again, many thanks for taking an interest.
So, for example, this:
Code: Select all
#IfWinActive, ahk_class HwndWrapper[frontapp.exe;;9f252e37-26b2-49f5-a940-8d15a47969a7]
{
^g::Send, {shift down}{Left 15}{shift up}
}
#IfWinActive
(1) copy that highlighted text to a variable with {control down}{c}{control up}.
(2) test that variable string for a space, and find the location in that string of any space.
(3) Then send the caret to that location?
Again, many thanks for taking an interest.
Re: AHK script to emulate "ctrl+L/RArrow" when this is not native in the app
Hallo, Yes, I thought so.
You must debug this yourself
You must debug this yourself
Code: Select all
Steps = 15
Return
^Right::
ClipSaved := ClipboardAll
Clipboard =
Send, +{Right %Steps%}
Send, ^c
ClipWait, 1
Pos := InStr(Clipboard, A_Space)
While, (SubStr(Clipboard,Pos+1,1) = A_Space)
Pos++
Clipboard := ClipSaved
If Pos
{
Back := Steps - Pos
Send, {Left %Back%}
}
Send, {Left}{Right}
Return
^Left::
ClipSaved := ClipboardAll
Clipboard =
Send, +{Left %Steps%}
Send, ^c
ClipWait, 1
Pos := InStr(Clipboard, A_Space,,0)
If (Pos = Steps)
Pos := InStr(Clipboard, A_Space,,-1)
While, (SubStr(Clipboard,Pos,1) = A_Space)
Pos--
Clipboard := ClipSaved
Send, {Right %Pos%}
Send, {Left}{Right}
Return
Who is online
Users browsing this forum: Google [Bot], mikeyww and 139 guests