Forum Discussion

imrenato's avatar
imrenato
Visitor
9 years ago
Solved

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.

 
  • 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.

2 Replies

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    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.

  • m_essaid's avatar
    m_essaid
    Valued Contributor

    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)