• 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: pass filenames to an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pass filenames to an application


  • Subject: Re: pass filenames to an application
  • From: kai <email@hidden>
  • Date: Tue, 31 May 2005 23:11:13 +0100


On Tuesday, May 31, 2005, at 10:41 pm, dkd brain wrote:

I am trying to do something that *should* be relatively simple, I want to grab a bunch of files (whose names start with the same string) in an arbitrary folder and open them in BBedit....

I can figure out how to identify these files, but can't seem to pass the filenames back to BBedit


i.e. here is the finder part

set theItem to (choose folder) as string
tell application "Finder"
		select (every file of folder theItem whose name begins with "AS ")
	end tell


so, my little finder snippet correctly identifies the files I want to send to BBedit, but I can't figure out how to get these filenames into a bbedit tell statement
i.e.


tell application BBEdit
open <filenames>
end tell

thanks for any advice....

While I don't have a copy of BBEdit currently to hand, this works for me with Tex-Edit Plus - so I imagine something very similar should work for you:


----------------------

set f to choose folder

tell application "Finder" to try
	set l to (f's files whose name begins with "AS ") as alias list
on error
	set l to (f's files whose name begins with "AS ") as alias as list
end try

tell application "Tex-Edit Plus" to open l

----------------------

---
kai

_______________________________________________
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: 
 >pass filenames to an application (From: dkd brain <email@hidden>)

  • Prev by Date: Re: pass filenames to an application
  • Next by Date: Re: Filemaker Pro chokes on Find command
  • Previous by thread: Re: pass filenames to an application
  • Next by thread: Re: pass filenames to an application
  • Index(es):
    • Date
    • Thread