Technical support and scripting issues
Moderators: JRL, Dorian (MJT support)
-
Bilde
- Junior Coder
- Posts: 31
- Joined: Fri Nov 15, 2002 3:19 pm
- Location: Denmark
Post
by Bilde » Mon Nov 18, 2002 3:22 pm
hi there!
Is it possible to recognize a window without the title or koordinates?
If it is... how?

-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Nov 18, 2002 3:39 pm
Hi,
Not sure what you mean? What do you actually want to do? Without a name the window would be pretty difficult to 'recognise' or distinguish.
If you just want to wait for the active window to change that is easily achieved with a loop and GetActiveWindow, or the new WaitWindowChanged command.
-
Bilde
- Junior Coder
- Posts: 31
- Joined: Fri Nov 15, 2002 3:19 pm
- Location: Denmark
Post
by Bilde » Mon Nov 18, 2002 4:52 pm
I'm using the setfocus command, to make sure i'm sending some commands to a IE window.
But sometime when the site loads, the title of the window change to "page not found", and I get the message "could'nt setfocus on 'window'" and the macro stops... Is it possible to ignore that warning?, or is there a smarter method?
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Nov 18, 2002 6:49 pm
Use:
SetFocus>Internet Explorer*
Internet Explorer may change it's title, but it always has the words 'Internet Explorer' in it.
See the help explanation for the wildcard.
-
Bilde
- Junior Coder
- Posts: 31
- Joined: Fri Nov 15, 2002 3:19 pm
- Location: Denmark
Post
by Bilde » Mon Nov 18, 2002 8:11 pm
hey that was a cool idea! I should have figured that out...
Thanks a lot!
hmm... but what if theres coming a popup window. It may not function properly then...
Any idea to that?

-
Bilde
- Junior Coder
- Posts: 31
- Joined: Fri Nov 15, 2002 3:19 pm
- Location: Denmark
Post
by Bilde » Mon Nov 18, 2002 9:41 pm
i have figured it out now:
i'm using the command "ifwindowopen" to get rid of unwanted windows

-
Ernest
Post
by Ernest » Mon Nov 18, 2002 9:46 pm
Hi,
if a popup appears the IEWindow should loose the focus (it's title bar color will change).
With a periodical check [GetPixelColor] you should be able to track that.
and/or
with [GetActiveWindow] you'll (hopefully) get the popup title, which you'll use to [CloseWindow] ...
Sample:
Code: Select all
Label>ActiveWindowCheck
GetPixelColor>X,Y,IETitleBarColor
//8388608 = darkblue title bar - windows standard scheme
If>IETitleBarColor<>8388608, LetsCheckTheWindow
Wait>3
Goto>ActiveWindowCheck
and/or
Code: Select all
Label>LetsCheckTheWindow
GetActiveWindow>window_title,X,Y
If>window_title<>TheTitleYouExpect, LetsCloseAWindow
Goto>LetsCheckTheWindow
Label>LetsCloseAWindow
CloseWindow>window_title
Just an idea ...
Ciao
Ernest
-
Bilde
- Junior Coder
- Posts: 31
- Joined: Fri Nov 15, 2002 3:19 pm
- Location: Denmark
Post
by Bilde » Mon Nov 18, 2002 10:46 pm
Hi Ernest!
I get the point, and it's a very usefull couple of commands...
Thanks a lot for all ya' help
