nomi-san / true-autoit-multi-threading

:rainbow: Yep, multi-threading in AutoIt.
MIT License
58 stars 8 forks source link

Update N.au3 #6

Closed feggaa closed 2 years ago

feggaa commented 2 years ago

Add Check callback function isFunc or String You Can now run Thread with a handle function

nomi-san commented 2 years ago

Thank you!

feggaa commented 2 years ago

Yes , The Call function accepts both function handle and name.

But I prefer passing the function handle because if you want to obfuscate the code you will have to change the function name every time , Of course if you pass the function name as String

Anyway, both methods work fine and I'm ready to help at any time

‫في الأربعاء، 20 يوليو 2022 في 9:07 م تمت كتابة ما يلي بواسطة ‪Nomi‬‏ <‪ @.***‬‏>:‬

@.**** commented on this pull request.

In N.au3 https://github.com/nomi-san/true-autoit-multi-threading/pull/6#discussion_r925853639 :

else

; Retrieve function name and local. local $s = DllStructCreate('char[64];') local $l = DllCallAddress('idispatch', $__nPfn_PrepSub, 'ptr', DllStructGetPtr($s, 1))[0] local $fn = DllStructGetData($s, 1)

  • Call($fn, $l)
  • Call(IsFunc($fn) ? FuncName($fn) : $fn, $l)

The Call function accepts both function handle and name. But in this case, it always gets a string from $fn.

— Reply to this email directly, view it on GitHub https://github.com/nomi-san/true-autoit-multi-threading/pull/6#pullrequestreview-1045392239, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXHBFFTATJOP2V4LJTHIDDVVAW3VANCNFSM54DKT77Q . You are receiving this because you authored the thread.Message ID: @.***>