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 9068719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:15:30+00:00 2026-06-16T17:15:30+00:00

My clipboard controller could have several items copied to the clipboard when using a

  • 0

My clipboard controller could have several items copied to the clipboard when using a hotkey (CTRL + SHIFT + Q), instead of only one item, and pastes all at once (CTRL + SHIFT + W), or paste any of the first 10 items directly (CTRL + SHIFT + 1 … 9). Another option is to clear the clipboard (CTRL + SHIFT + -).

It works just for several copy and pastes, but then trying to make a copy operation nothing is added to the buffer. I couldn’t find a reason for this.

Code (problem should be in the addToClipboard() or getAll()) :

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <array.au3>

Global $clipBoard[50]=[""]
Global $counter = 0

HotKeySet("^+q","addToClipboard")
HotKeySet("^+-","emptyAll")
HotKeySet("^+w","getAll")
HotKeySet("^+1","get1")
HotKeySet("^+2","get2")
HotKeySet("^+3","get3")
HotKeySet("^+4","get4")
HotKeySet("^+5","get5")
HotKeySet("^+6","get6")
HotKeySet("^+7","get7")
HotKeySet("^+8","get8")
HotKeySet("^+9","get9")

$hGUI = GuiCreate("Clipboard Controller", 100, 100,Default,Default,$WS_SIZEBOX)
GUISetState()

Func addToClipboard()
    Send ("^c")
    $copied = ClipGet()
    $clipBoard[Mod($counter,50)] = $copied
    $counter +=1
EndFunc

Func getByIndex($i)
    $statement = $clipBoard[$i]
    ClipPut($statement)
    Send("^v")
EndFunc

Func getAll()
    $statement =""
    For $i In $clipBoard
        If $i <> "" Then
            $statement &= $i & @CRLF
        EndIf
    Next
    ClipPut($statement)
    Send("^v")
EndFunc

Func emptyAll()
    For $i=0 To 49
        $clipBoard[$i]=""
    Next
    ClipPut("")
EndFunc

Func get1()
    getByIndex(0)
EndFunc

Func get2()
    getByIndex(1)
EndFunc

Func get3()
    getByIndex(2)
EndFunc

Func get4()
    getByIndex(3)
EndFunc

Func get5()
    getByIndex(4)
EndFunc

Func get6()
    getByIndex(5)
EndFunc

Func get7()
    getByIndex(6)
EndFunc

Func get8()
    getByIndex(7)
EndFunc

Func get9()
    getByIndex(8)
EndFunc

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd
  • 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-06-16T17:15:31+00:00Added an answer on June 16, 2026 at 5:15 pm

    Problem is an old trap…

    It takes a small amount of time to copy to the clip board
    especially large items..try a sleep after the Send

    Func addToClipboard()
    Send ("^c")
    sleep(1000) ; try different values
        $copied = ClipGet()
    $clipBoard[Mod($counter,50)] = $copied
    $counter +=1
    EndFunc
    

    anyway like your script..idea

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

Sidebar

Related Questions

i have a problem using the Catch Clipboard Events code found on this link
I'm trying to get the clipboard ring working by pressing Ctrl + Shift +
Possible Duplicate: using Clipboard in WP7 programming For example you have a long text
I have some Classes like Clipboard or ProcessRegister that I only want to run
I want to access the clipboard using Python 3.1. I've obviously come across win32clipboard,
How can you copy text to clipboard using Javascript (or even nicer a jQuery
It's not (visibly) using the clipboard because it doesn't trash the clipboard contents... where
When one call Clipboard.generalClipboard.getData() in ActionScript outside of Event.PASTE processing function it fails with
I'm getting images from clipboard using this: if(Toolkit.getDefaultToolkit().getSystemClipboard().isDataFlavorAvailable(DataFlavor.imageFlavor)){ ImageIcon IMG = new ImageIcon((BufferedImage) Toolkit.getDefaultToolkit().getSystemClipboard().getData(DataFlavor.imageFlavor));
I want to paste an image from clipboard to an excel cell using vba.

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.