Eval
Evaluate

Script key: Evaluate

Posted by agiletortoise

Install

Details

Label Eval
Voice Over Evaluate
Script
// try to evaluate the text on the current line and display result
// can be used to do basic math
// i.e. a line "2 * 2" would display "4"

var lnRange = getSelectedLineRange();
var ln = getTextInRange(lnRange[0],lnRange[1]);
var result = eval(ln);

alert(result);

Advanced

Keyboard shortcut None
Hide key Yes

Discussion

comments powered by Disqus