• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Just returning Filename... not whole path
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Just returning Filename... not whole path
      • From: Brett Conlon/HU/AU/SonyDADC <email@hidden>
References: 
 >Just returning Filename... not whole path (From: Brett Conlon/HU/AU/SonyDADC <email@hidden>)

  • Prev by Date: Re: decompilation insanity
  • Next by Date: Re: Change a folder to list view
  • Previous by thread: Re: Just returning Filename... not whole path
  • Next by thread: Re: Just returning Filename... not whole path
  • Index(es):
    • Date
    • Thread