Call a "run script" inside or outside a tell (?!)
Call a "run script" inside or outside a tell (?!)
- Subject: Call a "run script" inside or outside a tell (?!)
- From: Cornwall <email@hidden>
- Date: Thu, 15 Mar 2001 22:37:42 -0800
A droplet's script sets up FileMaker and Smile for action. It then
passes the list of dropped items via the "run script" command to a
script that reads something like the following example with these
handlers (pseudo code):
on run(passed list of items)
repeat with etc.
if file then processFile(this File)
if folder then processFolder(this folder)
end
end
end
on processFile(passed file ref)
open in Smile (necessary)
get file's text into a variable
pass the variable's contents to FileMaker
end
on processFolder(passed file ref)
walk the folder sending each file's file ref to
processFile(ref)
end
In my droplet, if I enclose the "run script" command inside the "tell
Smile" block, it runs *very fast. When outside the "tell Smile" block
it runs much, much slower than inside of it.
I don't understand why. It's exactly the same command either way, isn't it?
Cornwall
Who lost the record during a burglary a few years ago.
I saw her standing by the side of the road with a sign that said
simply "Please." -- I asked her where she was was going and she said
"Seattle, Mister" -- Hell, I was just going to the store for a pack
of cigarettes, but I'll take you to Seattle.
John Stewart