I have an application (Family Tree Maker) that is heavily dependent on mouse gestures and no menu equivalents exist. The application window is divided into panes. I am working on a macro that will scroll up or down to find a specific place in a given pane where further actions can take place. I have tried to do this with partial success with found images.... see screen shot
The macro shown works somewhat IF the image being searched is ABOVE the current cursor position. If the image isn't found (either because it isn't present or is below the starting cursor position) it keeps on going until I force all macros to end. What I want to do is 1) scroll up to the top of the pane and if the image isn't found 2) scroll to the bottom looking for it and if its still not there 3) do something to add the image.
The part I can't work out is how to detect when I've scrolled to the top (or bottom), i.,e "scroll until top is reached". Any thoughts on how to detect that future scrolling up is fruitless ?