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 10:15:33 +1000
Any takers? <8-}
The code so far (or the bits you need
to see):
on
open (filelist)
if
GetResources() is
true then
CreateNewFolder()
GetResources()
repeat
with
aFile in
filelist
with
timeout
of
(5 * minutes) seconds
set
replacement_title to
AskTitle(aFile)
set
replacement_catNo to
AskCatNo()
DoAllThis(aFile)
ReplaceTitle(replacement_title)
ReplaceCatNo(replacement_catNo)
end
timeout
end
repeat
end
if
InClosing()
end
open
--ASK
TITLE
on
AskTitle(aFile)
tell
application "Finder" to
activate
repeat
set
d to
display dialog "Please enter the Title name (less than 13 chrs) for
the file " & (name of
aFile) & ":" default answer ""
set
answer to
text returned of
d
if
the
answer contains
":" then
beep
display dialog "A file or folder name cannot contain
a colon (:). Please try again..." buttons {"OK"} default
button 1
else
if
the
answer contains
"/" then
beep
display dialog "A file or folder name cannot contain
a forward slash (/). Please try again..." buttons {"OK"}
default button 1
else
return
answer
exit
repeat
end
if
end
repeat
end
AskTitle
THE ERROR:
Can't get name of alias "...PATH TO FILE.PDF"
Coj
Brett Conlon/HU/AU/SonyDADC <email@hidden>
Hi Eric,
I don't know if it's the same for everyone but with this list, when you
respond, it only goes back to the sender, unless you manually include the
list address. I just responded to your email but it only went back to you.
So, I'm sending this to the list this time.
OK, after sending my last email I realised that I had set the fileName
value but not used it in the dialog. So I tried changing aFile to fileName
in the display dialogue line but it returned the following error:
Can't get name of alias "PATH TO FILE.PDF"
It does the same thing when I change it to (name of aFile).
I even tried changing aFile to (class of aFile) and it showed alias in
the
dialogue.
I'm sure this means everything to those who know what they are doing but
for me... I don't know how to fix this.
Many thanks,
Cojcolds
_______________________________________________
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