information inside a popup window

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

information inside a popup window

Post by durana » Thu Jun 09, 2005 8:07 am

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

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Jun 09, 2005 8:11 am

GetControlText may be what you need. See help file topic GetControlText.
MJT Net Support
[email protected]

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Thu Jun 09, 2005 11:26 am

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"
==========================================

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Sun Jun 12, 2005 8:03 pm

Hello guys,

Did some one find a way/tip what I am doing not correctly ?

Thanks in advance
Durana

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jun 12, 2005 8:55 pm

What is the value of Result?
We know what it's value is not.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Mon Jun 13, 2005 6:16 am

Hello,

What I see in de debug mode:

The working version (when I check for the Button) : Result=OK
The not working version (when I check for an other string) I get : Result= (looks like nothing or empty)

Strange

Durana

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Jun 13, 2005 3:30 pm

Sounds like the command is not being executed at all. From the HELP:
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.
Result should not be coming back as a blank.

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!

durana
Junior Coder
Posts: 21
Joined: Tue Feb 22, 2005 3:08 pm

Post by durana » Tue Jun 14, 2005 8:08 am

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

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Jun 14, 2005 10:29 pm

Glad you found it, happy to help..... :D
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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