I tend to hate AppleScript because... well, it tends to hate me. But I seemed to be able to get along with it this evening anyway.
I had a little problem where I wanted to open a bunch of links in new tabs in Safari, about 24 of em in a row. I could click on each one, having to click 24 times.. but I'm a programmer and that just seems lame. What if there were 150? Or 300? That solution doesn't seem to scale very well. So what I did is tabbed up to the first link (you can tab around from link to link when you have universal access on, did you know that?) and then whipped up this quick script:
delay 5
tell application "System Events"
repeat 24 times
keystroke return using command down
keystroke tab
delay 1
end repeat
end tell
When I ran that in Script Editor, and I had 5 seconds to return to Safari, and 24 seconds later all my pages had opened up in new tabs.
Thank you AppleScript. This time. I still hate you, but just a little less.