Contents:
Services are a feature of Mac OS X which allows an application to offer its functionality to other applications through the services menu. The services menu is available as a sub-menu in the application menu of any service-enabled application. For example, TextEdit has a services menu(pictured below) and can use services provided by Text Wielder and other applications such as Mail.
Services allow applications to use or manipulate the data in other applications. For example, as seen below, you can use Text Wielder's ability to change text to uppercase from directly within TextEdit.
Figure 1: TextEdit's Service Menu.
Services are easy to use. As a simple example, if we are using TextEdit and we want to convert some text in our document to be all uppercase we would simply select the desired text and then from the Services menu select the Text - Uppercase menu item in the Text Wielder sub-menu as seen in figure 1. This would launch the Text Wielder program which would then convert the text to uppercase automatically. All of this will happen without ever leaving the TextEdit program.
Behind each Text Wielder service is a "SFRL script" file which defines what the service will do. There are many other useful SFRL script files included with Text Wielder that aren't in the service menu but can still be used as services. These can be accessed by choosing either the Choose Script... or Choose Text Script... menu items which are at the top of the Text Wielder service menu. This will present you with an open file dialog box which allows you to choose which script to run. The SFRL script files are located in the "SFRL Scripts" folder in the "Text Wielder" folder. If you are going to choose a script that will modify the selected text you will need to choose the Choose Text Script... menu item. Otherwise, for URL scripts for example, use the Choose Script... menu item.
Text Wielder offers many types of services as listed below. Each of these types of services except for "Insert Text" require text for input. Usually the service will modify the text in some way then perform an action such as opening a URL or running an AppleScript.
Service Type | Description |
Opening a URL | Generate and open a URL with your web browser(or other appropriate program). |
Returning Modified Text | Modify and return the text. |
Executing as an Applescript | Generate and run an AppleScript. |
Display a Dialog Box | Display the modified text in a Dialog Box. |
Insert Text | Requires no input text. Return text such as current Date or Time. |
Create a New Text File | Create a new Text File in Text Wielder. |
You may notice some services are grayed out at times. This means that the service can not be used because you have not provided any input text(i.e. you have not selected any text for the service) or because you have selected text that cannot be modified(e.g. the text on a webpage) and the service is of the "Return Modified Text" kind.
Text Wielder's Standard Services
Text Wielder offers many Standard Services. The first two in the service menu, Choose Script... and Choose Text Script..., are quite important and are described in the Using Services section. The other services in the service menu perform a variety of functions from opening webpages to modifying text. For example, the service Search for at Google.com will search for the selected text at www.google.com. As another example, the service Text - Shift Right, will modify the selected text by shifting it to the right(i.e. adding spaces at the begining of each line). The service Temperature by zipcode - Dialog box, will display the current temperature in a dialog box for the zipcode that you selected. Feel free to explore the different services available and dont forget there are many others in the "SFRL Scripts" folder that can be accessed using Choose Script... and Choose Text Script.... The file Sample.rtf included in the "SFRL Scripts" folder contains some good input text to use for exploring the standard(and other) services.
You can easily add and remove services to the Text Wielder service menu. You can use either one of the many SFRL scripts provided in the "SFRL Scripts" folder for the service or make your own SFRL script(see the other documentation on how to do this). Below is a short tutorial on how to add a SFRL script from the "SFRL Scripts" folder as a service.
Adding a Service:
You can remove one or more services at a time using the Service Manager(pictured below). You can also change the names of the service menu items with the Service Manager.
Removing Services: