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

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

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)
guest3456
Posts: 2553
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%

ahkExec(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

aldrinjohnom
Posts: 21
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

eg.
using the "expression tester.ahk". I tried evaluating:
-(2.6167)-193

the result generated was:
195.616700

the answer should be:
-195.616700

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!

GitHub:
https://github.com/Aldrin-John-Olaer-Manalansan

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Sanbenito and 32 guests