These days we seem to be monitoring more and more monitors that have web interfaces.
Chances are that all these monitors cannot be consolidated into one big picture. I have one monitor for Unix system health (Nagios), one monitor for Windows system health (SCOM), one monitor for external network link health (Telco provider), one monitor for incoming help desk tickets, and on and on the list of things that I have to monitor goes.
So I looked into creating a web page slide show of all these monitors.
Windows: The VBScript approach
I have written a number of VBscripts that do some amazing automation on a MicroSoft system including automatically logging into a system. They are easy enough to write but are not my preferred approach. Lugging around a Windows server and license is just too much baggage for the task at hand.
I borrowed this idea from someone else. It seems to work quite well however it has a limitation that requires you to log into the pages beforehand to circumvent the login dialogs. So I looked into that further.
Unix: Other approaches
Thinking laterally, there are a few other ways of sending keystrokes to another process to drive it.
This is a heavyweight approach requiring a C program to call the ioctl() API. Unless you're really keen then forget it.
Write to stdin
Bash is pretty crafty with managing file descriptors, and Linux provides you with access to the the /proc namespace. Unfortunately the following didn't do anything with the PID of my FireFox window.echo "http://www.mycompany.com" >> /proc/<PID-FireFox>/fd/0
Back in the days of dumb terminals, you could send an escape sequence to program a function key on the user's keyboard with some text, and then send another escape sequence to keypress that function key. To think that's how we used to autologin into Novell Netware.
Just like the function key method described above but use the clipboard buffer instead.
Unix: The xdotool approach
If you're comfortable running X11, then this is the ideal tool for controlling windows. xdotool is available from the EPEL repo.
xdotool is feature rich and allows you not to just send keystrokes, but mouse and button events as well.
NOTE1: Some keyboard shortcuts may actually be registered by the window manager rather than the application.