comment créer un onglet de discussion Adium avec AppleScript
-
28-10-2019 - |
Question
J'utilise un script AppleScript pour envoyer des msg à mon contact via Quicksilver.Cela ressemble à ceci ( lien ), mais la ligne à envoyerle message au contact est:
tell account of im_contact
set newChat to make new chat with contacts {im_contact} with new chat window
end tell
ie: pour envoyer un msg à Anne, activez Quicksilver, appuyez sur '.', tapez anne: my message here
et cela créera une nouvelle fenêtre de discussion avec Anne avec le message tapé en arrière-plan (je l'aime en arrière-plan puisque je ne le fais pas 'Je veux que la nouvelle fenêtre ciblée interrompe mon flux de travail).
Le problème est que pour différents contacts, cela crée différentes fenêtres de discussion et non des onglets.
J'ai envoyé un e-mail à Adium pour obtenir de l'aide et ils m'ont demandé d'essayer ceci sans succès:
tell account of im_contact
set newChat to make new chat with contacts {im_contact} at end of chat window 1 with new chat window
end tell
ou
tell account of im_contact
set newChat to make new chat with contacts {im_contact} at end of chat window 1
end tell
Comment puis-je modifier ce script pour qu'il crée des onglets au lieu de nouvelles fenêtres de discussion en arrière-plan?
La solution
J'ai résolu ce problème avec:
set existing_window to first chat window
tell account of im_contact
to (make new chat with contacts {im_contact} at end of (chats of existing_window))
end tell