[jawsscripts] Re: clipboard events

  • From: "Paul Magill" <magills@xxxxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Wed, 3 Mar 2010 22:04:41 +1100

Hi,

Below the comments, are some suggestions...

I dont believe there is such an event, and would expect there could not be, 
as pasting from the clipboard makes no changes to the clipboard.  Even if 
you paste something where it cant go, such as to a menu item, Jaws just 
says, "pasted", as it can not tell whether it got pasted.

Some possibilities:
1. you could script your own Control+V script, & in that script, following a 
small Pause () after the PasteFromClipboard () line, use something like 
GetTextInWindowor GetWindowText to obtain the text in the window in which 
the attempt to paste was made, & compare it to the text still on the 
clipboard.
example: if (StringContains (GetTextInWindow(parameters) == 
GetTextFromClipboard())) then...

2. if the process that pastes the text to the window is automated, or you 
dont have the possibility of scripting it as above, then you *may* be able 
to catch it with NewTextEvent. In NewTextEvent you would compare the handle 
of the window with the new text, to the handle of the window where the paste 
was made, perhaps the focus window, then compare the text received by 
NewTextEvent with the text still on the Clipboard, as above, or perhaps with 
the StringContains parameters reversed, as NewTextEvent does not always 
report newly written text all in one block.

* If the  comparison is true, then the paste has been confirmed, then just 
use CopyToClipboard to copy a nul string to the clipboard.
example: CopyToClipboard ("")

Hope something here is useful.

Regards,
Paul from Aust


----- Original Message ----- 
From: "The dark Count" <darkcount1@xxxxxxxxx>


HI all.
I am trying to find a solution to a little problem concerning the clip 
board.
Ihave an application in which I need to copy information from a window to 
paste into another.
This is all good, but I need to find a way to check if the information has 
been pasted, and
then have the clipboard reset so that it is either clear or it has something 
else but the
information collected from the prior window.
Is there an event perhaps not documented out there that can tell me this?
Can't find it in the fcnd.
Any suggestions if not as to how I can test for this?


tia

D C

__________ 
Visit and contribute to The JAWS Script Repository http://jawsscripts.com

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: