Forum Discussion

R_Ham's avatar
13 years ago

3 text box

I have a window for change pin . user must be enter pin&newpin & confirm( in 3 textbox pin-newpin-confirm)

my script is :



function ChangePin()

{

  var  p1;

  var  p2;

  var  w1;



  p1 = Sys["Process"]("Amin");

  p1["Window"]("Afx:00400000:0", "Amin")["Keys"]("^c");

  p1["Window"]("#32770", "Amin")["Window"]("Button", "&Yes")["ClickButton"]();

  p2 = Sys["Process"]("aminfs");

w1 = p2["Window"]("#32770", "Change PIN");

 w1["Window"]("Button", "Change PIN")["Keys"]("[Tab]");

  w1["Window"]("Edit", "", 1)["Keys"](DDT["CurrentDriver"]["Value"](0)+"[Tab]");

 w1["Window"]("Edit", "", 2)["Keys"](DDT["CurrentDriver"]["Value"](1)+"[Tab]");

  w1["Window"]("Edit", "", 3)["Keys"](DDT["CurrentDriver"]["Value"](2)+"[Tab]");

 w1["Window"]("Button", "OK")["Keys"]("[Enter]");

  p2["Window"]("#32770", "Login Report")["Window"]("Button", "OK")["ClickButton"]();

  w1 = p1["Window"]("#32770", "User Login");

  w1["Window"]("Edit")["Keys"]("123");

  w1["Window"]("Button", "OK")["ClickButton"]();

}



when i run this script input value for pin & new pin & confirim  set in first textbox.

I attach image of change pin window.



tnx

1 Reply


  • Hello Raziyeh,





    Remove Tab keystrokes from your code and check how it works. If it does not work, try to enter keystrokes to your window using the Sys.Desktop.Keys calls.