What's this? Howdy. I recently suggested an action for a future update which would click each instance of any found image on the screen, but I've since found a way to do just that. Read on if you think that could be useful.
Imagine: You wish to automate some task which involves the opening of a variable number of web pages before performing a series of actions upon each opened page. Imagine this— boring and plain— sample page is your canvas:
Sure, you could take a screen shot of the "Manage" button and plop it in the Move and Click Action (middle clicking in order to open the page as a new tab):
Now that's neat, but it will only act upon a single instance of the found image (usually the upper-left one, in my experience). Are we finished? Is this it? Are we truly going to be subjected to this cruel, depraved reality in which we must click, link by link, unassisted, dragging our contorted, CTS-ravaged fist inch by inch over some filthy, oleaginous desktop?
NO!
I found this cool trick:
We use the Highlight Target action to temporarily obfuscate the first found image, leaving the next instance ripe for the finding. This needs to be it's own macro, for reasons I'll explain immediately after this screen grab:
See that Display for 6 seconds, right there? Turns out, this action will stay paused here for those entire 6 seconds, so we have to run it asynchronously within our master action in order to put its short-lived shroud to any use.
Behold, the master action:
Ah, read it and weep. For you have found salvation. But let's make it a bit neater. Wouldn't it be useful to know how many new tabs were opened upon the completion of the macro? Well, try incrementing a Count variable right there after the Move and Center Click action (One that was set to 0 before entering the While loop). Now, you can use that variable in one of these:
Then put that thing you wanted to do with each tab inside of that special hole, and enjoy your new life.
Please let me know if you have ideas to make this work better. Hope you found it useful
One could also use a modified version of this to gather coordinates from the screen in order to do some other kind of action. Perhaps to assemble an array of positions with which to manipulate an image in Photoshop. If I think of anything useful I'll be sure to update this.