Re: Just returning Filename... not whole path
Re: Just returning Filename... not whole path
- Subject: Re: Just returning Filename... not whole path
- From: Brett Conlon/HU/AU/SonyDADC <email@hidden>
- Date: Mon, 24 Oct 2005 13:06:47 +1000
Hi Michelle,
I placed your code into a new script
window and it does work, many thanks!
I also have this code that works:
on
open (filelist)
tell
application "Finder"
repeat
with
aFile in
filelist
set
fileName to
name of
aFile
display
dialog "Enter Title of file: " & fileName buttons "OK"
default button 1 default answer ""
end
repeat
end
tell
end
open
BUT, whenever I try to to merge either
your code or the code above into my "on
AskTitle(aFile)" handler (desired
because there are a number of conditions in there and I didn't want to
have it repeated twice in the script (in both on run and on open)) it has
failed with the "alias" error.
Is it not possible to do what I'm looking
for inside a handler?
Sorry to be a pain about this.....
Coj
Michelle Steiner <email@hidden>
On Oct 23, 2005, at 6:27 PM, Brett Conlon/HU/AU/SonyDADC
wrote:
What I'm trying to do is have the file name,
of the file/s dropped onto
the droplet, appear in the display dialog
window. When a user drops
multiple files onto the droplet and it asks
them to enter the DVD title,
if it doesn't mention the name of the file
it's working on then the user
could enter the wrong title for the wrong
file.
This works:
on
open
(theFiles)
tell
application
"Finder"
repeat
with
i
from
1
to
length
of
theFiles
display dialog
"Whatever prompt
goes here." default
answer (name
of
(item
i
of
theFiles))
as
text
end
repeat
end
tell
end
open
--
Discordians don't pray: it is far too dangerous.
_______________________________________________
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