How to C# CTRL + ENTER ?

Adé

Пользователь
Регистрация
05.03.2015
Сообщения
31
Благодарностей
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 :-)
 

hesham

Пользователь
Регистрация
15.11.2018
Сообщения
120
Благодарностей
3
Баллы
18
try
sendtext:
instance.WaitFieldEmulationDelay();

// Emulate text entering

instance.SendText("{CTRL}{ENTER}", 15);
another code:
instance.ActiveTab.KeyEvent("press", "ctrl", "Enter");
 
Последнее редактирование:

BAZAg

Client
Регистрация
08.11.2015
Сообщения
1 781
Благодарностей
2 442
Баллы
113
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.
 
Последнее редактирование:

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