storing and retrieving clipboards issue

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

storing and retrieving clipboards issue

11 Mar 2014, 05:04

I have been unsuccessfully trying to store an n number of clipboards that I would like to later retrieve in a target application.

Although a clipboard-viewing application is showing the clipboard contents (which is xml data in my case) is getting stored, when I send ^v to the application later on, nothing gets pasted.

Would you be able to suggest some workaround?

Btw. I tried exporting either version of the clipboard -- the one captured in-app via ctrl+c, and the one copied into my own variable in my ahk script -- via Free Clipboard Viewer; both versions of the clipboard output a file of identical size, but different CRC.)

Below are relevant excerpts from my code.

Thank you.

Code: Select all

Counter     := 1
EventsNumber := 10

While Counter <= EventsNumber

	{
		Send ^c
		MyClipboards%Counter% := Clipboardall		
		sendinput {Right} ; relevant to the target application
		Counter++
	}

Code: Select all

Counter     := 1
While Counter <= EventsNumber

	{
		NewClp := MyClipboards%Counter%
		Clipboard := NewClp
		sleep, 250 ; for debugging purposes
		Send ^v
		sleep, 250 ; for debugging purposes
		Counter++
	}
User avatar
jigga
Posts: 93
Joined: 24 Jan 2014, 00:31

Re: storing and retrieving clipboards issue

11 Mar 2014, 12:30

Code: Select all

Counter     := 1
While Counter <= EventsNumber

    {
        NewClp := MyClipboards%Counter%
        Clipboard := NewClp
        Clipwait
        sleep, 250 ; for debugging purposes
        Send ^v
        sleep, 250 ; for debugging purposes
        Counter++
    }
see if that works :)
beeski
Posts: 18
Joined: 06 Feb 2014, 08:38

Re: storing and retrieving clipboards issue

11 Mar 2014, 14:22

jigga wrote:

Code: Select all

Counter     := 1
While Counter <= EventsNumber

    {
        NewClp := MyClipboards%Counter%
        Clipboard := NewClp
        Clipwait
        sleep, 250 ; for debugging purposes
        Send ^v
        sleep, 250 ; for debugging purposes
        Counter++
    }
see if that works :)
thank you. it hasn't, but not because of wrong code, i believe; i had to give up, as it seems the target application isn't giving out all the information about objects copied to the clipboard. xml data appears in the clipboard following edit>copy, but i figured there is more that isn't accessible (at least i don't know how to access it).

i ran some tests where i selected and copied to the clipboard (the traditional way using edit>copy) the same object in the application twice-- each time, the object bore different metadata (two instances of the same object, differently color-coded). i then created clipboard dump files using a clipboard-viewing application, which has produced two identical files (same crc, same size), although in the project, the two objects, like i said, were differently-coloured, so there has to be some extra layer of information that the program is not giving me, and that clearly does not 'survive' when (re)storing clipboards' contents in arrays.

this is my amateur conclusion, anyway; if someone could enlighten me on the topic, i'd appreciate that!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, rc76, uchihito and 372 guests