facilethings capture prompt

This commit is contained in:
Philipp Hochkamp 2022-10-26 17:14:53 +02:00
parent 4e463149a5
commit acd17514fd
No known key found for this signature in database
GPG key ID: 3676AB4CB36E5641

View file

@ -438,3 +438,30 @@ end)
--
-- hs.hotkey.bind(modifiers.clipboard, "v", function() clipboard:toggleClipboard() end)
-- hs.hotkey.bind(modifiers.clipboard, hs.keycodes.map.delete, function() clipboard:clearAll() end)
----------------------------------------------------------------------------------------------------
-- Facilethings paste
----------------------------------------------------------------------------------------------------
local function facileCaptpure()
ok,text = hs.dialog.textPrompt("Facilethings","Capture")
if ok then
hs.osascript.applescript(string.format([[
tell application "Mail"
##Create the message
set theMessage to make new outgoing message with properties {subject:"%s", content:"", visible:true}
##Set a recipient
tell theMessage
make new to recipient with properties {name:"inbox@facilethings.com", address:"inbox@facilethings.com"}
##Send the Message
send
end tell
end tell
]], text))
end
end
hs.hotkey.bind(modifiers.window, "f",facileCaptpure)