Win Key + V Clipboard Autofill

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
shuyungboat
Posts: 7
Joined: 27 Nov 2021, 11:31

Win Key + V Clipboard Autofill

Post by shuyungboat » 01 Dec 2021, 14:37

Hey there! I am trying to create a specific hotstring, in which I type a phrase and the following sequence of keystrokes happens:

Win Key + V (which opens the Windows 10 clipboard),
within the clipboard window: down arrow, down arrow, then enter (in order to enter that piece of copied text in the third slot from the top of the clipboard menu into the text box that I typed the initial hotstring into)
Then, I want it to hit Tab thrice from that text box to move down a few text boxes, then basically the same thing.
Win Key + V
within the clipboard window: down arrow, down arrow, down arrow, then enter.
Then enter again to complete the search on the website, which should work (I think) because hitting enter within the Clipboard brought up by Win + V pastes the piece of text selected, AND closed the clipboard window.

The working idea is something like this:

Code: Select all

:?*:nfi::{LWin Down}v{LWin Up}{Down 2}{Enter}{Tab 3}{LWin Down}v{LWin Up}{Down 3}{Enter}{Enter} 
The issue I am running into is the first set of Downs is not actually using the down arrow within the Clipboard window. It seems that the string is ignoring the down arrows and going straight to the enter, not selecting anything within the Clipboard. This causes the string to ignore the pasting, hit enter, which tries to complete the search on the website I am trying to autofill into. I also have this in my main hotstring/hotkey script (because I am still a novice and I was told to): SendMode Input. Could this be the problem? Not really sure why those {Down 2} are not actually pressing down/registering as the down key with that little Clipboard Window.
Thanks in advance for any help!

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

Re: Win Key + V Clipboard Autofill

Post by mikeyww » 01 Dec 2021, 17:22

As far as I can tell, the Windows clipboard "widget" is not active in a way that receives keyboard sequences. I'm not sure, just guessing from when I tried it.

It's easy enough to create your own clip list or use one of the many others available if that would help. I have a simple clip list that I display in a AHK listview. I can then jump to any entry and select it. There are ClipJump, ClipClip, Ditto, and a variety of other ones available, too.

User avatar
shuyungboat
Posts: 7
Joined: 27 Nov 2021, 11:31

Re: Win Key + V Clipboard Autofill

Post by shuyungboat » 01 Dec 2021, 18:51

I am definitely interested in trying to create a clipboard list in AutoHotKey. How is this done?

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

Re: Win Key + V Clipboard Autofill

Post by mikeyww » 01 Dec 2021, 21:41

If you search for ClipJump, you can find the script, and use or modify it.

Below is a simple method that uses menus.

Code: Select all

Global clip := [], max := 9
OnClipboardChange("clipChanged")

^!0::Try Menu, clips, Show

Paste:
SendInput % "{Text}" clip[A_ThisMenuItemPos]
Return

clipChanged(type) {
 If (type != 1)
  Return
 SoundBeep, 2000
 If clip.Count() = max {
  clip.RemoveAt(1)
  Menu, clips, Delete, 1&
 }
 clip.Push(Clipboard)
 Menu, clips, Add, % SubStr(Clipboard, 1, 25), Paste
}

Post Reply

Return to “Ask for Help (v1)”