Huh? A macro program would just generate a standard HID event, such as a mouse click. The browser (never mind the page) has no way of knowing if that event was generated via software or an actual hardware device. As I understand it, the problem involves simply clicking a button twice in succession. The only reason the second click can't be done manually is because the first click disables the network connection, which is being used to remotely control the computer.
Great. Now how do you activate this code on a page that's dynamically generated by a wireless modem and may or may not have names actually assigned to the form and/or button in question?
How do you position the mouse? I guess I understand what you're going for. You want to pre-position the mouse by hand, and then run a macro to click, and then click again after a min or something, assuming the mouse and button do not move.
The code would be activated by an installed safari extension.
http://developer.apple.com/library/...ExtensionGuide/Introduction/Introduction.html
It is very easy to make an extension, with a single global JS file that would effectively be triggered on every page you visit. Then a simple string compare with document.location.href to make sure you're on the page you want to run it on, and you're golden.
In general, I'd probably look at the page itself and see if the same behavior could be duplicated by just using GET or POST parameters, or visiting a certain URL. If so I'd just script it with wget or curl.
Either way, with only a marginal increase to the time it would take to script or set this up you could have it run every night at 3AM, run when you email yourself a certain subject line etc.