Re: Just returning Filename... not whole path
Re: Just returning Filename... not whole path
- Subject: Re: Just returning Filename... not whole path
- From: Eric C Saunders <email@hidden>
- Date: Fri, 21 Oct 2005 08:35:49 -0400
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