Re: How to simulate C's function pointer in AppleScript?
Re: How to simulate C's function pointer in AppleScript?
- Subject: Re: How to simulate C's function pointer in AppleScript?
- From: André Berg <email@hidden>
- Date: Thu, 23 Oct 2008 15:08:48 +0200
Sorry I posted an unfinished version from the wrong Script Debugger
window..
Here's the real draft...
script scriptToTime
-- setup arguments for the function to time
on handlerToTime(param1, param2)
display dialog param1 & " " & param2
& "?"
end handlerToTime
my handlerToTime("spam", "eggs")
end script
script Timer
property statement
: missing value
on timeit()
-- start timer
run script statement
-- end timer
end timeit
end script
-- time an AppleScript statement
set Timer's
statement to
"tell app \"Finder\"
display dialog (count folders)
end"
Timer's timeit()
-- or time a handler inside a script object
set Timer's
statement to
scriptToTime
Timer's timeit()
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden