Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --choose way
- set switch to display dialog "Which way do you want to use?" buttons {"Messages", "Mail"} default button "Mail"
- set choice to button returned of switch
- --send message
- if choice is "Message" then
- set temp to display dialog "What do you want to tell your girlfriend" default answer ""
- set content to text returned of temp
- tell application "Messages"
- set receiver to buddy "your girlfriend's name in your Contact"
- send content to receiver
- end tell
- end if
- --send mail
- if choice is "Mail" then
- set mailbox to display dialog "Which mailbox do you want to use?" buttons {"mailbox1", "mailbox2"} default button "mailbox1"
- set mailbox to button returned of mailbox
- if mailbox is "mailbox1" then
- set theSender to "xxx@xxx"
- end if
- if mailbox is "mailbox2" then
- set theSender to "xxx@xxx"
- end if
- tell application "Mail"
- set inputContent to display dialog "what do you want to say to your girlfriend?" default answer ""
- set theSubject to "Missing you" -- the subject
- set theContent to text returned of inputContent -- the content
- set theAddress to "your girlfriend's email address" -- the receiver
- set msg to make new outgoing message with properties {sender:theSender, subject:theSubject, content:theContent}
- tell msg to make new to recipient at end of every to recipient with properties {address:theAddress, name:"sweetie"}
- send msg
- end tell
- end if
Add Comment
Please, Sign In to add comment