• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to simulate C's function pointer in AppleScript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to simulate C's function pointer in AppleScript? (From: AndrĂ© Berg <email@hidden>)
 >Re: How to simulate C's function pointer in AppleScript? (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: How to simulate C's function pointer in AppleScript?
  • Next by Date: Re: How to simulate C's function pointer in AppleScript?
  • Previous by thread: Re: How to simulate C's function pointer in AppleScript?
  • Next by thread: Re: How to simulate C's function pointer in AppleScript?
  • Index(es):
    • Date
    • Thread