• 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: cut out repetitive info
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cut out repetitive info


  • Subject: Re: cut out repetitive info
  • From: Emmanuel <email@hidden>
  • Date: Fri, 4 Feb 2005 00:27:46 +0100

At 12:19 AM +0100 2/4/05, Christian Vinaa wrote:
i have some lines where I write the same file path for various files that needs various changes

how is the better way to save space  stead of writing  each time the same path
file x (of folder q of folder w of folder t  etc etc )

the stuff in ( ) is the same

Just store the folder description into a variable:

tell app "Finder" to set aVar to to folder q of etc.
tell app "Finder" to get file x of aVar

If at the time where you set the variable the folder does not exist yet, use "a reference to":

tell app "Finder" to set aRef to a reference to folder q of etc.
tell app "Finder" to get file x of aRef

This way, the "folder blah" expression is evaluated only when you use aRef, not when you define it.

Emmanuel
_______________________________________________
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


References: 
 >applescript batching itself (From: "email@hidden" <email@hidden>)
 >Re: applescript batching itself (From: Emmanuel <email@hidden>)
 >cut out repetitive info (From: Christian Vinaa <email@hidden>)

  • Prev by Date: cut out repetitive info
  • Next by Date: use itunes to reorder tracks in a mysql database
  • Previous by thread: cut out repetitive info
  • Next by thread: Re: cut out repetitive info
  • Index(es):
    • Date
    • Thread