Ask a Question

How i do one double click in C# scrit?

SOLVED
imrenato
Visitor

How i do one double click in C# scrit?

I'm testing one application that you double click in an textbox and that allows you to insert a price.

This is my script:

 

My function:

 

 

function SetValue(ValueGroupPerson)
{
var txtBoxValueGroupPerson = Properties["GetTxtBoxValueGroupPerson"]();
txtBoxValueGroupPerson["DblClick"];
txtBoxValueGroupPerson["Keys"](ValueGroupPerson);

 

 

The map object:

 

function GetTxtBoxValueGroupPerson()
{
return Sys["Process"]("XXXXXX")["WinFormsObject"]("Frm_Menu")["WinFormsObject"]("MdiClient", "")["WinFormsObject"]("Frm_Values")["WinFormsObject"]("Panel1")["WinFormsObject"]("Panel2")["WinFormsObject"]("Value")["WinFormsObject"]("Values");
}

 

This is the error:

"Object doesn't support this property or method"

 

Somebody can help me?
Thanks.

 
1 ACCEPTED SOLUTION

Accepted Solutions
HKosova
Moderator

Re: How i do one double click in C# scrit?

Add parentheses after ["DblClick"] in this line:

 

txtBoxValueGroupPerson["DblClick"]();

DblClick is a method, and JScript/C++Script/C#Script require parentheses after method names even if no parameters are specified.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

2 REPLIES 2
m_essaid
Valued Contributor

Re: How i do one double click in C# scrit?

Hi,

 

Show your object in the screen, use the spy object, point the object with it, and see 2 things :

- is the object mapped (right click in the "mapped name" empty field and map it if it's not)

- see exactly the properties and the methods attached to the object (expand view if needed)

HKosova
Moderator

Re: How i do one double click in C# scrit?

Add parentheses after ["DblClick"] in this line:

 

txtBoxValueGroupPerson["DblClick"]();

DblClick is a method, and JScript/C++Script/C#Script require parentheses after method names even if no parameters are specified.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

cancel
Showing results for 
Search instead for 
Did you mean: