On Oct 21, 2010, at 9:28 AM, Robert Poland wrote:
Thanks Brian,
But the question was directed to Smile not Script Editor.
On Oct 21, 2010, at 7:21 AM, Brian Christmas wrote:
G'day Robert
Works fine for me, using 10.6.4 and the 'run' button in script editor
Regards
Santa
global a
set a to (short date string of (current date))
my thisTime()
on thisTime()
display dialog a
end thisTime
Bob,
It works as expected in Smile.
It will not work in Smile's terminal because of the way Smile's terminal is set.
Each line can be run independently.
If you run the script you posted in Smile's terminal the way you posted it, you will get an error, "thisTime() blah blah"
This because thisTime() is called before being defined.
So if you run
on thisTime()
display dialog a
end thisTime
before the script, then it kinds of get dissociated from the script and it will not know that a and a are the same a.... :)
You can run in Script mode however.
Deivy Petrescu
email@hidden