| From: Jim Correia | Date Sent: 2007-01-10 13:46:28 |
| Subject: How to send selected items as attachments with Apple Mail | To: Yojimbo Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
The question of how to email an item has come up before. Here is an
example script which will email the selected items as attachments
using Apple Mail. Save to your scripts folder and invoke with the
system wide script menu, or your favorite utility (e.g. Fast Scripts.)
- Jim
--begin script--
(*
Creates a new outgoing message with the selected Yojimbo items
attached.
Apple Mail version
*)
tell application "Yojimbo"
set _targets to (selected items of browser window 1)
set _files to (export _targets to (path to temporary items)) as list
end tell
tell application "Mail"
set _message to make new outgoing message
tell _message
set visible to true
tell content
repeat with _f in _files
(* Mail should accept a typeFileURL file reference here, but
doesn't. A POSIX path works. *)
set _f to POSIX path of _f
make new attachment with properties {file name:_f} at after the
last paragraph
end repeat
end tell
end tell
activate
end tell
tell application "Finder"
move _files to trash
end tell
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>
| From: Patrick Gilmour | Date Sent: 2007-01-10 14:45:49 |
| Subject: Re: How to send selected items as attachments with Apple Mail | To: Yojimbo Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
Very cool - thank you, Jim!
Are there any plans to put an Applescript menu in Yojimbo (like in
BBEdit) or are we going to have to stick to the system-wide one?
Thanks again,
Pat
On Jan 10, 2007, at 18:46 PM, Jim Correia wrote:
> The question of how to email an item has come up before. Here is an
> example script which will email the selected items as attachments
> using Apple Mail. Save to your scripts folder and invoke with the
> system wide script menu, or your favorite utility (e.g. Fast Scripts.)
>
> - Jim
>
> --begin script--
>
>
> (*
> Creates a new outgoing message with the selected Yojimbo items
> attached.
> Apple Mail version
> *)
>
> tell application "Yojimbo"
> set _targets to (selected items of browser window 1)
> set _files to (export _targets to (path to temporary items)) as list
> end tell
>
> tell application "Mail"
> set _message to make new outgoing message
> tell _message
> set visible to true
> tell content
> repeat with _f in _files
> (* Mail should accept a typeFileURL file reference here, but
> doesn't. A POSIX path works. *)
> set _f to POSIX path of _f
> make new attachment with properties {file name:_f} at after the
> last paragraph
> end repeat
> end tell
> end tell
> activate
> end tell
>
> tell application "Finder"
> move _files to trash
> end tell
>
>
> --
> ----------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <yojimbo-talk@[Protected]>.
> To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
> List archives: <http://www.listsearch.com/yojimbotalk.lasso>
> Have a feature request, or not sure if the software's
> workingcorrectly? Please send mail to: <support@[Protected]>
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>
| From: Patrick Gilmour | Date Sent: 2007-01-10 15:03:07 |
| Subject: Re: How to send selected items as attachments with Apple Mail | To: Yojimbo Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
I just realised that there is an Applications folder in the Script
Menu that activates a folder full of scripts for a particular
application when that application is active. Just create a Yojimbo
folder in the Applications folder in your scripts folder and the
scripts therein only appear when that app is active. Probably old
news to a lot of you but I'm rather impressed!
On Jan 10, 2007, at 19:45 PM, Patrick Gilmour wrote:
> Very cool - thank you, Jim!
> Are there any plans to put an Applescript menu in Yojimbo (like in
> BBEdit) or are we going to have to stick to the system-wide one?
> Thanks again,
> Pat
>
>
>
>
>
> On Jan 10, 2007, at 18:46 PM, Jim Correia wrote:
>
>> The question of how to email an item has come up before. Here is
>> an example script which will email the selected items as
>> attachments using Apple Mail. Save to your scripts folder and
>> invoke with the system wide script menu, or your favorite utility
>> (e.g. Fast Scripts.)
>>
>> - Jim
>>
>> --begin script--
>>
>>
>> (*
>> Creates a new outgoing message with the selected Yojimbo items
>> attached.
>> Apple Mail version
>> *)
>>
>> tell application "Yojimbo"
>> set _targets to (selected items of browser window 1)
>> set _files to (export _targets to (path to temporary items)) as list
>> end tell
>>
>> tell application "Mail"
>> set _message to make new outgoing message
>> tell _message
>> set visible to true
>> tell content
>> repeat with _f in _files
>> (* Mail should accept a typeFileURL file reference here, but
>> doesn't. A POSIX path works. *)
>> set _f to POSIX path of _f
>> make new attachment with properties {file name:_f} at after
>> the last paragraph
>> end repeat
>> end tell
>> end tell
>> activate
>> end tell
>>
>> tell application "Finder"
>> move _files to trash
>> end tell
>>
>>
>> --
>> ----------------------------------------------------------
>> This message is sent to you because you are subscribed to
>> the mailing list <yojimbo-talk@[Protected]>.
>> To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
>> List archives: <http://www.listsearch.com/yojimbotalk.lasso>
>> Have a feature request, or not sure if the software's
>> workingcorrectly? Please send mail to: <support@[Protected]>
>
>
> --
> ----------------------------------------------------------
> This message is sent to you because you are subscribed to
> the mailing list <yojimbo-talk@[Protected]>.
> To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
> List archives: <http://www.listsearch.com/yojimbotalk.lasso>
> Have a feature request, or not sure if the software's
> workingcorrectly? Please send mail to: <support@[Protected]>
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>
| From: J. De Salvo | Date Sent: 2007-01-10 16:14:32 |
| Subject: Re: How to Send selected items as attachments with Apple Mail | To: Yojimbo Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
On January 10, Jim Corriea wrote:
>The question of how to email an item has come up before. Here is an
>example script which will email the selected items as attachments
>using Apple Mail.
Great! For the AppleScript challenged among us, would you mind posting
an alteration of this script that works with Mailsmith?
Thanks,
Joe
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>
| From: Jim Correia | Date Sent: 2007-01-10 16:28:44 |
| Subject: Re: How to Send selected items as attachments with Apple Mail | To: Yojimbo Talk |
| Navigation: First Message | Previous Message | Next Message | Last Message | |
On Jan 10, 2007, at 9:14 PM, J. De Salvo wrote:
> On January 10, Jim Corriea wrote:
>
>> The question of how to email an item has come up before. Here is an
>> example script which will email the selected items as attachments
>> using Apple Mail.
>
> Great! For the AppleScript challenged among us, would you mind
> posting
> an alteration of this script that works with Mailsmith?
Joe - I did. It was the message that immediately followed the one
showing how to do it with Apple Mail.
http://www.listsearch.com/yojimbotalk.lasso?id=2769
For email clients not named "Apple Mail" or "Mailsmith" you are on
your own :-). The portion of the script which exports the selected
Yojimbo items to file is reusable though.
Jim
--
----------------------------------------------------------
This message is sent to you because you are subscribed to
the mailing list <yojimbo-talk@[Protected]>.
To unsubscribe, send mail to: <yojimbo-talk-off@[Protected]>
List archives: <http://www.listsearch.com/yojimbotalk.lasso>
Have a feature request, or not sure if the software's working
correctly? Please send mail to: <support@[Protected]>