2016-03-23 15 views
1

İçinde iki tablonun olduğu bir sayı belgen var. İlki, veri girişi yaptığım ve açılır menüden değeri seçen basit bir form gibidir (kişinin adı ve mesajda kullanılan e-posta + değerleri). İkinci tablo, mesajın oluşturulduğu bir yerdir.Mac numarasından e-posta gönder AppleScript ile

I.e. in the first table I have: 
subject: textfield 
value1: dropdown 
value2: dropdown 
person: John Doe <[email protected]> 

Second table generates a mail message from table1 values: 
Subject of mail: $subject 
Hi, this is a request for $subject with properties $value1 , $value2. Responsible for your request is $person. 

Şu anda,/postaya bir ileti yapıştırın ve eliyle konu/kişiyi koymak kopyalayın. Birisi numaralar için Komut Dosyası menü çubuğundan arayacağım bir el yazısıyla yardım edebilir ve sayı değerlerinden bir mesaj/+ muhatap & konu yaratacaktır?

Gönderilen postalar için belirli bir ileti örneğini çekmek bile mümkün müdür?

cevap

0

Numara kullanmıyorum, ancak sayılar hücrelerinin değerlerini Applescript değişkenlerine ayıklayabileceğinizi varsayalım. Eğer göndermeden önce postalarınızı kontrol etmek gerekmiyorsa, hemen sonra bir gönderme talimatı

set mySubject to "subject value from Numbers" 
set myContent to "text content" -- in can be a concat of text and variables 
set mySignature to "name of signature created in Mail" 
set myContact to "joh,@doe.com" 

tell application "Mail" 
activate 
set newMessage to make new outgoing message with properties {visible:true, subject:mySubject, content:myContent} 
set message signature of newMessage to signature Ma_Signature -- not mandatory 
tell newMessage 
    make new to recipient at end of to recipients with properties {name:"", address:myContact} 
end tell 
end tell 

ekleyebilir veya değil: o zaman bir mail oluşturun.