RunAsDate is a tool by Nirsoft that lets any program run with a time you set. It is useful for Gen 4 RNG and helps you hit your seed easily.
Setup RunAsDate
Launch RunAsDate.
Set up RunAsDate as shown in the image below.
Preview
You'll never have to change this again. This is the universal RunAsDate setup for RNG (Gen 3, 4, or 5), so you're almost done!
Select the program you want to fake the date/time with the Browse... button.
Set the date and time to one of the given dates and times in PokeFinder to hit your seed.
Click Run, and your Desmume should launch.
Hitting the target seed
Make save states often during this process.
Load the lua script.
Click A to get to the "Continue" screen quickly.
Pause your emulator with Ctrl + P.
Make plenty of save states in case you mess up.
Unpause your game, and run until you get close to your target delay.
Once close, pause your emulator.
Create another save state (you never know what might happen!).
Press N to advance the game one video frame to increase the delay by one.
When you're on the target delay, hold A while unpausing your game.
Troubleshooting
Sometimes, even if you press A at the right delay, the actual delay can be +/-1 of what you wanted. This can happen with Gen 4, where delays can be either always odd or always even. Use one of these methods to change delays from even to odd or vice versa.
Changing the year
Close your emulator and change the year in RunAsDate to one year before or after the current year. This change will adjust the delay. Verify the new delay with PokeFinder in the "Seed to Time" window by changing the year. Once adjusted, relaunch Desmume with RunAsDate and load a save state. Then you can RNG for the new delay.
Load a GBA game
Loading a GBA game into the GBA slot in the emulator will switch the delay from even to odd, or vice versa.
Continue Screen
At the screen to choose to continue your game, press the down arrow on the bottom touch screen to move the screen down, then press the up arrow to move it back up. This will switch the delay from even to odd, or vice versa.