Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
Scones
- Junior Coder
- Posts: 32
- Joined: Fri Jul 05, 2019 11:21 am
Post
by Scones » Wed Feb 26, 2020 10:20 am
What MDL are you guys receiving when running this?
Code: Select all
CloseWindow>Details
Wait 1
IfWindowOpen>Details
MDL>Details open
Else
MDL>Details not open
endif
exit
Do i have some hidden window running called Details? Doesn't show up with getwindowlist
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Feb 26, 2020 12:58 pm
For me I get an error on the CloseWindow line because there is no window that matches.
So it then gives "Details not open"
If your CloseWindow is not giving an error then you must have a window present that matches.
And if that window hasn't quite finished closing in the millisecond or two it takes for the macro to get to the IfWindowOpen line then you're going to see "Details is open"
-
Scones
- Junior Coder
- Posts: 32
- Joined: Fri Jul 05, 2019 11:21 am
Post
by Scones » Wed Feb 26, 2020 1:31 pm
I see. Well even if the window is closed from the beginning, the script still sees it.
I wonder how that is possible when it doesn't show up with getwindowlist.
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Wed Feb 26, 2020 1:39 pm
Try limiting to visible windows only by adding this at the top of your script:
Let>WF_TYPE=2
-
Scones
- Junior Coder
- Posts: 32
- Joined: Fri Jul 05, 2019 11:21 am
Post
by Scones » Wed Feb 26, 2020 1:45 pm
Try limiting to visible windows only by adding this at the top of your script:
Let>WF_TYPE=2
Works like a charm! Thank you very much!
-
DreamTheater
- Newbie
- Posts: 19
- Joined: Mon Oct 14, 2019 6:23 am
Post
by DreamTheater » Fri Feb 28, 2020 6:08 am
Some web systems have hidden windows in the background which could cause this, especially Siebel based systems.