• 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: choosing a specific file on desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: choosing a specific file on desktop


  • Subject: Re: choosing a specific file on desktop
  • From: Andy Wylie <email@hidden>
  • Date: Mon, 28 May 2001 08:43:35 +1200

on 28/5/01 3:39 AM,  }  at email@hidden wrote:

> hallo,
>
> please ignore:
>
>
>
> hallo,
>
> after i have opened a program how may i:
>
> 1. choose a specific file on the desktop
>
>
> merci.ekaterina
>
> ekaterina figure out : so simple + excuse me.
> _______________________________________________

I think most people would use command /o command /d but here's another
way...
---------------------
set derApp to name of (info for (path to frontmost application))

try
tell application "Finder"
set derFiles to name of files of desktop whose file type is "TEXT"
as list
end tell
on error
error "No Files On Desktop"
return 128
end try

set x to choose from list derFiles
if result is false then return 128

tell application "Finder"
set derFile to (files of desktop whose name is x) as string
end tell

tell application derApp to open alias derFile

_____________________________ Andy


References: 
 >choosing a specific file on desktop (From: ? ý ? <email@hidden>)

  • Prev by Date: Re: automating e-mail replies
  • Next by Date: Re: file kind
  • Previous by thread: choosing a specific file on desktop
  • Next by thread: Applescript handler for URL helper application?
  • Index(es):
    • Date
    • Thread