How to C# CTRL + ENTER ?

  • Автор темы Автор темы Adé
  • Дата начала Дата начала

Adé

Пользователь
Регистрация
05.03.2015
Сообщения
33
Реакции
1
Баллы
8
Hello,

I need to emulate CTRL+ENTER, and I don't know how to do it ?

I've seen we can do it in C#. Do you know how ?

Thanks in advance :)
 
try
sendtext:
Развернуть Свернуть Копировать
instance.WaitFieldEmulationDelay();

// Emulate text entering

instance.SendText("{CTRL}{ENTER}", 15);
another code:
Развернуть Свернуть Копировать
instance.ActiveTab.KeyEvent("press", "ctrl", "Enter");
 
Последнее редактирование:
Hello,
I need to emulate CTRL+ENTER, and I don't know how to do it ?
I've seen we can do it in C#. Do you know how ?
Thanks in advance :-)
It is necessary to simulate pressing CTRL, then ENTER. An example of how this can be done:

89992

89993

C#:
Развернуть Свернуть Копировать
// error add code form to forum...
var el = instance.ActiveTab.FindElementByAttribute("body", "fulltag", "body", "text", 0);
el.SetAttribute("innerhtml", form); // create form
el = el.FindChildByName("messageBox");
el.RiseEvent("focus", instance.EmulationLevel); // focus field

Thread.Sleep(2*1000);
instance.SendText("{CTRLDOWN}{ENTER}", 0); // send ctrl+enter

I was unable to add the form code to the post. I tried to create an html form to test if the code works. After starting, I saw that everything is working correctly. I took screenshots and added to the post.
 
Последнее редактирование:

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