Estoy desarrollando un complemento de diccionario personalizado para agregarlo a Mac's Dictionary.app.
Quisiera que mi usuario informara los errores del complemento del diccionario o sus comentarios (si los hubiera) a mí como desarrollador. Hasta ahora, he estado utilizando el siguiente AppleScript para enviarme dichos informes utilizando 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:"[email protected]"}
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 guión 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?