MouseClick in C# how to pass coords

wificon

Пользователь
Регистрация
18.02.2016
Сообщения
35
Благодарностей
3
Баллы
8
Hi
I have another problem

This time:

I want to click on element (mouse emu and standard click don't work)

so:

I have created action Get value > TopInTab - to get position of element and passed it to variable coord1

I have found nice and working for me C# code:

instance.ActiveTab.MouseClick(400, 155, "left", "click");

as you see coords ar set manually,
how to set them auto ? how to modify this code to get coords from project variables: coord1 and coord2 ?

Thanks for reply to all :-)
 
  • Спасибо
Реакции: britalic

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 270
Благодарностей
5 854
Баллы
113
You can put coords to variables and get them from variables. Smth like that:

var coord1 = project.Variables["coord1"].Value;
var coord2 = project.Variables["coord2"].Value;
instance.ActiveTab.MouseClick(coord1, coord2, "left", "click");
 

wificon

Пользователь
Регистрация
18.02.2016
Сообщения
35
Благодарностей
3
Баллы
8

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