Paste into a Textbox on webpage

  • Автор темы Автор темы Macs Bank
  • Дата начала Дата начала

Macs Bank

Client
Регистрация
25.04.2014
Сообщения
59
Реакции
3
Баллы
8
Anyone know how to emulate a paste command inside a specific textbox of a webpage.

The website doesn't allow you to manually type and submit the data... it requires the act of pasting.

I've tried playing around with c# using something like this:

System.Windows.Forms.SendKeys.SendWait("^v");

... but, it doesn't appear to be working. Also, I am not sure how to set the value of what needs to be pasted. I have a list of things I want to loop through and paste...

Hopefully this makes sense and someone has a solution.

thanks.
 
One more question about this...

Any idea how to make it work more efficiently when using multiple threads.
Is there a way to make each thread wait until the other one finishes the c# process before it does the same process?

Just want to make sure the right things are getting pasted into the right place if using multiple threads with different text.

hopefully this makes sense...

Here's the code I'm using:

Код:
Развернуть Свернуть Копировать
string text = project.Variables["paste_this"].Value;
System.Windows.Forms.Clipboard.SetText(text);
instance.ActiveTab.KeyEvent("v","press","ctrl");

thanks in advance!
 
C#:
Развернуть Свернуть Копировать
string text = project.Variables["paste_this"].Value;
lock(SyncObjects.InputSyncer)
{
    System.Windows.Forms.Clipboard.SetText(text);
    instance.ActiveTab.KeyEvent("v","press","ctrl");
}
 
  • Спасибо
Реакции: Macs Bank

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