Jump to content

_AdlibEnhance.au3 (UDF) - Call functions with parameters, pause and resume!


Recommended Posts

19 hours ago, Acanis said:

I hope to find some help or a "newer" UDF :)

; may be ugly but if you can use it ...
Func MyAdlibFunc($var1 = "", $var2 = "")
    Local Static $_var1 = ""
    If Eval("var1") <> "" Then $_var1 = Eval("var1")
    Local Static $_var2 = ""
    If Eval("var2") <> "" Then $_var2 = Eval("var2")
    If Eval("var1") or Eval("var2") Then Return

    ConsoleWrite('+ Func MyAdlibFunc("' & Eval("var1") & '", "' & Eval("var2") & '") = $_var1 = ' & $_var1 & ' - $_var2 = ' & $_var2 & @CRLF)

AdlibRegister("MyAdlibFunc", 2000)

While 1
    MyAdlibFunc(@MIN, @SEC)


Link to comment
Share on other sites

  • 3 weeks later...

Thank you, but that wont work for me :)

I need it like a queue, but with the Adlib force (dont wait for other stuff, besides other Adlib-started things ^^). I have one function, that is processing the main work for me and it has three different "triggers" (one param, that can come in 3 different expressions, lets say "1, 2 and 3):

If its "1", the data from source "1" gets used, "2" triggers the usage of the data from "2" and "3" calling the function to use a third data source. If the function for example processed the data from source "1" by calling the "$iParam" with "1", it calculates the next Adlib-Time overwrite the time for the next time, the function has to use the "1". 

I didnt find other solutions for a "queue" like that.

Currently I'm thinking about using the "Execute()" function and continue using the "Adlib Helper Functions", but then create them dynamically.

This should be the best way to tell a function to run in x seconds with the parameter y, right?



Oh, and I fund "_Timer_SetTimer()"... That looks promising, too... Thats the function this UDF is based on, ahhhh... I will take a deeper look into this :D 



Not that simple... Would be nice to find the UDF, to re-use it. Link is dead.

Edited by Acanis
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

  • Create New...