Get Clipboard Text

akleine

  • Joined: Sep 30, 2010
  • Posts: 7

Mon 10/4/2010 - 6:04

 Hello !

I have Problems with the function Get ClipBoard Text.

Before this command I set the 'sent key' Control C.

In debugging mode everythings fine.

But in process it crashes with error 'cannot retieve clipboard content'.

Also I tried to insert a wait before the get clipboad command it doesn't work.

Whats wrong?

A.Kleine

 

 

 

#1

Samantha

  • Joined: Apr 23, 2010
  • Posts: 2396

Mon 10/4/2010 - 13:32

Hello there, When you are sending keystrokes in debugging mode everything is running to a fixed delay, so that you are able to view any problems that may occur. It is probably a timing issue, since you are moving on to the next action before the clipboard gets a chance to grab the text you sent in. (That's a wild guess) When you are sending in the Control+C do you actually have any text selected at that time that it will put on the clipboard? {Control}({C}) should be the keys you are sending in to grab the text.. If you wish, you can export and attach the job here so that we can help you figure it out (to export a job you simply select the job from the Jobspane in the Console and select the Export Job option from the file menu) :) Samantha

#2

akleine

  • Joined: Sep 30, 2010
  • Posts: 7

Mon 10/4/2010 - 20:59

 Hello Samantha,

the problem seems to be the clear clipboard event. If I disable this event its runs.

A.Kleine

 

 

 

 

 

Neuer Versuch.waj

#3

akleine

  • Joined: Sep 30, 2010
  • Posts: 7

Mon 10/4/2010 - 21:19

Hello Samatha, I have figure out thats the problems is the clear clipboard event which I set before the sent key Ctrl C. If I disable this event its work. Sorry I can't sent any file attachment 17 kb. Not possible !?? I gave up after 10 times A.Kleine

#4

Samantha

  • Joined: Apr 23, 2010
  • Posts: 2396

Tue 10/5/2010 - 11:36

Hello, Maybe you could try adding a delay of 1-2 secs before sending in the Control+C keys.. just to give it enough time to cleat the clipboard and then set a new text to the clipboard. I don't see why you cannot send an attachment.. I have had no probs, maybe there was a prob at that time you tried. You can try again, haven't you sorted it out by the time you are reading this post. :) Samantha

#5

winautouser

  • Joined: May 21, 2010
  • Posts: 15

Thu 10/21/2010 - 15:51

I have the same problem. I tried removing my "clear clipboard" command i had in there and it still fails with "cannot retrieve clipboard contents".

 

Uploading an example job. It's not a complete job because I'm not finished writing all of the actions but it will show the error.

ClipboardError.waj

#6

winautouser

  • Joined: May 21, 2010
  • Posts: 15

Thu 10/21/2010 - 15:59

Well I fixed it. :) Not sure why but I added a "retry if fails" to it and it worked. I set it to retry 2 times and it worked. Shouldn't have to do that but if it works then I'm happy.

#7

Samantha

  • Joined: Apr 23, 2010
  • Posts: 2396

Thu 6/21/2012 - 15:26

As I previously mentioned, in order for it not to fail, and to be realistic over our machine's performance, we would need to give the application some time to "think" that it has something new on the clipboard and process the type of information it has.

 

You need to give enough time for the process to "learn" that something is on the clipboard, as well as enough time to "return" the information that it has on the clipboard prior to emptying it.

 

Do:

 

Set Clipboard Text

Wait 0.5

Send Keys: {Control}({V})

Wait 0.5

Empty Clipboard    

 

Don't:

 

 

Set Clipboard Text

Send Keys: {Control}({V})

Empty Clipboard    

 

 

Hope the above makes sense.   

 

Samantha

#8
Not a member yet? Register

Copyright 2013 - Softomotive Ltd