I would not rely on sendkeys for this. But, the question is what is purpose of this requirement? It could be easier to implement windows logins and manage password change policy within domain.
Ok, you did this. But what stopping user just to escape from this form? What requirement you truing to implement with this?
can you please tell me how to close navision if user press escape from this form
or can i use sendkey function two times 1) for trigger change password form
2)and another is if user press escape button
I agree with ppavuk, but since you (or your superior/customer) insist...
You might check the Password field in the User table for change. If it did not change, no new password was entered. This way you can even check that the password was not set to blank.
Our job is to decrease entropy, so I think we must use right tools and technologies to achieve customer's requirements. If you boss forcing you to use wrong approach - it make sense at least to try to offer better solution.
This one is dirty hack and big mess. At some point someone else will support this stuff and blame this code authors. The NAV security can do what it can do, if you need more - use active directory. I am sure its better to spend time to implement right solution.
Comments
Thanx =D>....
It's working using SendKeys
below is the code for the same
IF ISCLEAR(WshShell) THEN
CREATE(WshShell);
WaitForKeys := TRUE;
WshShell.SendKeys('%{T}{s}{p}',WaitForKeys);
Steps
Declare variable WshShell dtatype is Automation and subtype is 'Windows Script Host Object Model'.WshShell
% for ALT
{T} to open Toll
{s} to open security
{P} to open password
can you please tell me how to close navision if user press escape from this form
or can i use sendkey function two times 1) for trigger change password form
2)and another is if user press escape button
You might check the Password field in the User table for change. If it did not change, no new password was entered. This way you can even check that the password was not set to blank.
This one is dirty hack and big mess. At some point someone else will support this stuff and blame this code authors. The NAV security can do what it can do, if you need more - use active directory. I am sure its better to spend time to implement right solution.