Re: choosing a specific file on desktop
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