Created
March 21, 2025 14:26
-
-
Save wirtzdan/44145652ec7782c1e1e064503a4a12ad to your computer and use it in GitHub Desktop.
Open Selected Text in Root Search (Raycast Script)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
# Required parameters: | |
# @raycast.schemaVersion 1 | |
# @raycast.title Open Selected Text In Root Search | |
# @raycast.mode silent | |
# Optional parameters: | |
# @raycast.icon 🔍 | |
# @raycast.packageName open-selected-text | |
# Documentation: | |
# @raycast.description Opens selected text in Raycast root search | |
# @raycast.author wirtzdan | |
# @raycast.authorURL https://raycast.com/wirtzdan | |
on run | |
-- Get the selected text | |
set selectedText to "" | |
tell application "System Events" | |
keystroke "c" using {command down} | |
delay 0.1 | |
end tell | |
set selectedText to (the clipboard) | |
-- Open Raycast and paste the text | |
tell application "System Events" | |
-- Trigger Raycast (assuming default Command + Space shortcut) | |
keystroke " " using {command down} | |
delay 0.1 | |
-- Paste the selected text | |
keystroke "v" using {command down} | |
end tell | |
end run | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment