In the room you want this to happen in, go to the 'Settings' window. Click the 'Interactions' button (looks like a red 'i'), or press Ctrl-I. This gives you a list of options, the ones you want for strazer's code are Player enters room (before fadein) and Player enters room (after fadein).
Click one of them, add a 'Run script' command, and press the 'Edit script' button.
Once you've created the 'Run script' commands, you can edit them either by the 'Interaction' list, or by opening the Room Script (the '{}' button, or Ctrl-E).
Click one of them, add a 'Run script' command, and press the 'Edit script' button.
Once you've created the 'Run script' commands, you can edit them either by the 'Interaction' list, or by opening the Room Script (the '{}' button, or Ctrl-E).