Last active
December 9, 2016 15:05
-
-
Save MrCirdo/bd6868aea3d835e0ce99a33e60376d24 to your computer and use it in GitHub Desktop.
Un petit applescript qui automatiquement déchiffre les messages reçus par Message
This file contains hidden or 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
using terms from application "Messages" | |
on active chat message received from theBuddy for theTextChat with theText | |
decrypt(theText) | |
end active chat message received | |
on message sent theText with theTexte | |
end message sent | |
on message received theMessage with eventDescription | |
end message received | |
on chat room message received with eventDescription | |
end chat room message received | |
on addressed message received theMessage from theBuddy for theChat with eventDescription | |
end addressed message received | |
on received text invitation with eventDescription | |
end received text invitation | |
on received audio invitation theText from theBuddy for theChat with eventDescription | |
end received audio invitation | |
on received video invitation theText from theBuddy for theChat with eventDescription | |
end received video invitation | |
on buddy authorization requested with eventDescription | |
end buddy authorization requested | |
on addressed chat room message received with eventDescription | |
end addressed chat room message received | |
# The following are unused but need to be defined to avoid an error | |
on login finished with eventDescription | |
# say eventDescription | |
end login finished | |
on logout finished with eventDescription | |
# say eventDescription | |
end logout finished | |
on buddy became available with eventDescription | |
# say eventDescription | |
end buddy became available | |
on buddy became unavailable with eventDescription | |
# say eventDescription | |
end buddy became unavailable | |
on received file transfer invitation theFileTransfer with eventDescription | |
# say eventDescription | |
end received file transfer invitation | |
on av chat started with eventDescription | |
# say eventDescription | |
end av chat started | |
on av chat ended with eventDescription | |
# say eventDescription | |
end av chat ended | |
on completed file transfer with eventDescription | |
# say eventDescription | |
end completed file transfer | |
end using terms from | |
on decrypt(message) | |
if message begins with "-----BEGIN PGP MESSAGE-----" then | |
tell application "TextEdit" | |
activate | |
set theDocument to make new document | |
set text of theDocument to message | |
end tell | |
tell application "System Events" | |
keystroke "a" using command down | |
keystroke "d" using {command down, shift down} | |
end tell | |
end if | |
end decrypt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Petite configuration avant :
Open PGP: Decrypt Selection
à ⇧⌘EOuvrir le dossier Scripts
dansGestionnaire AppleScript
.Gestionnaire AppleScript