###Need Input on New Article about “How To Click on Web Page Buttons and LInks”
This is a FAQ, and there are dozens, if not more, specific responses.
I would like to develop a Wiki article that specifically addresses how to do this, but provide the instructions that users can use with any web page.
There are a few KM Actions that might be used for this, but it is not always clear to the user (particularly new users) how to use them.
So, please, if you have some good solutions, that are either generalized or can be easily made so, please post them (or a link to them) in a reply to this topic.
Hi JMTX — I have done this a lot … essentially processing various web pages using KM as my agent. Can you point me to any specific questions, issues, or a draft of the FAQ? I’m glad to contribute — I hope usefully — but I do best with some constraints. I don’t use Java (I don’t use anything but KM and some very basic AppleScript that was given to me here on the KM forums).
The following observations & recommendations might be obvious, but come from experience:
. Web pages are all different, frequently change, and may not be well-built. Little of any site-specific KMacros can be relied on to work on different sites, or on the same site for more than a few months.
. My #1 rule: even tested macros need to be baby-sat. Never assume that a macro that worked on site.com an hour ago to work flawlessly now.
. The structure of the macro can usually be replicated for similar sites. You will likely need to use some different actions, and surely will need to use different data within the Actions.
. The least efficient but probably most secure approach is to parse the page source. This is cumbersome for the savvy, and likely impossible unless you are versed in RegEx.
. Turn on “ ▹ System Preferences ▹ Keyboard ▹ Shorcuts ▹ Full Keyboard Access ▹ All controls”.
. Use Pauses. A lot. If something doesn’t work, add a Pause Action, or increase the pause in an existing action. A Pause of even 0.05s can make a significant different (over no pause).
. Have a fast connection (2 MB/s or faster). You can overcome this limitation, but it requires extra work.
. Use “Found Images”. Learn to use the fuzziness to advantage.
. Limit macro execution to one screen size and resolution.
. In general, find a way to set the page to a default (size, orientation, content, cursor position, insertion point location), then use Actions (keystrokes or mouse movements) based on that default.
. Process sets of sub-pages as tabs in the Web browser. Process each page in the set, then close all pages but the page containing links to the sub-pages. Limit sets to about 20.
. If you are downloading files, use a dedicated download manager (I used Many Trick’s Leech, which — like everything they make — was fantastic, but isn’t — last I checked — still current. I now use iGetter, which reminds me of old Windows programs: uglier than a dog’s breakfast, but gives a good day’s work.)
Kirby, many thanks for your offer to help. I’m sure your experience will be very valuable.
I don’t even have an outline of the FAQ, much less a draft. So, I’m looking for any input/feedback from anyone, like you, that has experience in designing solutions to click on various links, buttons, images on a web page.
If you want to get an idea of the questions people are asking, do two forum searches:
this may yield some false positives about clicking app buttons
So, thinking out loud, I’d like to develop a wiki article that would:
Guide users in how to inspect an web page and then design a solution for clicking on whatever they want.
I think there are probably existing web articles, books, etc that already address this.
But just providing a curated list for users would be a big help
Of course, anyone that want to write their own is more than welcome.
Provide as many good examples as we can.
As I see it (and everyone feel free to correct me), there are about three basic approaches for this: