Estoy desarrollando un complemento de diccionario personalizado para agregar a Dictionary.app de Mac.
Me gustaría que mi usuario me informara sobre los errores del complemento de diccionario o sus comentarios (si los hubiera) como desarrollador. Hasta ahora, he estado usando el siguiente AppleScript para enviarme tales informes usando Mail.app.
tell application "Finder"
set current_path to (container of (path to me) as string) & "VT_icon.icns"
end tell
display dialog "Intro. to Dict Add-on." with title "My Dictionary for Mac" with icon file current_path buttons {"Cancel", "OK"} default button "OK" giving up after 500
if the button returned of the result is "OK" then
tell application "System Events"
if not (exists application process "Dictionary") then
tell application "Dictionary" to activate
end if
set frontmost of process "Dictionary" to true
end tell
delay 2
tell application "System Events"
set the clipboard to ""
keystroke tab
keystroke tab
keystroke "a" using command down
delay 1
keystroke "c" using command down
delay 1
set selected_text to (the clipboard as text)
end tell
tell application "Mail"
set myMessage to make new outgoing message at the beginning of outgoing messages with properties {subject:"Về: My Dictionary for Mac"}
tell myMessage to make new to recipient at beginning of to recipients with properties {address:"myemail@hotmail.com"}
set myMessage's content to "My precoded message: " & (the clipboard as text)
set myMessage's visible to true
activate
end tell
end if
Hasta ahora, todo bien. El script anterior funciona perfectamente. Sin embargo , surge un gran problema:The user cannot submit reports if s/he does not use or configure Mail.app to send email.
Entonces mi pregunta es: ¿Puedo usar un script de Apple para enviar correos electrónicos sin usar Mail.app?
La implementación de la parte de envío de un cliente de correo en AppleScript es probablemente un desafío, pero podría haber otros medios:
mailto:
esquema para iniciar el cliente de correo que está usando el usuario. Sin embargo, no podrá proporcionar una plantilla de correo (pero podría preparar algo en el portapapeles y hacer que el usuario lo pegue en el nuevo correo), y fallará para aquellos usuarios que no usan ningún cliente de correo. .
sin ladera
sin ladera