- Fixed bug when assigning a variable to a ternary operation.
Eval - Evaluate Expressions in Strings Dynamically (Updated Dec, 28, 2020)
Update v1.1.7
Update: v1.1.7
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: Eval - Evaluate Expressions in Strings Dynamically (Updated 07/08/2016)
for reference, AHK_H can do Eval() stuff built-in:
ahkExec() is one function provided to allow it, i think there are a few others for doing it in separate threads
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%
-
- Posts: 77
- Joined: 18 Apr 2018, 08:49
Re: Eval - Evaluate Expressions in Strings Dynamically (Updated 07/08/2016)
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.
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 . I created this program using Autohotkey thats why I love Autohotkey and the community!
GitHub:
https://github.com/Aldrin-John-Olaer-Manalansan
GitHub:
https://github.com/Aldrin-John-Olaer-Manalansan
Update: v1.2.0
* Fixed bugs in math operations with subtraction.
* Fixed bug with negative signs before parenthesis.
* Fixed bug in assignments.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.1
* Fixed subtraction problem.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.2
Another attempt to fix the problems with negative numbers in math operations. This time instead of trying to fix the compiled expression I've removed one line of the compiler that was causing the issue, so if anyone finds another problem because of this change, please let me know because I have no idea what that line was supposed to do...
- Fixing bugs with subtraction.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.3
- Fixed math operations as strings being evaluated (removed temporary fix from v1.2.0).
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.4
- Fixed bug when assigning {} object.
- Fixed bug with key-pair objects.
- Fixed problem with quoted strings inside objects.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.5
- Fixed bug with multiple compare operators.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.6
- Fixes issue with strings concatenation.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.7
- Fixed problems with quotes in strings.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Update: v1.2.8
- Fixed bug with named operators.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Re: Eval - Evaluate Expressions in Strings Dynamically (Updated Dec, 28, 2020)
Rodolfo - great work. I just discovered this via Jack's AutoHotkey Blog. This will save me heaps of time. I'm not sure how to get it to work with percentages though.
Re: Eval - Evaluate Expressions in Strings Dynamically (Updated Dec, 28, 2020)
Thanks. What do you mean by get it to work with percentages? It should be able to deal with any math expression as if it was in ahk script. If you've found an inconsistency you can report the issue at github.
Rodolfo U. Batista
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)
Pulover's Macro Creator - Automation Tool (Recorder & Script Writer)