Is there an easy way to run an AppleScript or application immediately (or a brief delay of X seconds) after waking up from sleep?
I'm looking for a solution that doesn't involve a 3rd-party app.
Yes indeed there is, and it is detailed in this, the Dragon Systems Software UK blog.
I do not believe it is possible without using some external software. The kernel notifies apps that register for registerSleepWakeInterest events, and AppleScript seems not to include the ability to register for this notification.
There's a code sample given in Apple's Kernel Programming Guide.
Bernard Baehr has even made source code for his application, SleepWatcher, available.