Russelb's code should work like you want it. Try putting the code in a new remote file. (ALT-R -> File -> New).