Jump to content

AdLibEnable More then 1 ?


Recommended Posts

You could do something like this :

AdlibEnable("myAdlib",100)

Func myAdlib()
_func1()
_func2()
EndFunc

Func _func1()
;my function #1
EndFunc

Func _func2()
;my function #2
EndFunc

Is that's what you're thinking about ?

Good luck anyway !

Link to comment
Share on other sites

I think he wanted to have them with different times for each one, its a bit of a bodge, but heres one way of doing it. In this case, _func1 goes every 100ms, and _func2 every 500ms

$i = 1
AdlibEnable("myAdlib",100)

Func myAdlib()
_func1()
if $i = 5 then
    $i = 1
    _func2()
else
    $i = $i+1
endif
EndFunc

Func _func1()
;my function #1
EndFunc

Func _func2()
;my function #2
EndFunc
Link to comment
Share on other sites

I think he wanted to have them with different times for each one, its a bit of a bodge, but heres one way of doing it. In this case, _func1 goes every 100ms, and _func2 every 500ms

$i = 1
AdlibEnable("myAdlib",100)

Func myAdlib()
_func1()
if $i = 5 then
    $i = 1
    _func2()
else
    $i = $i+1
endif
EndFunc

Func _func1()
;my function #1
EndFunc

Func _func2()
;my function #2
EndFunc

<{POST_SNAPBACK}>

I posted some days ago something that could be useful. May require some tweaking, though. :lmao:

http://www.autoitscript.com/forum/index.php?showtopic=7336

Happy coding!!!

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...