Forum Discussion
With my TC V11, I 've encountered the same behaviour: .visileOnScreen gives me false positives, so it is not reliable and I can't use it. What I tried to do is to check whether a control is available for clicking, and whether a given Dialog is active.
As a Workaround, and even as a real improvement, I now use the OnOverlappingWindow-Callback.
As a result, my scripts can just click any control available, regardless whether the Dialog is on top or not. Background dialogs are activated automatically, Messageboxes are closed, thus simplifying Scripting.
That's the way to do it:
- implement the OnOverlappingWindow-Callback
- lead all .Click/.ClickButton/.ClickItem etc. -Actions to a common clickHandling function.
- In this function, set any additional context You may Need for the callback.
- In the Callback, You evaluate the standard and additional context and e.g. activate the desired Dialog or Close disturbing messageboxes. Then Your set a result context.
- Afterwards, in the clickHandling function, You check the result context and react and do logging.
Really works fine!
- vlscfc9 years agoNew Contributor
Thanks for this information, it is very helpful!
I believe I can use this in other situations which are fragile to make them more robust, such as a fixed banner bar which overlaps underlying links and ScrollIntoView cannot be relied on.
I appreciate the detail, I should be able implement this based on your steps.
Many thanks!
Related Content
Recent Discussions
- 17 hours ago