Re: Finder: go and see this file on the server
Re: Finder: go and see this file on the server
- Subject: Re: Finder: go and see this file on the server
- From: Vincent <email@hidden>
- Date: Mon, 4 Oct 2010 10:35:25 +0400
Having been in the same situation as you, may be this can help:
Getting path of networked multiple items to send as mac os x finder link format via ichat, of course will not work if its a local item or if receiver is not connected to the share point {will not work if there is a space in any name in the path, anyway the good rule in file naming is to substitute space with underscore or first word letter caps: xxxx_xxx or XxxxxXxxx}:
set theSel to (selection of application "Finder")
set pathList to {}
repeat with anItem in theSel
set the end of pathList to POSIX path of (anItem as alias)
end repeat
set savedDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to "
" & "file://"
set the clipboard to "file://" & pathList as string
set AppleScript's text item delimiters to savedDelimiters
Getting path of networked single item to send as mac os x finder link format via ichat:
tell application "Finder"
get POSIX path of (the selection as alias)
set ItemPath to result
set ItemLink to "file://" & ItemPath
set TheLink to result
set the clipboard to TheLink
end tell
the same thing less lines:
tell application "Finder"
set sel to the selection as text
set the clipboard to "file://" & POSIX path of sel
end tell
On 03 Oct 2010, at 23:00, email@hidden wrote:
Send AppleScript-Users mailing list submissions to
email@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.apple.com/mailman/listinfo/applescript-users
or, via email, send a message with subject or body 'help' to
email@hidden
You can reach the person managing the list at
email@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of AppleScript-Users digest..."
Today's Topics:
1. Re: Finder: go and see this file on the server (Nathan Greenstein)
2. Re: Finder: go and see this file on the server (Axel Luttgens)
3. invoke script when email opened ? (Irwin Poch?)
4. Re: invoke script when email opened ? (Doug McNutt)
----------------------------------------------------------------------
Message: 1
Date: Sat, 2 Oct 2010 12:46:15 -0700
From: Nathan Greenstein <email@hidden>
Subject: Re: Finder: go and see this file on the server
To: Olivier Berquin <email@hidden>
Cc: email@hidden
Message-ID:
<AANLkTi=dG9ih_7m9Rm+400-N4+sKoVZ-+F2VBX7z=email@hidden>
Content-Type: text/plain; charset="iso-8859-1"
You can do this:
open location "mailto:email@hidden
?subject=Subject Here&body=*Click Here*"
This will open a new message in the default mail client to
email@hiddenth the subject "Subject Here" and a link to
http://www.example.com in the body. The first underlined portion is the
actual URL, and the second is the displayed text. You could just replace the
bits of the link with your own. All the sending user has to do is click
send. Whether or not the link will be clickable for the receiver depends on
your email configurations.
If it isn't, another option is to put a link into an HTML file and send that
as an attachment. You can't, as far as I know, add attachments with a
script.
A better option altogether might be to script the email application. You
could have it make a new message to someone, make a link, and send.
HTH,
--
Nathan Greenstein
email@hidden
On Sat, Oct 2, 2010 at 10:13, Olivier Berquin <email@hidden>wrote:
> I work in a small company (we're 17).
> It happens very often to tell a colleague: go and see this file on the
> server.
> I would like to use AS to send the path to the file by email, so that
> the recipient just has to click on the link to open the remote file.
>
> I've got the URL of the file.
> Ex:
>
> file://localhost/Volumes/Clients/C/CNP/CNP 3028 congrès alumni-sponsoring cto/CNP 3028-003 Programme/CNP Programme v4.indd
>
> And there ... I'm stuck.
> Anyone have a idea?
> Which format to use to send it by mail?
> Should I create a script on the recipient side for the Finder select
> this file directly?
> And .. how to do this?
>
> TIA.
>
> Oli.
>
>
> --
> Mac OS 10.6.4
> InDesign CS5 - 7.0.2
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.apple.com/mailman/private/applescript-users/attachments/20101002/f549a396/attachment.html
------------------------------
Message: 2
Date: Sun, 3 Oct 2010 10:15:59 +0200
From: Axel Luttgens <email@hidden>
Subject: Re: Finder: go and see this file on the server
To: asu <email@hidden>
Message-ID: <email@hidden>
Content-Type: text/plain; charset=iso-8859-1
Le 2 oct. 2010 à 19:13:16, Olivier Berquin a écrit :
> I work in a small company (we're 17).
> It happens very often to tell a colleague: go and see this file on the server.
> I would like to use AS to send the path to the file by email, so that
> the recipient just has to click on the link to open the remote file.
>
> I've got the URL of the file.
> Ex:
> file://localhost/Volumes/Clients/C/CNP/CNP 3028 congrès alumni-sponsoring cto/CNP 3028-003 Programme/CNP Programme v4.indd
Hello,
The above is the local path for accessing a file on a server's already mounted share point.
In this case, when converted into a posix path:
/Volumes/Clients/C/CNP/CNP 3028 congrès alumni-sponsoring cto/CNP 3028-003 Programme/CNP Programme v4.indd
the URL seems to indicate that some server makes volume "Clients" available, that you've already mounted that volume on your machine, and that the interesting file is "CNP Programme v4.indd" located in folder "CNP 3028-003 Programme" of folder "CNP 3028 congrès alumni-sponsoring cto" of folder "CNP" of folder "C" of that volume.
> And there ... I'm stuck.
> Anyone have a idea?
> Which format to use to send it by mail?
> Should I create a script on the recipient side for the Finder select
> this file directly?
> And .. how to do this?
You need to tell people which server to access, how to access it, which volume is to be mounted from that server, and what path to follow on that volume.
Assuming you have an AFP server with bonjour name "monserveur.local", that info could be provided with:
afp://monserveur.local/Clients/C/CNP/CNP 3028 congrès alumni-sponsoring cto/CNP 3028-003 Programme/CNP Programme v4.indd
On the message's recipient side, Mail should be able to recognize the above as a URL, to display it as a clickable link, and to be kind enough to ask the Finder to do the job should the link be clicked.
HTH,
Axel
------------------------------
Message: 3
Date: Sun, 3 Oct 2010 07:01:52 -0500
From: Irwin Poch? <email@hidden>
Subject: invoke script when email opened ?
To: email@hidden
Message-ID: <email@hidden>
Content-Type: text/plain; charset=us-ascii
Is it possible to invoke an AS when an email is opened in Mail ? What I would like to do is conditionally increase the text size ( Format > Style > Bigger ) of some emails.
Thanks,
-Irwin
------------------------------
Message: 4
Date: Sun, 3 Oct 2010 10:42:33 -0600
From: Doug McNutt <email@hidden>
Subject: Re: invoke script when email opened ?
To: email@hidden
Message-ID: <p05100300c8ce61398e90@[192.168.1.14]>
Content-Type: text/plain; charset="iso-8859-1"
At 07:01 -0500 10/3/10, Irwin Poché wrote:
> Is it possible to invoke an AS when an email is opened in Mail ? What I would like to do is conditionally increase the text size ( Format > Style > Bigger ) of some emails.
>
If you send the email as HTML you have control over fonts and other styles. But then it will probably go straight to my junk mailbox. I did use HTML to create mail to a nearly blind friend so there are reasons.
Running an AppleScript as a result of reading the email is an absolute invitation to malware bastards. Don't even think about it. Leave those ideas in the hands of Active-X.
--
--> If it's not on fire it's a software problem. <--
------------------------------
_______________________________________________
AppleScript-Users mailing list
email@hidden
http://lists.apple.com/mailman/listinfo/applescript-users
End of AppleScript-Users Digest, Vol 7, Issue 489
*************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden