Eval - Evaluate Expressions in Strings Dynamically (Updated 07/08/2016)

Post your working scripts, libraries and tools
User avatar
Posts: 366
Joined: 29 Sep 2013, 19:51
Location: Brazil

Update v1.1.7

07 Aug 2016, 11:51

Update: v1.1.7
  • Fixed bug when assigning a variable to a ternary operation.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Posts: 3084
Joined: 09 Oct 2013, 10:31

Re: Eval - Evaluate Expressions in Strings Dynamically (Updated 07/08/2016)

31 Oct 2016, 01:38

for reference, AHK_H can do Eval() stuff built-in:

Code: Select all

var := 99
MsgBox var=%var%

mycode := "var2 := var+2`nMsgBox, var2 from within ahkExec = `%var2`%"
MsgBox, mycode to dynamically execute:`n`n%mycode%


MsgBox, var2 from main script = %var2%
ahkExec() is one function provided to allow it, i think there are a few others for doing it in separate threads

Posts: 61
Joined: 18 Apr 2018, 08:49
Facebook: drin.john.9
Google: 100212483980757173400

Re: Eval - Evaluate Expressions in Strings Dynamically (Updated 07/08/2016)

24 Aug 2019, 10:31

This Eval Function is great! but apparently I found some bug where some results are wrong

using the "expression tester.ahk". I tried evaluating:

the result generated was:

the answer should be:

It will be a good news if there is a solution for this probem.
Developer of AJOM's DOTA2 MOD Master, Easiest way to MOD your DOTA2 without the use of internet :lol: . I created this program using Autohotkey thats why I love Autohotkey and the community!


Return to “Scripts and Functions”

Who is online

Users browsing this forum: hotkeyguy and 32 guests