How to simulate "Paste" or "CTRL + V"

zenfreak

Client
Регистрация
21.08.2013
Сообщения
249
Реакции
12
Баллы
18
I have a form that will not display the post button until I populate a field by paste-ing my value either by using right-click and selecting "paste" or by using CTRL+V.

Take note the if I manually write the value into that field the submit button will NOT show! Weird, I know, but that's the way it is.

What would be a workaround this?
 
You try use keyboard emulation?
Some data fields use scripts who don't accept "SET" value, for these fields, use KEYBOARD emulation.
There is no one C# or Java code to do it implemented on Zenno.
 
....
easier way here

Код:
Развернуть Свернуть Копировать
// performs the copy even
instance.ActiveTab.KeyEvent("C", "press", "ctrl");

Код:
Развернуть Свернуть Копировать
// performs the paste event
instance.ActiveTab.KeyEvent("V", "press", "ctrl");
 
@SOS Cartões OFC I tried keyboard emulation first
@Lord_Alfred Your solution worked like a charm. Thank you! I forgive you for only speaking Russian :-)
@PHaRTnONu Thank you for your solution but as Lord_Alfred stated, "don't forget about the buffer"!
 
What buffer? I don't see that comment?
 
If there are many threads and you are working with the clipboard by using
Код:
Развернуть Свернуть Копировать
instance.ActiveTab.KeyEvent("V", "press", "ctrl");
they might overlap and you end up messing up each other's data. This is what I have understood by translating Lord_Alfred's post and even if I don't have too much coding experience it makes sense.
 
If there are many threads and you are working with the clipboard by using
Код:
Развернуть Свернуть Копировать
instance.ActiveTab.KeyEvent("V", "press", "ctrl");
they might overlap and you end up messing up each other's data. This is what I have understood by translating Lord_Alfred's post and even if I don't have too much coding experience it makes sense.
All right, but in fact it is better not to use change the buffer at all. It's unpredictable.
 
  • Спасибо
Реакции: PHaRTnONu

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)