Re: Just returning Filename... not whole path
Re: Just returning Filename... not whole path
- Subject: Re: Just returning Filename... not whole path
- From: Brett Conlon/HU/AU/SonyDADC <email@hidden>
- Date: Sat, 22 Oct 2005 09:25:48 +1000
Hi Eric,
I don't know if it's the same for everyone but with this list, when you
respond, it only goes back to the sender, unless you manually include the
list address. I just responded to your email but it only went back to you.
So, I'm sending this to the list this time.
OK, after sending my last email I realised that I had set the fileName
value but not used it in the dialog. So I tried changing aFile to fileName
in the display dialogue line but it returned the following error:
Can't get name of alias "PATH TO FILE.PDF"
It does the same thing when I change it to (name of aFile).
I even tried changing aFile to (class of aFile) and it showed alias in the
dialogue.
I'm sure this means everything to those who know what they are doing but
for me... I don't know how to fix this.
Many thanks,
Cojcolds
Eric C Saunders <email@hidden>
21/10/05 10:35 PM
To
Brett Conlon/HU/AU/SonyDADC <email@hidden>
cc
email@hidden
Subject
Re: Just returning Filename... not whole path
On 10/21/2005 12:11:43 AM, Brett Conlon wrote:
> OK, almost there now...
>
> In the prompt dialogue where it asks for the title name of the DVD,
> if I have dropped more than one file it gets confusing as to which
> file it's asking the title of so I'd like to add the filename in
thedialogue.
>
> The below snipets of my script highlight the bits I'm working on but
> at the moment the dialogue is showing the entire path of the file
> being worked on... not just the filename. How do I change it to just
> return the filename?
> ...
> --ASK TITLE
> on AskTitle(aFile)
> tell me to activate
> repeat
> tell application "Finder"
> set fileName to name of aFile
> set d to display dialog "Please enter the
> Title name (less than 13 chrs) for the file " & aFile & ":" default
answer ""
> set answer to text returned of d
You passed aFile to the handler as a filepath, then assigned fileName the
name of that file. In the display dialog line you need to use fileName,
not aFile, to display only the file name, or you could eliminate the
fileName variable and write
set d to display dialog "Please enter the Title name (less than 13 chrs)
for the file " & (name of aFile) & ":" default answer ""
>
> Your assistance is MOST appreciated!
>
> Cheers,
>
> Coj
HTH
Eric
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service._______________________________________________________________
This electronic message contains information from MeadWestvaco
Corporation or subsidiary companies, which may be confidential,
privileged or otherwise protected from disclosure. The
information is intended to be used solely by the recipient(s)
named. If you are not an intended recipient, be aware that
any review, disclosure, copying, distribution or use of this
transmission or its contents is prohibited. If you have
received this transmission in error, please notify MeadWestvaco
immediately at email@hidden.
_______________________________________________________________________
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden