02-11-2014, 12:31 AM
Is it possible to transform the selected text below (within the code tags) to an calculation
Without using the RunTextAsFunction2 command.
It's not about the specific calculation stated above, that's just an example.
it could be any legit arithmetic calculation with parentheses.
The selected text could be selected from everywhere (word, notepad, ...etc...)
The first part is easy, that is the following command: _s.getsel
But after that I cannot find a way to do it.
The only other way I found was using the windows commandline in combination with QM
Macro Macro10
But this only supports integers not floating point results.
If it is possible, it would be great if could use the solution also in compiled .exe format.
Without using the RunTextAsFunction2 command.
It's not about the specific calculation stated above, that's just an example.
it could be any legit arithmetic calculation with parentheses.
The selected text could be selected from everywhere (word, notepad, ...etc...)
The first part is easy, that is the following command: _s.getsel
But after that I cannot find a way to do it.
The only other way I found was using the windows commandline in combination with QM
Macro Macro10
str calculation="3/2"
if(RunConsole2(F"cmd /c @set /a c={calculation}" _s))
,out "failed"
,end
out F"_s: {_s}"
But this only supports integers not floating point results.
If it is possible, it would be great if could use the solution also in compiled .exe format.