Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6929683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:20:57+00:00 2026-05-27T11:20:57+00:00

as we all experienced one time or more, it sometimes is really annoying to

  • 0

as we all experienced one time or more, it sometimes is really annoying to have to replace your clipboard-content with other content (while you only need the other information once or so).

I thought we could solve this problem using autohotkey, but I have no clue how to.

I’m thinking about setting variables in a hotkey, like when you press CtrlC, the old clipboard-content gets stored inside AutoHotkey, and you could retrieve that old content by pressing i.e. AltV, while the normal CtrlV just returns the current value of the clipboard.

Could anyone help me with this please? I don’t know how to permanently store values inside AutoHotkey.

Regards,
Aart


EDIT:

I have found the perfect script. I modified it as I wanted it to work. You can now just use Ctrl+C and carry on copying, but if you want to retrieve something, just use AltLeftArrow and it’s there! Have fun with it; I know I will. 🙂

Controls:

  • Ctrl+C >> copy
  • Alt+V >> paste
  • Alt+Left Arrow >> cycle back
  • Alt+Right Arrow >> cycle forward
  • Alt+H >> display this message

Code:

handleClip(action)
{
   global static AddNextNum
   global static GetNextNum
   global static HighestNum
   global static ClipArray
   global static ClipArray1
   global static ClipArray2
   global static ClipArray3
   global static ClipArray4
   global static ClipArray5
   global static ClipArray6
   global static ClipArray7
   global static ClipArray8
   global static ClipArray9
   global static ClipArray10
   global static ClipArray11
   global static ClipArray12
   global static ClipArray13
   global static ClipArray14
   global static ClipArray15
   global static ClipArray16
   global static ClipArray17
   global static ClipArray18
   global static ClipArray19
   global static ClipArray20
   global static ClipArray21
   global static ClipArray22
   global static ClipArray23
   global static ClipArray24
   global static ClipArray25
   global static ClipArray26
   global static ClipArray27
   global static ClipArray28
   global static ClipArray29
   global static ClipArray30

   if (action = "save")
   {
      if (AddNextNum < 30)
      {
         AddNextNum += 1 ;
      }
      else
      {
         AddNextNum := 1 ;
      }


      if (HighestNum < 30)
      {
         HighestNum += 1 ;
      }

      GetNextNum := AddNextNum ;   
      ClipArray%AddNextNum% := Clipboard
   }
   else if ((action = "get") OR (action = "roll"))
   {
      if (GetNextNum != 0)
      {
         if (action = "roll")
         {
            Send, ^z
         }
         Clipboard := ClipArray%GetNextNum%
         if (GetNextNum > 1)
         {
            GetNextNum -= 1 ;
         }
         else
         {
            GetNextNum := HighestNum
         }
         Send, ^v
      }
   }
   else if (action = "rollforward")
   {
      if (GetNextNum != 0)
      {
         Send, ^z
         if (GetNextNum < HighestNum)
         {
            GetNextNum += 1 ;
         }
         else
         {
            GetNextNum := 1
         }
         Clipboard := ClipArray%GetNextNum%
         Send, ^v
      }
   }
   else if (action = "clear")
   {

      GetNextNum := 0
      AddNextNum := 0
      HighestNum := 0
   }
}

!0::
   handleClip("clear")
return

^c::
   suspend on
   Send, ^c
   suspend off
   handleClip("save")

return

!v::
   handleClip("get")
return

!Left::
   handleClip("roll")
return

!Right::
   handleClip("rollforward")
return

!H::
MsgBox Extended Clipboard controls: `r`n`r`nCtrl+C >> copy `r`nAlt+V >> paste `r`nAlt+Left Arrow >> cycle back `r`nAlt+Right Arrow >> cycle forward`r`nAlt+H >> display this message

DISCLAIMER: I didn’t write this code myself. I just modified it. The original script can be found here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T11:20:57+00:00Added an answer on May 27, 2026 at 11:20 am

    This is how I solved it. I even store the values in a file, so they stay in “memory” after a reboot….

    +#F1:: ; Shift Windows F1
    M1=
    Sleep, 50
    Send, ^c
    Clipwait
    Sleep, 100
    M1 = %clipboard%
    IniWrite, %M1%, C:\Tmp\Robert.ini, Memory, M1
    TrayTip, Copy,Data stored in M1,1,1
    return
     #F1:: ; Windows + F1
    If M1 =
    {
      IniRead, M1, C:\Tmp\Robert.ini, Memory, M1
    }
    ClipBoard = %M1%
    Send, ^v
    TrayTip, Paste,Data pasted from M1,1,1
    Return
    

    Then did the same for Windows + F2 ….. Windows + F4

    Hope this helps

    Oh, b.t.w. this strips all formatting from your data….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know this isn't strictly a programming question but y'all must have experienced this.
First of all: I am not an experienced ClearCase user, but I have lots
On the advice of a more experienced developer, I have always coded my web
I am an experienced .NET applications developer. All of my development experience has been
Disclaimer: I have no experience using YUI at all. I was wondering how the
Does anyone have any experience of storing data in JavaScript across all mobile platforms
I have volunteered to give a one hour lunchtime briefing at my workplace to
All right, this one is going to sound very weird and I don't know
I would just like to find out from some more experienced developers what the
I've put all of my user-authentication code in one place, namely lib/auth.rb. It looks

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.