Process Text with AppleScript
Pass entered text through AppleScript
This Rule demonstrates a text input flowing through a script and into a result panel. It is a base for a small formatter or converter when you want to review script output before deciding where to use it.
When: Press Option + R. Do: Ask for text, pass that input to Run AppleScript, and display the script’s result. There is no If Condition. The supplied script simply returns its first argument unchanged; it does not yet format, validate, or convert the text.
Configure and try it
- Import with Open this Rule in Rulr, then review the hotkey and the input prompt. Change the prompt to describe your actual AppleScript task; the sample prompt still mentions a shell script.
- Review the script and its input Variable. Keep the prompted value connected to the script input and the returned result connected to Show Text or Image.
- Try the unchanged sample first by entering a short sentence. Confirm that the panel displays the same sentence. Cancel a second prompt and verify that processing stops.
- Replace the script with your intended transformation and test representative input. Review the 30-second timeout if the script performs a longer task.
Requirements and limits
The sample’s components are available without Pro. Accessibility is needed if you record a replacement shortcut. A different script may require additional Automation permissions depending on the apps it controls.
The sample asks for input; it does not read the current selection or run a shell command. Script failure stops the flow before result display. For saving selected passages directly, use Save Selected Text.