Ask a Question

DoClick pauses script execution when a message window opens

dudu
New Contributor

DoClick pauses script execution when a message window opens

Hi,

I have a script that clicks a certain button on a side bar using the DoClick method. It works fine, unless pressing the button triggers a message window that belongs to my application, when that happens the scripts seems to pause and cant be stopped unless the message window is closed. The strange thing is this doesn't happen if I just click the button using coordinates.



Any ideas to why this happens?  
3 REPLIES 3
syedsafvan
Contributor

RE: DoClick pauses script execution when a message window opens

Dudu,



What you are about to read is only an idea that strikes me. I am not saying that this is the solution. It might just be worth checking.




The nature of the issue is , TC freezes when you are trying to perform a click on a button that is throwing a pop up and the same effect is not reproduced if you click using coordinates - It could be possible that for the buttons that are designated to throw some popup, developers might have trigged the event "Display Popup" on the mouse down and as soon as the mouse down occurs the popup is thrown and the click action which is a mouse down + mouse up is not completed at it is stuck in the pop up and as soon as the popup is closes the click is completed and your TC starts to work and in case of coordinates you are just performing the click - (mouse down + mouse up) on a coordinate irrespective of the state of the button. So that works.




All the above is my immediate thought after reading your post - (could be silly and totally wrong ) but if that turns out to be the case solution might be to use the methods - mouse down, close popup, and mouse up. or just use the coordinates.




Thank you




Syed Ahmed Safvan

RE: DoClick pauses script execution when a message window opens

Hi Dudu,




I suggest that you try using the approah described in the "Calling Methods Asynchronously" help topic.




I hope this helps.

--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
dudu
New Contributor

RE: DoClick pauses script execution when a message window opens

Thanks David AQA, it worked!
🙂
cancel
Showing results for 
Search instead for 
Did you mean: