You can use Script Editor services to do the following:
■
Open a new Script Editor window with text.
The Mac OS X services architecture lets you transfer selected data from one application to other applications for processing. If services are available for an application, they are found in the Services submenu of the application menu.
Script Editor provides a special service that allows applications to treat selected text in their open documents as AppleScript scripts.
Open a new Script Editor window with text.