Hello everyone.
This discussion follows on from the previous ones. I’ve made a lot of progress on my double-click automation script.
Old discussions referring to my code (which have since been resolved, see the code attached to this message):
I can double-click on Galapagos, for example, if it’s visible in the canvas.
If it’s not visible, I can zoom in and generate a double-click.
→ What I want is that if the zoom has been done, after the double-click, it returns to the initial view on the canvas.
I have successfully reset the view on the canvas, but unfortunately the double click occurs after the initial view has been restored.
The video below explains it all :
yet the order of the tasks is well defined, I’ve tried adding a thread.sleep but it doesn’t work either :
if (activate)
{
ZoomToComponentIfNotVisible(ghObject);
PerformMouseDoubleClick(new System.Drawing.Point((int) objectBounds.Left, (int) objectBounds.Top), objectBounds.Size);
Thread.Sleep(1000);
ResetViewportToOriginal();
}
I’d like to use the System.Threading.Tasks command but I can’t find it.
Does anyone have an idea? or have another function in mind? to ensure that my tasks run in the right order?
Thanks a lot
double click Galapagos.gh (10.1 KB)