Sign in to follow this  
Followers 0
okbishop

unable to populate login window correctly

8 posts in this topic

When I try to populate a citrix login window from within IE it does not work. I get both userid and password on the same first line where just userid goes. It's very frustrating.

Here's the script

#include <IE.au3> ;

$oIE = _IECreate ("https://xxxxxxxxx.xxxxxxxxx.com/Citrix/Basic/site/default.aspx")

WinWaitActive("[TITLE:Connect to xxxxxxxxx.xxxxxxxxx.com; CLASS:#32770; ]", "")

ControlSend("TITLE:Connect to xxxxxxxxx.xxxxxxxxx.com", "", "[CLASS:Edit; ]", "N/A")

ControlSetText("Connect to xxxxxxxxx.xxxxxxxxx.com", "", "[CLASS:Edit; ]", "N/A")

Send("userid")

ControlSetText("Connect to xxxxxxxxx.xxxxxxxxx.com", "", "[CLASS:Edit; INSTANCE:3]", "N/A")

Send("password")

So what am I missing.. Any ideas would be greatly appreciated. This is driving me crazy.

Thanks

Share this post


Link to post
Share on other sites



Any ideas would be great..

Thanks

Share this post


Link to post
Share on other sites

Why didn't you specify INSTANCE for all of your EDIT control specifications? You should have something like "[CLASS:Edit; INSTANCE:1]" for user ID and "[CLASS:Edit; INSTANCE:2]" for password (actual instanced numbers vary). CLASS alone is only enough if you are sure there is only one control of that class present in the GUI.

:x


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Ok. So that did not work. It just sits there and does not populate the script the first time I run it. Strange The second time I run it it does populate the login line with both the userid and password. So it's doing something. But any more suggestions would be great as I am stuck again.

Thanks

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Why do you use ControlSetText() to put "N/A" in an edit and then use Send() to pass the actual data? If you have the correct identity for the edit control then just using ControlSetText() or ControlSend() is preferable to ever using Send(). If you really have to use Send() for some reason, then you should verify the control has focus with ControlSetFocus() ControlFocus().

:x

Edit: Corrected ControlFocus().

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

I don't think I am getting it. How would I use the ControlSetFocus(). I could not find any help listed on this.

Thanks

Share this post


Link to post
Share on other sites

Ok still not getting it to work.

Is there an example somewhere that I could work off of that would help show me. That might be better than this way.

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0