Hello,
I am creating a few functions that change selected text. The functions just copy text (Ctrl + c and ClipWait), change it and then paste it (SendInput ^v). Text have to be pasted by Ctrl + v because the text is usually a big paragraph and SendInput {Raw}%Clipboard% takes too long.
Everything works fine but today a realized that functions does not works in some applications. I tested functions in Notepad and in Notepad there are OK. They did not worked in some Microsoft Office applications but I know that MS Office use own clipboard history so I thought that it somehow cripple the functions and so I did not try to correct it. But today I found that functions also cannot be used in PSPad and UEStudio (programming editors) and that is bad. I found that copying works but pasting do not.
I am looking for solution but I cannot find the answer. Please does anybody know why the pasting is not working in so many applications? Is there some solution? I found something about COM calls but I do not know if it it can replace Ctrl + c and Ctrl + v.
Thank you very much.
P.S. I am using clipboard manager Ditto but I think that this is not a problem...
Ctrl + v (SendInput ^v) is not working in many applications
Started by
Revil
, Mar 05 2012 04:15 PM
10 replies to this topic
#1
-
Posted 05 March 2012 - 04:15 PM
I use UE and paste all day long with AutoHotkey.
Without seeing your code it is hard to tell what the problem is, you also don't describe what doesn't work, do you paste the old clipboard content or paste nothing etc.
Try adding sleep after you assign new content to the clipboard, better yet use <!-- m -->http://www.autohotke... ... #Clipboard<!-- m --> Clip() VirClip or Winclip
And yes, turn off your ditto manager as a test, it might indeed be the culprit. I use CLCL which works perfect with AutoHotkey and UE, Word etc.
Without seeing your code it is hard to tell what the problem is, you also don't describe what doesn't work, do you paste the old clipboard content or paste nothing etc.
Try adding sleep after you assign new content to the clipboard, better yet use <!-- m -->http://www.autohotke... ... #Clipboard<!-- m --> Clip() VirClip or Winclip
And yes, turn off your ditto manager as a test, it might indeed be the culprit. I use CLCL which works perfect with AutoHotkey and UE, Word etc.
#2
-
Posted 05 March 2012 - 04:19 PM
Hello,
thank you very much for your answer. I turn off Ditto clipboard manager and start testing.
I wrote this simple code:
In Notepad: Show dialog "Test string" and paste "Test string".
In UEStudio v11.20.0.1006: Show dialog "Test string" and paste the old content of the clipboard. I do not understand why...
Thank you.
thank you very much for your answer. I turn off Ditto clipboard manager and start testing.
I wrote this simple code:
ClipboardCopy = %ClipboardAll% Clipboard = Test string Sleep, 1000 MsgBox, %Clipboard% SendInput ^v Clipboard = %ClipboardCopy% ClipboardCopy =
In Notepad: Show dialog "Test string" and paste "Test string".
In UEStudio v11.20.0.1006: Show dialog "Test string" and paste the old content of the clipboard. I do not understand why...
Thank you.
#3
-
Posted 06 March 2012 - 03:54 AM
I just found the problem!
This is the problem:
Because this:
Clipboard = %ClipboardCopy% is restoring of the original content of the clipboard. But the restoration is made after Ctrl + v so it is weird that it is the problem.
This is the problem:
Clipboard = %ClipboardCopy% ClipboardCopy =
Because this:
ClipboardCopy = %ClipboardAll% Clipboard = Test string Sleep, 1000 MsgBox, %Clipboard% SendInput ^v Sleep, 1000 ; Wait, wait, wait, wait, wait, wait !!!!!!!!!!!!! Clipboard = %ClipboardCopy% ClipboardCopy =is working.
Clipboard = %ClipboardCopy% is restoring of the original content of the clipboard. But the restoration is made after Ctrl + v so it is weird that it is the problem.
#4
-
Posted 06 March 2012 - 04:11 AM
This should be better anyway note the lack of %%
ClipboardCopy := ClipboardAll Clipboard := "Test string" Sleep, 1000 MsgBox, % Clipboard Send ^v ; you can also try various send methods Clipboard := ClipboardCopy ClipboardCopy =
#5
-
Posted 06 March 2012 - 07:27 AM
Have you tried all of this key-combo ?
Copy : ^{vk43} or ^c or ^{Ins} Paste : ^{vk56} or ^v or +{Ins} Cut : ^{vk58} or ^x or +{Del}
#6
-
Posted 06 March 2012 - 08:33 AM
Win7 - Firefox 10.0.2 - AHK_L 1.1.07.00
Please bear with me and my English which is so bad at times that even I don't understand myself
Please bear with me and my English which is so bad at times that even I don't understand myself
This should be better anyway note the lack of %%
I never heard about this problem with variables. I usually prefer variables. Should I rather use expressions everywhere?
Thank you very much for you explanation.
#7
-
Posted 06 March 2012 - 08:40 AM
Perhaps I was not clear. Have you tried to paste Sending ^{vk56} or +{Ins} instead of ^v ?
#8
-
Posted 06 March 2012 - 08:44 AM
Win7 - Firefox 10.0.2 - AHK_L 1.1.07.00
Please bear with me and my English which is so bad at times that even I don't understand myself
Please bear with me and my English which is so bad at times that even I don't understand myself
I am sorry Odlanir my last post was not respond to your post.
I will try other keyboard shortcuts... Thanks.
I will try other keyboard shortcuts... Thanks.
#9
-
Posted 06 March 2012 - 09:01 AM
ClipboardAll may have binary data (rich text, images etc) so by using %ClipboardAll% it may loose some of its formatting (I think but could be wrong) Besides := is shorter to write as wrapping everything in %% ;-)I never heard about this problem with variables. I usually prefer variables. Should I rather use expressions everywhere?
#10
-
Posted 06 March 2012 - 09:07 AM
So I made big testing and here are results...
I tried all combinations and all keyboard shortcuts for pasting (SendInput ^v, {vk56}, +{Ins}) and nothing worked. I tried variables and expressions with every combination and nothing worked. Then I tried Send ^v instead SendInput and it is working! And it works with variables and expressions too.
If I remember correctly SendInput buffer keyboard. Maybe this is the problem.
Thank you guys!
I tried all combinations and all keyboard shortcuts for pasting (SendInput ^v, {vk56}, +{Ins}) and nothing worked. I tried variables and expressions with every combination and nothing worked. Then I tried Send ^v instead SendInput and it is working! And it works with variables and expressions too.
If I remember correctly SendInput buffer keyboard. Maybe this is the problem.
Thank you guys!
#11
-
Posted 06 March 2012 - 04:32 PM