Thanks Nick, very helpful, this works perfect.
I want to pass the selected text to the complied script, saved on desktop as “TextEditNew.scpt”
-- example .applescript file with placeholder strings:
tell application "TextEdit"
activate
set theDocument to make new document
set text of theDocument to ("{popclip text} - Clipped from {popclip browser url}")
end tell
On wiki, says → need a .json file to call script, and pass parameters
wondering with “Extension Snippets” how can v pass parameters in above script as “{popclip text}”
or to a named Handler in the Script (as below)
Thank you
on newDocument(theText, theUrl) --this is a handler
tell application "TextEdit"
activate
set theDocument to make new document
set text of theDocument to (theText & " - Clipped from " & theUrl)
end tell
end newDocument