• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AS Studio - Variable Troubles - AAAARGHH
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AS Studio - Variable Troubles - AAAARGHH


  • Subject: Re: AS Studio - Variable Troubles - AAAARGHH
  • From: John Coelho <email@hidden>
  • Date: Fri, 25 Jan 2002 10:35:24 -0800

Trey,

I just tried a simple Studio application with the function you have below and it worked as expected. A little more information would be useful, how are you calling the handler? Are the handler's parameters properties? etc.....

jc

On Friday, January 25, 2002, at 08:32 AM, Trey Bean wrote:

From: Trey Bean <email@hidden>
Date: Fri Jan 25, 2002 08:32:43 AM US/Pacific
To: email@hidden
Subject: AS Studio - Variable Troubles - AAAARGHH

Hi all,

I have now been banging my head for about a week with zero results on what seems to be a bug in applescript studio. Looking for any help to show me the way or a workaround. And apologies upfront to anyone who has seen this on apple's discussions.

I have a AS Script written in 1.8.1 on OS X with Script Editor. It is basically a script that replies to clients with form emails. All the user has to do is enter a first name, last name and email addres - hit a button to tell the script what to send and voila - Email(s) have been sent. It works great as an AS App except you can't paste into the dialog boxes and I wanted to take advantage of the new UI, so I tried moving it over to and AS Studio App. And there is only one hangup, in the following funtion:

on sendMessage(theContent, theSubject, theFirstName, theLastName, theEmailAddress)
tell application "Mail"
activate
set this_message to make new compose message at beginning of every compose message
tell this_message
make new to recipient at beginning of to recipients with properties {address:theEmailAddress, display name:theFirstName & " " & theLastName}
set the subject to theSubject
set the content to theContent
end tell
make new message editor at beginning of every message editor
set the compose message of message editor 1 to this_message
end tell
end sendMessage

The problem is, is that when you tell mail to make a new message with the properties, using the variables passed to the function it never sets those properties, i.e. the to recipient is blank.

What is confusing is that it works fine as an applescript app. Same funtion.

Any help with this at will be greatly appreciated.

Trey Bean
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


References: 
 >AS Studio - Variable Troubles - AAAARGHH (From: Trey Bean <email@hidden>)

  • Prev by Date: Re: Simple calculation
  • Next by Date: Re: Simple calculation
  • Previous by thread: AS Studio - Variable Troubles - AAAARGHH
  • Next by thread: Call for Entries
  • Index(es):
    • Date
    • Thread