Jump to content

Function Interception?


Recommended Posts

Hi, in php there is a method_call function that is called every time a method is used so you can test things such as it's name or change it's behavior to add a global action to all of them in one swoop.

Is there something similar in autoit?

Link to comment
Share on other sites

If you are talking about functions, then no, make it yourself*. If you mean methods as in AutoItObject, I don't know, go ask them.

Edit: like in Manadars example

Edited by AdmiralAlkex
Link to comment
Share on other sites

Nope. You can not override functions at runtime either.

What you can do is something like this:

; Big long script

Hi()
Hi()
Hi()
Hi()
Hi()

Func Hi()
    ; Do something
EndFunc

Then change Hi() to:

Func Hi()
  ; Debug something
  Return HiEx()
EndFunc

Func HiEx()
   ; Do something
EndFunc

Edit:

If you mean methods as in AutoItObject, I don't know, go ask them.

No warrantees, but I think you can do this. Edited by Manadar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...