Hi Paul,

Thanks for the script.  I’m not an AppleScript Expert either.
I’ve dabbled with it from time to time and usually end up
hating the experience.

Sometimes using the “Record” feature of AppleScript
can give one a good idea of what to do.  

I would probably eliminate a repeat or two. I don’t want
the script looping through all of my inboxes or emails,
I just want it to look at the last one that was just received.

I’m also looking into what Key Maestro might be able to do too.

Thanks for the suggestion!

Rick

> On Feb 24, 2021, at 1:38 PM, Paul Hibbert via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
> I know this is moving away from LC, but you can use a simple AppleScript to 
> to do this, then trigger the AppleScript from Mail rules, or run as a 
> standalone app, or you could trigger the AppleScript from LC if that’s what 
> you need.
> 
> I’m no AppleScript expert, I just did a bit of searching and found a script 
> that could be easily modified, anyway, this is the script I tested and it 
> seems to do what you asked. It could probably be improved, if anyone 
> understands AS better please step in.
> 
> 
> 
> set toAddress to "myemailaddr...@mail.com"
> set toName to "My Name"
> set toSubject to "Something Cool"
> 
> tell application "Mail"
>       repeat with _acct in imap accounts
>               --Look For Messages in the INBOX with the subject set in 
> toSubject 
>               set _acct_name to name of _acct
>               set _inbox to _acct's mailbox "INBOX"
>               set _msgs_to_capture to (a reference to ¬
>                       (every message of _inbox ¬
>                               whose subject is toSubject))
>               
>               repeat with _msg in _msgs_to_capture
>                       set _fwdmsg to forward _msg with opening window
>                       
>                       tell _fwdmsg
>                               make new to recipient at end of ¬
>                                       to recipients with properties 
> {name:toName, address:toAddress}
>                       end tell
>                       
>                       activate
>                       
>                       send _fwdmsg
>               end repeat
>       end repeat
> end tell
> 
> 
> 
> To compile this code, open Utilities > Script Editor, create a new script and 
> paste the code in, make the changes you need to lines 1, 2 and 3 and save the 
> script as an application in the User > Library > Application Scripts > 
> com.apple.mail folder, then it will be available in the Apple Mail Rules.
> 
> Paul
> 
>> On 24Feb, 2021, at 8:29 AM, Rick Harrison via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi Matthias,
>> 
>> Ok, so Mojave is good and macOS Mail in Catalina is the problem.
>> 
>> I don’t know if we can come up with an LC solution work around
>> for this problem, or if I need to be looking at some other email
>> client software.  Is anyone using Thunderbird or another
>> program that has Rules or Filter auto-respond capability
>> that might work?
>> 
>> Your thoughts and suggestions?
>> 
>> Thanks,
>> 
>> Rick
>> 
>>> On Feb 24, 2021, at 11:23 AM, matthias rebbe via use-livecode 
>>> <use-livecode@lists.runrev.com> wrote:
>>> 
>>> Hi Rick,
>>> 
>>> i mixed the version numbers. I tested with 15.3 which is Catalina. There it 
>>> shows also the behaviour.
>>> In Mojave the subjects is not changed and keeps the original value.
>>> 
>>> Please excuse the confusion.
>>> 
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to