• 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: Script for Variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script for Variable


  • Subject: Re: Script for Variable
  • From: Craig Sutherland <email@hidden>
  • Date: Wed, 14 Jan 2004 13:22:02 -0600

On Jan 14, 2004, at 11:58 AM, Amir Bozorgzadeh wrote:
I am writing a script that merges two movie files together in Quicktime. I need the script to look inside a two folders and get whatever two files are in there. However, the files names are always different. Is there a way to introduce this variable to applescript without hardcoding a file name into it. If so, how? Thanks in advance for any help.
Amir,

set movFolder to choose folder
set movieList to (list folder movFolder without invisibles)

This will give you a list of the names of items in the folder you select when you run the script. You can set a path to the files:

set movieOne to ((movFolder as text) & item 1 of movieList)
set movieTwo to ((movFolder as Text) & item 2 of movielist)

If there are several files/items in the selected folder, you can set up a repeat loop to extract info about each. This does not consider folders also being in the movFolder. If that is an issue, you will need to use the Finder to differentiate between files and folders.

Craig Sutherland
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Script for Variable (From: Amir Bozorgzadeh <email@hidden>)

  • Prev by Date: Re: How do I schedule a script.
  • Next by Date: Re: Script for Variable
  • Previous by thread: Script for Variable
  • Next by thread: Re: Script for Variable
  • Index(es):
    • Date
    • Thread