AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Evaluating arithmetic expressions in documents
Goto page Previous  1, 2
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Mon Feb 26, 2007 3:07 pm    Post subject: Reply with quote

The script here is very short, but slower and cannot be compiled-run without AHK installed on the target machine. The other script is complex, and only handles arithmetic expressions, but does not have the other limitations. I did not see much interest, anyway. I am using an even more complex variant (which handles hex, user defined operators, etc.), which is really handy to convert between hex and decimal, do logic and math, etc. If someone is interested, he has to read the documentation, unfortunately.
Back to top
View user's profile Send private message
Grumpy
Guest





PostPosted: Mon Feb 26, 2007 3:12 pm    Post subject: Reply with quote

majkinetor wrote:
why didn't you provide the above script using that function to evaluate expressions ?
The original message was written in October 2005...
Back to top
ribbet.1



Joined: 20 Feb 2007
Posts: 197
Location: D.C.

PostPosted: Mon Feb 26, 2007 7:42 pm    Post subject: Reply with quote

Grumpy wrote:
majkinetor wrote:
why didn't you provide the above script using that function to evaluate expressions ?
The original message was written in October 2005...


Majkinator is just mad because he couldn't use it to pick up chicks either. I thought you said chocolate, friend! Big chocolate!
Back to top
View user's profile Send private message
ribbet.1



Joined: 20 Feb 2007
Posts: 197
Location: D.C.

PostPosted: Mon Feb 26, 2007 7:54 pm    Post subject: Reply with quote

Laszlo wrote:
I did not see much interest, anyway.


Only there do I disagree with you. A freeware expression evaluator like this is a hot item! Or am I just a nerd?

Quote:
I am using an even more complex variant (which handles hex, user defined operators, etc.), which is really handy to convert between hex and decimal, do logic and math, etc.

I don't suppose you can show us this one!
Quote:
If someone is interested, he has to read the documentation, unfortunately.

Real men don't need documentation. Documentation is for those people, well, who can read!
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Mon Feb 26, 2007 10:27 pm    Post subject: Reply with quote

ribbet.1 wrote:
I don't suppose you can show us this [more advanced evaluator]
I will, but recently I started to enhance it further, and it is under construction now. The new features include base-2 constants and output, assignments and relational operators. They don't work perfectly, yet. Any wishes (besides impressing gals)?
Back to top
View user's profile Send private message
ribbet.1



Joined: 20 Feb 2007
Posts: 197
Location: D.C.

PostPosted: Mon Feb 26, 2007 10:50 pm    Post subject: Reply with quote

Laszlo wrote:
ribbet.1 wrote:
I don't suppose you can show us this [more advanced evaluator]
I will, but recently I started to enhance it further, and it is under construction now. The new features include base-2 constants and output, assignments and relational operators. They don't work perfectly, yet. Any wishes (besides impressing gals)?


BPM to HZ? No, really, ATM I only need something simple. Even the one that sends text to the Windows calculator would be adequate, and universal to Windows users. So I don't have any requests, but hope to do one myself still, using a snippet you have been so good as to provide.

But right now I'm simply building a lengthy script to fill in boilerplate for the transcript I'm going to be working on tomorrow. Else I might play with this now. Once I create some of my basic boilerplate scripts I should be able to play w/ AHK more.

BTW, I used to use Rik Blok's "Toolbar," a VB tool to do this stuff, in combination with Corel WP's extensive keyboard macro scripting capabilities. I think AHK is hopefully going to replace them both. Toolbar is already history, as Dragon Naturally Speaking interferes with it. Dragon doesn't appear to have a problem w/ AHK.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Feb 27, 2007 7:19 pm    Post subject: Reply with quote

Quote:
Majkinator is just mad because he couldn't use it to pick up chicks either.


No, I am mad because I expect more from proffesor Laszlo. Why should only he use advanced version with custom operators and hex. I want it to. I don't like unfinished things.

Proffesor, please ! Cool
_________________
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Tue Feb 27, 2007 7:30 pm    Post subject: Reply with quote

I need a few more days for testing the monster version. I will post it under a new thread. It is hard to say when something is finished. You can always add more functions. At some point further additions make the script worse (slower, larger, buggy, harder to maintain), so you could say a previous version was the "finished" variant. I asked, what people would use, because removing ballast is hard.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Tue Feb 27, 2007 9:03 pm    Post subject: Reply with quote

Can't you just have some, .... scientific mode ? More functions a little slower, but much more power Smile

Little gui with 2 buttons - N00bs Click Here | Serious Math Very Happy Cool
_________________
Back to top
View user's profile Send private message
Laszlo



Joined: 14 Feb 2005
Posts: 4710
Location: Boulder, CO

PostPosted: Wed Feb 28, 2007 12:13 am    Post subject: Reply with quote

OK. I posted the monster version here. It is complex and most likely buggy. I will fix it, as problems arise.
majkinetor wrote:
Can't you just have some, .... scientific mode ? More functions a little slower, but much more power Smile
I think this version is the easiest to use, except for elementary school pupils.
majkinetor wrote:
Little gui with 2 buttons - N00bs Click Here | Serious Math Very Happy Cool
I found GUI calculators harder to use, but the Windows Power Toy Calculator should be sufficient, if you prefer it that way.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 4511
Location: Belgrade

PostPosted: Wed Feb 28, 2007 8:09 am    Post subject: Reply with quote

thank you Very Happy
_________________
Back to top
View user's profile Send private message
PhiLho



Joined: 27 Dec 2005
Posts: 6836
Location: France (near Paris)

PostPosted: Wed Feb 28, 2007 10:35 am    Post subject: Reply with quote

Laszlo wrote:
OI found GUI calculators harder to use
Me too, it is stupid to click on buttons (except as shortcut to function names, at worse) while typing on the numeric keyboard is much faster...
My favorite calculator is currently ECW Expression Calculator, which let you type expressions and evaluate them in real time, showing the result in various bases (10, 16, 2...). Unfortunately, the original Web site is down, but the program can be found in various download sites.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group