Cannot return string from handler
Cannot return string from handler
- Subject: Cannot return string from handler
- From: Ruth Bygrave <email@hidden>
- Date: Fri, 5 May 2006 12:53:36 +0100
Shouldn't that be easy?
I have three or four scripts that I wanted to tidy up by making them
modular, as it says in the books should be done. For example, my
backup script has a bit that tells the Finder to see if any of my
flash disks exist before backing up.
on init
tell application "Finder"
if disk "Disgo" exists
set myTarget to "Disgo"
end if
return myTarget
end init
which is called from the main script as
set targetRoot to (my init)
What obvious thing am I missing? Applescript throws a 'Can't make
handler init into type string" error, but if you ask it to return a
string value isn't that what you get out of it?
Confused... R Bygrave
_______________________________________________
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