43 votes

Comment utiliser AirDrop depuis le terminal ?

Existe-t-il un moyen de partager un fichier par AirDrop via Terminal sur Mountain Lion ? Comment ?

1voto

Pawel Debski Points 2574

Vous pouvez également définir automatiquement votre paramètre de réception AirDrop sur "Tout le monde", script sur la base de Aucune des réponses ci-dessus :

#!/usr/bin/osascript
tell application "Finder"
    make new Finder window
    activate
end tell
tell application "System Events" to tell process "Finder"
    keystroke "R" using {command down, shift down}
    # open the "Allow me to be discovered by" dropdown
    click button 1 of splitter group 1 of splitter group 1 of window 1
    # select the 3rd option (Everyone)
    click radio button 3 of pop over 1 of splitter group 1 of splitter group 1 of window 1
end tell

0voto

Lano Points 438
osascript -e 'tell application "Finder"
    activate
    tell application "System Events" to keystroke "R" using {command down, shift down}
end tell'

LesApples.com

LesApples est une communauté de Apple où vous pouvez résoudre vos problèmes et vos doutes. Vous pouvez consulter les questions des autres utilisateurs d'appareils Apple, poser vos propres questions ou résoudre celles des autres.

Powered by:

X