Sign in to follow this  
Followers 0
DFRIntegris

Identifying Control IDs

10 posts in this topic

I am new to AutoIt tools and scripting and have inherited a piece of code to modify that will enter the username and password in the appropriate control of the sign-in window. The old code has the Control ID for the old locations as 1001 and 1003. Does AutoIt have a tool that can locate the ID? Suggestions greatly appreciated.

Share this post


Link to post
Share on other sites



DFRIntegris,

Those do not sound like sensible ControlID values. AutoIt starts allocating ControlIDs from 3 upwards - I rather doubt that you have nearly 1000 controls in that script! :P

However, some UDF created controls require CommandIDs (a very different beast) and these often commence at 1000 (by custom). I would suggest posting the code so we can take a look. :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanks for coaching on my misuse of the forums.

attached is the script - the image of the signon is too large to attach. Thanks for any help - I am sure you love novices. :x

CernerCitrixNet.au3

Share this post


Link to post
Share on other sites

DFRIntegris,

I am sure you love novices

We were all novices once! :shifty:

The numbers you mentioned are related to controls within the GUI started by the script with the title "HNAM Logon" which also contains the text "P227". You can use the Autoit Window Info tool ("C:\Program Files\AutoIt3\Au3Info.exe" if you have a standard install) to determine which of the controls have that ID - although looking at what you are putting in them, I would hazard a guess that they are the "Username" and "Password" inputs! :P

I take it from your query that the original script no longer works and you need to modify it so that it does. So 3 things to check:

- 1. Does the ShellExecute("http://159.140.175.173/TrackingBoard/CASETRACKING.ica") actually open the log-in dialog?

- 2. Does the WinWaitActive("HNAM Logon", "P227") ever return (i.e. the window is active). You can test this by adding this line immediately afterwards:

ConsoleWrite("Window active!" & @CRLF)

If that does not appear in the SciTE console when you run the script then we have a problem! But all is not lost as the Window Info tool can check if the title and text you are using to ID the dialog are still valid.

- 3. Do the inputs still have the same IDs? The tool will tell us as explained above.

I hope all that is clear enough to follow. Give it a try and let us know how you get on. :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Here are the answers and comments:

I ran this against the log in window and it confirmed the name of "HNAM Logon" and I am assuming that it is "P227" as the environment window has that value preset. I suspect that the reason the only thing returned is the name is the window is for a Web Portal to a Citrix based user application so the window is not really on my PC.

Yes, these are some generic user accounts with password for the generic account, hence the need to ID the control. Plus, the PC on which the executable file will be loaded is a locked down, managed PC without mouse or key board.

#1 - Yes, the ShellExecute works just fine. You seemed surprised that it works. Is there a better way? What this IP is for is a web app only accessable from within our network - a web portal. Once sign-on is completed it actually launches an information page that tracks patients. I am working in a health care IT shop.

#2 - See in part above. I did enter the ConsoleWrite command but nothing was returned. You mention "Window Info tool" - this is unknown to me.

#3 - I have no way of knowing this yet. I have tried everything I know to do from help and reading some of the discussions for hints.

Share this post


Link to post
Share on other sites

DFRIntegris,

a Web Portal to a Citrix based user application

I missed this when I looked at your script earlier. From my searches on the forum, it seems that Citrix GUIs are very funny beasts and they are well outside my experience. I can only suggest that you start a new topic with the word "Citrix" in the title so that it attracts those who might know something about it. Sorry about that, but I would be as much in the dark as you about what to do to interact with one.

M23

P.S. The Window Info tool is on the path I gave you above and lets you interrogate GUIs to get lots of information to help interact with them. But if "the window is not really on my PC" I do not see how it can help you in this case - I told you it would be the blind leading the blind! :x


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Here are the answers and comments:

I ran this against the log in window and it confirmed the name of "HNAM Logon" and I am assuming that it is "P227" as the environment window has that value preset. I suspect that the reason the only thing returned is the name is the window is for a Web Portal to a Citrix based user application so the window is not really on my PC.

Yes, these are some generic user accounts with password for the generic account, hence the need to ID the control. Plus, the PC on which the executable file will be loaded is a locked down, managed PC without mouse or key board.

#1 - Yes, the ShellExecute works just fine. You seemed surprised that it works. Is there a better way? What this IP is for is a web app only accessable from within our network - a web portal. Once sign-on is completed it actually launches an information page that tracks patients. I am working in a health care IT shop.

#2 - See in part above. I did enter the ConsoleWrite command but nothing was returned. You mention "Window Info tool" - this is unknown to me.

#3 - I have no way of knowing this yet. I have tried everything I know to do from help and reading some of the discussions for hints.

M23

I messed with the Window Info tool and got "HNAM Logon - \\Remote". When I changed the command to:

WinWaitActive("HNAM Logon - \\Remote") ;, "P227")

ConsoleWrite("Window active!" & @CRLF)

Returned this:

"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "M:\Fat_Client_Scripts\CernerNet Stuff\CernerCitrixNet.au3"

Window active!

>Exit code: 0 Time: 4.142

I still cannot get the Window Tool to return the ID and I have changed the Options --> to all 3 options and no change.

Thanks for you comments - I sense I am slowly making progress.

DFR

Share this post


Link to post
Share on other sites

DFRIntegris,

Well, perhaps I know more about Citrix than I thought! :P

Now you have the window active, are you still failing to enter the username and password? :x

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

M23,

Thanks for the help. I am not quite as blind as at the first. :x

Don

Share this post


Link to post
Share on other sites

DFRIntegris,

Well, perhaps I know more about Citrix than I thought! :P

Now you have the window active, are you still failing to enter the username and password? :x

M23

Yes - apparently the ids of 1001 and 1003 are not valid.

DFR

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