Applescript compiler error

RGould8 at aol.com RGould8 at aol.com
Wed Jun 2 00:47:37 EDT 2004


I'm having some strange Applescript issues with Revolution, and I need some 
help figuring out why it's behaving this way.   I have the below script in a 
text field in Revolution.   It's whole purpose is to add a new email account to 
AppleMail.   I originally had an Applescript from script-editor and I pasted 
it into a text field in Revolution and ran it.   Revolution complained that 
Applescript was giving a "compiler error".   I thought perhaps hidden characters 
were getting inserted somehow and messing up the Applescript compiler, so I 
wrote the below code to piece it together by hand, and I still get a compiler 
error.   Can anyone tell me what's wrong with the below script?   If you take 
the output and paste it into Script Editor, it'll work just fine.   There's just 
something about running it in Revolution that Applescript doesn't like.



on addemailaccount


   put "set theUsername to " & quote & "username" & quote & return into 
scripttorun
   put "set thePassword to " & quote & "password" & quote & return after 
scripttorun
   put "set theFullName to " & quote & "full name" & quote & return after 
scripttorun
   put "set theEmailaddresses to " & quote & "email address" & quote & return 
after scripttorun
   put "set theServerName to " & quote & "outgoing.myisp.net" & quote & 
return after scripttorun
   put "set theAccountName to " & quote & "myisp Account" & quote & return 
after scripttorun
   put "set theHostname to " & quote & "incoming.myisp.net" & quote & return 
after scripttorun
   put "set theSMTPLogin to theUsername" & return after scripttorun
   put "set theSMTPPassword to thePassword" & return after scripttorun
   put "tell application " & quote & "Mail" & quote & return after 
scripttorun
   put "try" & return after scripttorun
   put "set theNewAccount to make new pop account with properties 
{name:theAccountName, user name:theUsername, server name:theHostname, 
password:thePassword, full name:theFullName, email addresses:{theEmailAddresses}}" & return after 
scripttorun
   put "on error" & return after scripttorun
   put "return " & quote & "Account already in AppleMail." & return after 
scripttorun
   put "end try" & return after scripttorun
   put "end tell" & return after scriptorun
    
   answer "" & scripttorun
    
   do scripttorun as AppleScript
    
   put "result of Applescript mailcreation: " & the result

end addemailaccount












More information about the use-livecode mailing list