Re: a handler runs after compile, but never again
Re: a handler runs after compile, but never again
- Subject: Re: a handler runs after compile, but never again
- From: Michelle Steiner <email@hidden>
- Date: Sun, 30 Nov 2003 09:08:25 -0700
On Nov 30, 2003, at 8:40 AM, Matyas Ferenc Farkas wrote:
there is the troublemaker:
The problem is that you named a variable within the handler the same as
the handler. I don't know why this is a problem, but by changing the
name of the variable, I was able to fix it.
I also simplified the script a bit while I was at it. Here's what I
wound up with:
--tell application "Finder"
set filepathstring to "Macintosh
HD:Users:spoun:Desktop:demofolder:mappa Ordner:mappa2:mappa3:"
log theContainer(filepathstring) of me
--end tell
on theContainer(filepath)
--tell application "Finder"
set AppleScript's text item delimiters to ":"
set aContainer to (filepath's text items 1 thru -3) as string
set AppleScript's text item delimiters to ""
set aContainer to aContainer & ":" as string
--end tell
return aContainer
end theContainer
Note that I commented out the tell wrappers; there is nothing in the
script or the handler that requires the Finder. There might be other
lines in your code that require the Finder, so I commented out rather
than delete.
--Michelle
--
You can not change the world without perforce changing yourself.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.