How to open a child window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

How to open a child window?

Post by sunkara7 » Mon May 23, 2005 1:12 pm

I am trying to open a drill down window in a 'windows based' window.

The main window contains several icons by clicking on them opens the corresponding drill down window.

Now i need to open a drill down window(XXX) by clicking on the(XXX) icon.
Here i can't use 'MouseMoveRel' function because in future the icon position may change.

So could anybody suggest me what function should i use to open the xxx window.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 1:49 pm

You could try the "PushButton" command.

Another alternative would be to "Press TAB*(number)" where (number) is the number of tabs it takes to get to the button and then "Press Enter"

Hope this helps,
Dick

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 3:14 pm

JRL wrote:You could try the "PushButton" command.

Another alternative would be to "Press TAB*(number)" where (number) is the number of tabs it takes to get to the button and then "Press Enter"

Hope this helps,
Dick
Thanks for replying

The icon position is not fixed and it is a 'shortkey' (not a button) That window is used by more than 1000 users. So different users have that icon in different positions. So here i can't use 'Press TAB*(number)'. Is there any other fn that i can use to find that icon and click on it.

Thanks
Last edited by sunkara7 on Mon May 23, 2005 3:31 pm, edited 1 time in total.

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 3:21 pm

dfgdfhdfg

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 3:39 pm

If the icon is a shortcut to a program. Can you use "Run Program" to execute the process directly, rather than trying to hit the moving icon?

Dick

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 3:59 pm

JRL wrote:If the icon is a shortcut to a program. Can you use "Run Program" to execute the process directly, rather than trying to hit the moving icon?

Dick
After opening the main window (windows based), can i use 'RunProgram' to open the drill down window. I dont know whether the icon is .exe or .bat or .com file. I am not familier with that application(windows based). I need to ask the support guys for that.

Thanks

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 4:27 pm

If you right click on the icon, pick properties from the menu, select the shortcut tab. The program name and any needed options should show up in the "Target" field. The line in Macro scheduler to run the icon defined program would be:

Run Program>(target field information)

You may want to put conditions on the "Run Program" such as setting the RP_WAIT variable to 1. Read the help documentation fro Run Program.

Hope this helps,
Dick

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 4:47 pm

JRL wrote:If you right click on the icon, pick properties from the menu, select the shortcut tab. The program name and any needed options should show up in the "Target" field. The line in Macro scheduler to run the icon defined program would be:

Run Program>(target field information)

You may want to put conditions on the "Run Program" such as setting the RP_WAIT variable to 1. Read the help documentation fro Run Program.

Hope this helps,
Dick
Thanks for replying again.

I am not sure wheather the 'target field information' is same on all users desktops in order to use the RunProgram method.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 5:10 pm

Other possibilities I can think of would be to create an ini file for each user that would contain the "Run Program" information unique to each user but with 1000 users that could take a while to implement. Although the ini file can be created dynamically within your script. Your script checks for the existance of an ini file name. The first time your script is run it asks questions of the user and using that information, creates an appropriate ini file. From then on, the file exists, the input part of your script is skipped and the differing information is pulled from the file.

Another possibility would be to use the "Send Character/Text" command to type in the first letter of the name of the icon. If there are no other icons in the window with the same first letter in the name, the icon will be selected.

Can you provide more info about why the users might have differing information in the target field of their icon. For example is there a mapped drive letter that differs? this might be circumvented by using the UNC. Is there a password or unique login in the string? These could be circumvented by asking the user for the appropriate information. If you are trying to run unattended this might be a good place to use an ini file.

Dick.

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 5:47 pm

JRL wrote:Other possibilities I can think of would be to create an ini file for each user that would contain the "Run Program" information unique to each user but with 1000 users that could take a while to implement. Although the ini file can be created dynamically within your script. Your script checks for the existance of an ini file name. The first time your script is run it asks questions of the user and using that information, creates an appropriate ini file. From then on, the file exists, the input part of your script is skipped and the differing information is pulled from the file.

Another possibility would be to use the "Send Character/Text" command to type in the first letter of the name of the icon. If there are no other icons in the window with the same first letter in the name, the icon will be selected.

Can you provide more info about why the users might have differing information in the target field of their icon. For example is there a mapped drive letter that differs? this might be circumvented by using the UNC. Is there a password or unique login in the string? These could be circumvented by asking the user for the appropriate information. If you are trying to run unattended this might be a good place to use an ini file.

Dick.
Depending on the users previleges some users have all icons and some users have some icons on their desdtops. That way the icon changes its position depending on the users previleges.

There is one more icon starting with the same letter/Word as with this icon. No there is no password or unique login for this string.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 6:18 pm

If you use "Run Program" the location of the icon should not be relevant, only the location of the actual program. If the location of the actual program varies from computer to computer, then the "Run Program" line in the macros on each computer would have to reflect that variation.

Is this an executable that resides on a server, or is the executable residing on each computer? If the executable is on each computer, is the path to it the same on all of the computers? Remember that the shortcut is not the executable it is only a portal pointing to the executable.

Dick

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 6:31 pm

JRL wrote:If you use "Run Program" the location of the icon should not be relevant, only the location of the actual program. If the location of the actual program varies from computer to computer, then the "Run Program" line in the macros on each computer would have to reflect that variation.

Is this an executable that resides on a server, or is the executable residing on each computer? If the executable is on each computer, is the path to it the same on all of the computers? Remember that the shortcut is not the executable it is only a portal pointing to the executable.

Dick
I have no idea about where the exe file is residing. But in my computer i didn't find the exe file for that drill down window. My job is to automate the opening of that drill down window (xxx). I'll get back to you with the answers after i talking with the support guy.

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Mon May 23, 2005 8:46 pm

JRL wrote:If you use "Run Program" the location of the icon should not be relevant, only the location of the actual program. If the location of the actual program varies from computer to computer, then the "Run Program" line in the macros on each computer would have to reflect that variation.

Is this an executable that resides on a server, or is the executable residing on each computer? If the executable is on each computer, is the path to it the same on all of the computers? Remember that the shortcut is not the executable it is only a portal pointing to the executable.

Dick
I've talked to the support guy and he told me that there is an .exe file for that icon. And the executable file path is same on all users desktop.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon May 23, 2005 9:45 pm

Excellent... That should make your life a lot easier. You should be able to use "Run Program". The help documentation is very good.

Do you feel you have enough direction to get started?

Feel free to ask more questions.

Dick.

sunkara7
Junior Coder
Posts: 25
Joined: Mon May 23, 2005 1:04 pm

Post by sunkara7 » Tue May 24, 2005 1:25 pm

JRL wrote:Excellent... That should make your life a lot easier. You should be able to use "Run Program". The help documentation is very good.

Do you feel you have enough direction to get started?

Feel free to ask more questions.

Dick.
Thank You

Users needs to login to the application before the main window is open and then depending on the users previliges the icons will appear on the main window. If the user has not access to (xxx) icon, then if he run the application(RunProgram>xxx.exe). Can he able to open the drill down window. In my case user can able to open that drill down window only if he has access to it.

My question is without login into the application if we run the program(RunProgram>xxx.exe), can it able to open (it shouldn't be open for my application)

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts