AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Copy and paste isn't working for me ...

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Asaf
Guest





PostPosted: Sat Nov 07, 2009 11:41 am    Post subject: Copy and paste isn't working for me ... Reply with quote

Hi there

I am a newbie ,So I guess my problem is simple. all i want to do is copy a text and paste it. the thing is that it is not working for me unless the text i am trying to copy is lying on my IE explorer or firefox window ( copy from PDF & WORD doesn't work)
here is my script:

^+c::
{
Send, ^c
Sleep 50
run notepad.exe
Sleep 5000
Send, ^v
return
}

It seems the problem is with the copy command as the text isn't loaded to the clipboard (and to the notepad in consequence) .
I've tried to change the sleep time, well...

thanks for you help
Back to top
wooly_sammoth



Joined: 12 May 2009
Posts: 178
Location: Gloucester UK

PostPosted: Sat Nov 07, 2009 12:19 pm    Post subject: Reply with quote

Morning,

You could try replacing the Sleep command after th ^c with a ClipWait as this will specifically wait until the clipboard contains data rather than just pausing.
Back to top
View user's profile Send private message
Asaf
Guest





PostPosted: Sat Nov 07, 2009 1:08 pm    Post subject: I tried this and ... Reply with quote

thanks.. but it doesn't solved
I 've read the manual for clipwait command, and runned the following scipt which I have copied from the manual. as befoe, it works only when I copy from the explorer or firefox window. otherwise I get the failing message
cherish any help


^+c::
clipboard = ; Empty the clipboard
Send, ^c
ClipWait, 2
if ErrorLevel
{
MsgBox, The attempt to copy text onto the clipboard failed.
return
}
MsgBox, clipboard = %clipboard%
return
Back to top
rtcvb32



Joined: 17 Feb 2008
Posts: 125

PostPosted: Sat Nov 07, 2009 3:42 pm    Post subject: Reply with quote

I tested the code you gave, it seems to work fine.

However as a side note, a while back when i was working on large quantities of text, 2 seconds may not have been enough. Try upping it to say 5-6 seconds, or even take the limit off.

By large quantities of text, i was meaning 300k+ for experimentation. I am not entirely sure why the delay was no longer enough.
Back to top
View user's profile Send private message Yahoo Messenger
Guest






PostPosted: Sat Nov 07, 2009 5:57 pm    Post subject: Reply with quote

Try

Send, {CtrlDown}c{CtrlUp}

instead of ^c?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group