Jump to content

Dynamically loading function content


Recommended Posts

You don't know what you are talking about, and since you have nothing to offer in terms of advice you go flooding in peoples topics trying to make people feel bad about what they are trying to do.

I actually have to agree a little with that part, though he does know what he's doing...

It's great that you got it working though, but perhaps we should all calm down a little? :)

Edited by FreeFry
Link to comment
Share on other sites

  • Moderators

You don't know what you are talking about, and since you have nothing to offer in terms of advice you go flooding in peoples topics trying to make people feel bad about what they are trying to do. That should explain clearly why you have so many freaking posts. How many times did you post in this topic with nothing useful to say?

And just to make you feel more stupid, here is my function executing a dynamically loaded conditional statement:

;testingDynFuncs
#Include <File.au3>
#Include <Array.au3>
Global $DynamicFuncs
Global $FuncString
If Not _FileReadToArray(@ScriptDir & "\testing2.au3", $DynamicFuncs) Then
   MsgBox(4096,"Error", " Error reading the formula ==>>  error:" & @error)
   Exit
EndIf
_ArrayDisplay($DynamicFuncs)

MsgBox(0, "",_CatchAReturn("31"))
Func _CatchAReturn($number)
    For $i = 1 To $DynamicFuncs[0]
        $var = StringRegExp($DynamicFuncs[$i], '(?i)If(.*)Then', 3)
        $var1 = StringRegExp($DynamicFuncs[$i], '(?i)Return(.*)', 3)
        MsgBox(0, "",$var[0]&' - '&$var1[0])
        If Execute($var[0]) Then Return Execute($var1[0])
    Next
EndFunc  ;<===_CatchAReturnoÝ÷ Ú׬¶)àÙ«·r^!ý7ê{¦mêúÓ}éÑzÛ«Múéz¿¹!ý7ê{¦mêúÛ}éÑzÛ«Múéz¾r^NnÞ~éܶ*'­ën®{'ºfÞ¯n¬¡æ­nÏêº^"ØbL¨ºh¬ºw^®ËZÙ²y¨®w¬²Ú!zZh¶«³­Ø^·(v)àË.zÅ'~íºv­z­è«iËnjW(uë)y©,rW­êæ¢Ëh~Ø^¶)¶§Â­¶²j·rÛ²H§.Â¥uÚzÛ^®Ú+zÇ­Èl¹ÈZ²Ë¦¦Ø¨Ê'*h²×(º{[yú+zf¤x,¹È_¢b²rë¶*'°j¶¬Ê«r^{ºØ§Ü§jhjYry×(Ø­¢v¥²Ö­zg§¶È­ßÛ'¢Ø­ßÛÅç.¶)àjw±¦·¬²*'jÂ,µ«^u·¢·¢µÊ.Ú''h­é¨½çZºÚ"µÍÛØ[  ÌÍØQ[[ÈH    ][ÝÒY ÌÍÛ[H    ÈÌ[]  ÌÍÛ[H
È
I][ÝÈ [ÈÔ   [ÈÂI][ÝÒY   ÌÍÛ[H    ÝÈÌ[]    ÌÍÛ[HH
I][ÝÂÌÍØQ[[ÈHÝ[ÔÜ]
Ý[ÔÝÔ   ÌÍØQ[[ÊKBÛØ[  ÌÍÛ]HÐØ]ÚT]   ][ÝÌÌI][ÝÊBÙÐÞ
    ][ÝÚ[É][ÝË ÌÍÛ]B[ÈÐØ]ÚT]    ÌÍÛ[JBSØØ[ ÌÍØPÛÛ][Û ÌÍØT]QÜ ÌÍÚPÐÈHHÈPÝ[
    ÌÍØQ[[ÊHHBBIÌÍØPÛÛ][ÛHÝ[ÔYÑ^
    ÌÍØQ[[ÖÉÌÍÚPÐ×K   ][ÝÊÜÊJÚJZYÌLÜÊÏÊIÌLÜÊ[][ÝËJNÔÚÝ[ÛHHÛHÛÛ][Û[BBIÌÍØT][ÔYÑ^
    ÌÍØQ[[ÖÉÌÍÚPÐ×K   ][ÝÊÜÊJÚJZYÌLÜÊÏÉÌLÜÊ[ÌLÜÊ]ÌLÜÊÏÊIÌLÜÊÌÍÉ][ÝËJNÔÚÝ[ÛHHÛH][BBRYÐ^J    ÌÍØPÛÛ][ÛHHÜÐ^J ÌÍØT]HH[ÛÛ[YSÛÜBRY^]J ÌÍØPÛÛ][ÛÌJH[]^]J ÌÍØT]ÌJBS^[[
Your RegExp may work for you... but this is less error prone with actual error checking... (a simple working example).
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Perhaps I am getting too heated in the moment, Sorry SmOke_N, you do have to understand what people are trying to do in order to help them.

Anyways, for anyone who is still fuzzy about what this code is, it's simply "Addons" or "Plugins" for Autoit.

I can have a compiled script execute an entire function that is stored in an external non compiled text file, and this function can change variables that are part of the compiled script. Essentially giving me the ability to have user defined functions without reveling the source for the main app.

Of course I have to know what the basic structure of those user defined functions is going to be in order to pre-program the script to execute them right, but the sky is the limit after that. I'm gonna try to come up with an example that executes an external loop.

Edited by Oldschool
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...