I am trying to configure a keyboard shortcut (Fn + A) to open the airdrop share window with the selected file.
How can I do this with BTT?
I am trying to configure a keyboard shortcut (Fn + A) to open the airdrop share window with the selected file.
How can I do this with BTT?
You can do this with an "Run AppleScript (blocked)" Action:
use framework "Foundation"
use scripting additions
tell application "Finder"
set temp to selection as alias list
if (count of temp) is 1 then
set thePath to POSIX path of item 1 of temp
set theURL to current application's |NSURL|'s fileURLWithPath:thePath
set theService to current application's NSSharingService's sharingServiceNamed:(current application's NSSharingServiceNameSendViaAirDrop)
theService's performSelectorOnMainThread:"performWithItems:" withObject:{theURL} waitUntilDone:false
end if
end tell
Note: