Anonymous_User Absent Member.
Absent Member.

Trapping a pop up window in front of password box in SAP

Hi all,

Having a spot of bother with a NSL 7 script for SAP 7.20 and wondering
if anyone has any insight.

When a user's password expires in SAP a change password dialog is
displayed (event A). We detect this dialog in our NSL script and call a
function to generate a new password and enter it, press tab, enter the
password again and then press enter.


Sub ChangeSAPPassword
ChangePassword ?PasswordNew random
Set ?PasswordOld $Password
Set $Password ?PasswordNew
Set $PwChanged ?currtime
Type ?PasswordNew
Type \T
Type ?PasswordNew
Type \N


The problem arises because we have many very slow machines in the estate
(especially our VMs) and the time it takes for NSL to react to the
password change box can vary greatly from almost instantly, to maybe 30
seconds. If during this time the user gets impatient and just presses
enter, then SAP pops up an error message indicating you have to enter a
valid password (event B). This error message takes focus and must be
closed before you can enter anything in the password change dialog.

Now what happens is that the slow running NSL script has already seen
event A for the change password box, so after a few moments it arrives
at the above code and it tries to enter the password but the focus is on
this error box instead. This doesn't really matter as such because the
input is thrown away. However the final 'type \n' acknowledges the error
and returns the user to the password change box.

However, event B has already been added to the NSL queue, and as we also
have logic in the script to detect the error message box appearing (in
response to mismatched passwords being entered for example), the NSL
scripts then performs its actions for this dialog which are simply
acknowledging the box by pressing enter. However we're no longer in that
error message dialog and are in fact back at the password change box, so
pressing enter just tries to change the password using a blank password,
and we get the error message displayed again !

I tried setting a variable in the code that detects the error box that
we could check in the change code, but this doesn't help because NSL
only processes one script at a time, so the error message code is not
triggered until after the password change code has all completed.

I did try using the "waitforfocus" command in our password change code
but this doesn't seem to notice that the focus has returned to the
original dialog. I have to manually click on the taskbar to activate
another program before it seems to wake up and notice this. So that's a
non starter as it would break all of the currently working password

Unfortunately I have no way of knowing that the password change was
carried out in the wrong dialog box, there is no message to say "you
have successfully changed your password" and it's not possible to read
in text from control ID data from the SAP client (it always returns
blank, possibly as the control ID is #0, I think this is due to the
java-ish nature of the SAP client)

Does anyone have scripts they have used to successfully handle password
change errors in SAP ?

clovercne's Profile: https://forums.netiq.com/member.php?userid=1699
View this thread: https://forums.netiq.com/showthread.php?t=46322

2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: Trapping a pop up window in front of password box in SAP


It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

- Visit http://www.netiq.com/support and search the knowledgebase and/or check all
the other support options available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.netiq.com)

Be sure to read the forum FAQ about what to expect in the way of responses:

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your NetIQ Forums Team

Anonymous_User Absent Member.
Absent Member.

Re: Trapping a pop up window in front of password box in SAP

clovercne wrote:

> Having a spot of bother with a NSL 7 script for SAP 7.20 and wondering
> if anyone has any insight.

I am trying to locate someone who can provide some assistance. Please
be patient.

These forums are staffed by volunteers and a lack of a response often
means we simply don't have an answer for you.

Kevin Boyle - Knowledge Partner
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below...
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.