information inside a popup window
Moderators: JRL, Dorian (MJT support)
information inside a popup window
Hello All,
I have a question about a popup window.
What I get is a popup window with the name for example "faulty" but every time with a different information in it.
I know how to automate to check when the popup windowname "faulty" appears. But the important situation is that the script should do different actions depending on the information in this popup window.
Extra information is that I cannot check or select any text inside that window. The only thing I can do is click OK with the mouse.
Does any one have any suggestion, how to solve this problem ?
Thanks in advance
Durana
I have a question about a popup window.
What I get is a popup window with the name for example "faulty" but every time with a different information in it.
I know how to automate to check when the popup windowname "faulty" appears. But the important situation is that the script should do different actions depending on the information in this popup window.
Extra information is that I cannot check or select any text inside that window. The only thing I can do is click OK with the mouse.
Does any one have any suggestion, how to solve this problem ?
Thanks in advance
Durana
GetControlText may be what you need. See help file topic GetControlText.
MJT Net Support
[email protected]
[email protected]
Hello, I have tried that one, but still can't go further, pls advise.
I have this information from tools/view system windows.
This works ok:
Label>Waiting
GetControlText>Info*,Button,1,Result
If>ResultOK,Waiting
========> Result is OK when the popup appears.
But I want to check for other information,
=======> Beschikbaar geheugen voor Windows NT: Waiting
GetControlText>Info*,Static,1,Result
If>ResultBeschikbaar geheugen voor Windows NT:,Waiting
What am I not seeing correct ? Is the Static the problem ?
==========================================
The result of tools/view system is :
- 13501202 - #32770 "Info"
--11600798 - Static "Microsoft (R) Kladblok"
--1442566 - Static "Versie 4.0 (Build 1381: Service Pack 6)"
--2949890 - Static "Copyright (C) 1981-1996 Microsoft Corp."
--3015616 - Static "Een gebruiksrecht op dit produkt is verleend aan:"
--2294574 - Static "Beschikbaar geheugen voor Windows NT:"
--3081108 - Static "261.492 kB"
--1967082 - Button "OK"
==========================================
I have this information from tools/view system windows.
This works ok:
Label>Waiting
GetControlText>Info*,Button,1,Result
If>ResultOK,Waiting
========> Result is OK when the popup appears.
But I want to check for other information,
=======> Beschikbaar geheugen voor Windows NT: Waiting
GetControlText>Info*,Static,1,Result
If>ResultBeschikbaar geheugen voor Windows NT:,Waiting
What am I not seeing correct ? Is the Static the problem ?
==========================================
The result of tools/view system is :
- 13501202 - #32770 "Info"
--11600798 - Static "Microsoft (R) Kladblok"
--1442566 - Static "Versie 4.0 (Build 1381: Service Pack 6)"
--2949890 - Static "Copyright (C) 1981-1996 Microsoft Corp."
--3015616 - Static "Een gebruiksrecht op dit produkt is verleend aan:"
--2294574 - Static "Beschikbaar geheugen voor Windows NT:"
--3081108 - Static "261.492 kB"
--1967082 - Button "OK"
==========================================
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Sounds like the command is not being executed at all. From the HELP:
Make sure that there are no trailing spaces in your script. A triling space on the GetControlText line will definitely be a problem.
You said Result is blank or looks blank, good distinction. What is the lenth of the "blank" Result? Put % around Result after it is defined and look at results in a log file:
Label>Waiting
GetControlText>Info*,Static,1,Result
Length>%Result%,ThisLong
Message:Result value is %Result% and is %ThisLong% wide.
If>%Result%Beschikbaar geheugen voor Windows NT:,Waiting
Result should not be coming back as a blank.Result contains the text of the control if found. It the window is not found Result contains ##NOSUCHWINDOW##. If the class and instance was not found ##NOSUCHOBJECT## is returned.
Make sure that there are no trailing spaces in your script. A triling space on the GetControlText line will definitely be a problem.
You said Result is blank or looks blank, good distinction. What is the lenth of the "blank" Result? Put % around Result after it is defined and look at results in a log file:
Label>Waiting
GetControlText>Info*,Static,1,Result
Length>%Result%,ThisLong
Message:Result value is %Result% and is %ThisLong% wide.
If>%Result%Beschikbaar geheugen voor Windows NT:,Waiting
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Thanks Bob,
I checked your suggestion and found out the problem was. Now it is working what I wanted.
Label>WaitButton
GetControlText>Info*,Static,10,Result %Result%,ThisLong
Messagemodal>:Result value is %Result% and is %ThisLong% wide
If>ResultBeschikbaar geheugen voor Windows NT:,WaitButton
Regards Durana
I checked your suggestion and found out the problem was. Now it is working what I wanted.
Label>WaitButton
GetControlText>Info*,Static,10,Result %Result%,ThisLong
Messagemodal>:Result value is %Result% and is %ThisLong% wide
If>ResultBeschikbaar geheugen voor Windows NT:,WaitButton
Regards Durana
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: