DonationCoder.com Forum

DonationCoder.com Software => Find And Run Robot => Mouser's Zone => FARR Plugins and Aliases => Topic started by: mouser on June 05, 2007, 10:53 AM

Title: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: mouser on June 05, 2007, 10:53 AM
Anyone who uses the calc alias in FARR may soon become quite happy.
The new FCalc plugin for FARR shows off some features of the new FARR plugin system:


[ You are not allowed to view attachments ]

To install, use the dcupdater, OR grab from here and unpack into your FARR Plugins directory: https://www.donationcoder.com/Software/Mouser/findrun/addons/FCalc/FCalc.zip
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on June 05, 2007, 11:31 AM
a cool one, mouser.. :Thmbsup: looks sturdier than the alias version.. where is the d/l link? :)
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 11:37 AM
download will be in next alpha update today.
Title: Re: New FARR Plugin: FCalc
Post by: steeladept on June 05, 2007, 12:14 PM
So, will this also do TVM calculations?  (Time Value of Money for those who don't know). 

I am starting the programming challenges (Java first, since I understand it best for now), and for the first assignment, I am extending the engine from the simple calculations required into a TVM calculator.  These are GREAT devices to help you figure out all kinds of things from your income from a savings account to the exact cost of a financed car to the expected return on investments.  When I finish it, Mouser, you will see the code that makes it happen (if you don't already have it) ...perhaps that will be easy enough to port over into the FCalc plugin as well?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 12:30 PM
it's quite easy for me to add new functions to the fcalc parser engine (it uses muParser, http://muparser.sourceforge.net).

The code for fcalc plugin will be released, so i or others could easily add new functions to the calculation engine.
Title: Re: New FARR Plugin: FCalc
Post by: steeladept on June 05, 2007, 01:04 PM
Very cool...
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 02:40 PM
it's now available in the latest farr topsecret hyper alpha.  email me ([email protected]) for download link if you don't already have it.  hope you like it!  ps. expect new far releases frequently this week as i try to get to public beta status.  and please email or post any reminders of bugs i haven't fixed yet, i really want to get everything working well enough this week to release.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 02:41 PM
fcalc tips:
you can edit your history and variables from the advanced options
you can clear history and variables with: fc `
you can use the last result calculated by using the "last value" variable: lv
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on June 05, 2007, 03:42 PM
Great plugin !
 :Thmbsup:

is there a tip to copy the last value to the clipboard ?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 04:17 PM
oh, great idea, i'll add an option in adv config dialog to do that when you hit enter.  good idea!
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 04:17 PM
ps im glad you like it -- it's really only fun to do this coding if it makes people happy  :Thmbsup:
Title: Re: New FARR Plugin: FCalc
Post by: cnewtonne on June 05, 2007, 08:34 PM
Mouser,

your coding ability amazes the hick out of me. You probably write c++ as spontaneously as we speak English if not better. I would pay a million dollar to have your knowledge transplanted in my brain.
You must've also inherited a million dollar to have you do all this work of managing the site and writing code voluntarily and on donation basis.
If you ever decide to write your diaries, please let me know. I will be the first one to read them.

Thanks for brightening our lives with your ingenuity
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 08:40 PM
You must've also inherited a million dollar to have you do all this work of managing the site and writing code voluntarily and on donation basis.

hahahahahhahahahahahaahah
that would be funnier if the truth weren't so sad.

if i inherited a million dollars, i would pay off my student loans and truly be able to spent all of my time developing free software. right now i'm just basically treading water.  i should write up a little description of what DC could do with a million dollar gift, when i think off all the good stuff we could do, compared with the daily press releases about companies buying each other for hundred of millions, you can understand why i get kind of cynical and grumpy.

i've just come to accept that i'm going to spend a huge chunk of my time coding this stuff no matter what, and the support from everyone on this site at least keeps me from drowning :)
Title: Re: New FARR Plugin: FCalc
Post by: Josh on June 05, 2007, 08:57 PM
You fail to realize, mouser is the collaboration of the entire linux community to write an AI bot that can run a website, code applications, chat on irc, and have a REAL LIFE meeting amongst website users where his robot self is represented, all coded in perl/cobol. Isnt it amazing?

housetier wont tell you this, but this is what really happens when you donate to an open source project or linux distro. The money is going to test the feasibility of donation based projects.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 05, 2007, 09:21 PM
 ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D ;D
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on June 07, 2007, 11:14 PM
mouser, a small request.. how about allowing +ve sign at the beginning of calculations? it's just a habit of mine after all those numbers grinding in excel.. :) currently it returns an error..

+65 = [ERR: Unexpected operator "+" found at position 0]
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 08, 2007, 07:11 AM
lanux, i'm not quite sure what you are asking me to do.
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on June 09, 2007, 03:51 AM
maybe a screenshot would be clearer.. the plus sign at the beginning of the expression is returning an error, it would be nice if it didn't.. ;)

[ You are not allowed to view attachments ]
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 09, 2007, 08:07 AM
ok done, it will be in next version.
i also added something which i hope wont confuse things, which is that if you just type
+X or -X or *X or /X
then it will actually behave as if you had typed
lv+X or lv-X or lv*X or lv/X

so that you can easily add a sum of numbers for example by just typing
100
+10
+5
+240
etc...
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on June 10, 2007, 04:55 AM
Mouser, your plugin is so great !

the last one released (with FARR 2.00.104) with the values copied to the clipboard is amazing
 :Thmbsup:
However, could there be an option to only copy the result to the clipboard when pressing SHIFT+ENTER (it would minimize clutter when using clipboard manager...)

Many thanks again, with the FC plugin i don't have to use any other calculator for my daily use...

Cheers, Nitrix
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on June 10, 2007, 05:02 AM
oups ! I forgot...

Is it possible to have an option so that the ` key would only clear FC display and not persistent values

I use persistent values for tax rates, and I'd like to clear the display without having to retype all my tax rates

When typing ` it would display
FCalc - 1.06.01 (June 09th, 2007) by mouser <[email protected]>

This plugin will let you calculate numerical expressions. Built with muParser (http://muparser.sourceforge.net/)

 fc expression -- calculate an expression
 fc ` -- clear history

Maybe with the list of persistent values and a little more space to add all the tips and tricks of FC !!
Title: Re: New FARR Plugin: FCalc
Post by: rbeeger on June 10, 2007, 12:37 PM
Hi Mouser,

Great plugin! Thanks.

Cheers,
  Robert
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 10, 2007, 01:03 PM
i'm really really happy to hear that you guys like it.
please keep the suggestions coming for it, i'm happy to add new stuff, and the source code for it will be released with the next plugin sdk, so people are welcome to improve it.

what i'd really like to see added is the ability to define your own functions easily.
Title: Re: New FARR Plugin: FCalc
Post by: masu on June 10, 2007, 01:20 PM
I appreciate the plugin  :Thmbsup:
But wouldn't it be easier to just call up the normal windows calculator and do the calculation stuff there?
Title: Re: New FARR Plugin: FCalc
Post by: rbeeger on June 10, 2007, 04:37 PM
I appreciate the plugin  :Thmbsup:
But wouldn't it be easier to just call up the normal windows calculator and do the calculation stuff there?
I prefer FCalc because it doesn't try to look like a real-world calculator. I like it's history view, it's ability to assign values to variables, that it is always there when I need it (you just need to open FARR) and that it is just simple and straight forward.

i'm really really happy to hear that you guys like it.
please keep the suggestions coming for it, i'm happy to add new stuff, and the source code for it will be released with the
Converter functions would be nice dec->bin dec->hex etc.

Cheers,
  Robert
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on June 11, 2007, 04:44 AM
But wouldn't it be easier to just call up the normal windows calculator and do the calculation stuff there?
one of the hallmarks of a great launchers is to be able to do in-line calculations.. ;) actually, see here (https://www.donationcoder.com/forum/index.php?topic=1195.0) for the request i made..
Title: Re: New FARR Plugin: FCalc
Post by: mackal on August 23, 2007, 10:54 AM
This is a cool plugin, but could seriously use a pair of functions, say deg() and rad(), for converting between degrees and radians.  The trig functions assume that the arguments are in radians, whereas most quick calculations with FARR are bound to involve degrees (unless you're a mathie or doing math homework  ;) ).  So then we could type in "fc sin(rad(90))", for example.  Or perhaps the trig functions could be adapted to take degrees instead...
Title: Re: New FARR Plugin: FCalc
Post by: jdmarch on October 03, 2007, 04:28 PM
Converter functions would be nice dec->bin dec->hex etc.

I second the emotion!
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on February 01, 2008, 05:43 AM
I have 3 usability suggestions for fcalc:

1 - Add 2 forms of "copy result to clipboard". Something like: when you press enter, it copies the result; when you press shift+enter, it copies the whole expression.

2 - Please please please remove the "scroll past history" on end/home press, it's soooo anoying. (or at least add it as an option :) )

3 - Add an option to change the text that gets on the editbox when you press enter. This is useful for those that don't use the default regular expression (mine is a regex that recognizes mathematical expressions, thus I'd like it to clear the input box on enter press).

While #1 and #3 would just be great to have, i think #2 is a critical fix, as this one annoys me almost every time i use fcalc :(
Title: Re: New FARR Plugin: FCalc
Post by: mouser on February 01, 2008, 06:18 AM
regarding #2, you are saying that home+end should go to front and end of the edit line is that right?

it's not just a farr issue, its for any plugin that uses the richtext/memo display mode to display a file or info, so any decision we make applies to all of them.  i could use ctrl+home and ctrl+end to go to begining and end of the memo though, and use home and end to go to begining and end of the search box if people prefer.
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on February 01, 2008, 06:24 AM
Yes, exactly mouser!

I really like your solution, and think it's the standard way to do it.

Maybe we should ger other's opinions on this, if this affects all plugins, but i think your solution is just perfect.
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on February 04, 2008, 03:16 PM
Ok.. I just tested with the google translate plugin (https://www.donationcoder.com/forum/index.php?topic=12124) and think you really really should make that end/home change :)
Title: Re: New FARR Plugin: FCalc
Post by: csludwig on March 24, 2008, 05:37 PM
I'm new to this tool, as well as this forum. Whenever I click on the fcalc link under add-ons I get a 404....can anyone tell me where teh page went?
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on March 24, 2008, 06:02 PM
Hi csludwig!
Possibly during the recent DC downtime something was left behind on the server migration, this isn't normal.

I'm sure mouser will fix it in no time.

PS: looks like all of mouser's addons are 404'ed ;)
Title: Re: New FARR Plugin: FCalc
Post by: d4ni on April 03, 2008, 02:04 PM
Is there a way to enter the number Pi? Since Sin and Cos are available it would make perfect sense to include Pi as well, right :)?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 03, 2008, 02:43 PM
you can set constants which will be remembered, so just set pi yourself :)
Title: Re: New FARR Plugin: FCalc
Post by: d4ni on April 03, 2008, 05:37 PM
Ah that's right. Still I think it wouldn't really hurt to just include it :) But you are right, I kinda forgot about this.
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on April 03, 2008, 08:01 PM
can i also make FCalc understand the percentage sign?

[ You are not allowed to view attachments ]
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 03, 2008, 08:07 PM
afraid not.
Title: Re: New FARR Plugin: FCalc
Post by: herojoker on April 04, 2008, 05:45 AM
I think % should be the mod operator for integers.
The percentage sign you mentioned is just a short version of *100.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 04, 2008, 06:02 AM
ps.
Fcalc is c++ (C++ Builder) and uses the open source muparser (http://muparser.sourceforge.net/) engine to do its math calculations.  Anyone feeling adventurous who wants to add some functions and features to muparser, send them to me and i'll rebuild fcalc with them.
Title: Re: New FARR Plugin: FCalc
Post by: d4ni on April 04, 2008, 07:40 AM
The modulo operation represented by % would definitely be nice. Unfortunately I don't have C++ knowledge :)
Title: Re: New FARR Plugin: FCalc
Post by: lanux128 on April 04, 2008, 07:43 AM
The percentage sign you mentioned is just a short version of *100.
actually percent means "per hundred" so the percentage sign is a short version of /100 or 0.01 :)

e.g. 56 x 14.5% => 56*(14.5/100)
Title: Re: New FARR Plugin: FCalc
Post by: herojoker on April 04, 2008, 08:02 AM
Ooops! Of course you're right lanux128.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 04, 2008, 08:24 AM
well in programming languages, % is most often used for the mod operator as herojoker suggested initially.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on April 05, 2008, 03:35 PM
I am using v2.00.145 and fc alias is not working?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 05, 2008, 03:36 PM
the plugins are not installed by default.. select "check for updates" from tray menu and go to the tab of new stuff you can install.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on April 05, 2008, 03:50 PM
got it thanks
Title: Re: New FARR Plugin: FCalc
Post by: csludwig on April 11, 2008, 10:15 AM
I'm still getting 503s - can't get the plug in (sent a request about 2 weeks ago)
Title: Re: New FARR Plugin: FCalc
Post by: mouser on April 11, 2008, 10:24 AM
If the DcUpdater tool doesnt work for you for whatever reason, or you prefer not to use it, direct download of fcalc plugin:
https://www.donationcoder.com/Software/Mouser/findrun/addons/FCalc/FCalc.zip

You can get direct download locations from DcUpdater by turning on View -> Show Advanced Controls option from the DcUpdater menu.
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on May 03, 2008, 10:43 AM
I know what's the problem with DCUpdater.
Probably it has the wrong link, just like the addons page has:
https://www.donationcoder.com/Software/Mouser/findrun/addons/downloads/FCalc.zip
Title: Re: New FARR Plugin: FCalc
Post by: mouser on May 12, 2008, 12:36 PM
Is it possible to have an option so that the ` key would only clear FC display and not persistent values

Added and will be in next release.

I've also added functions to list variable values, clear specific variables, and a few more things.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on May 12, 2008, 12:45 PM
I should say that i'm not very happy with using muparser as the mathematical expression parser.  It's very well suited for some things but it's not very flexible or end-user customizable.

It would be pretty easy to replace the parser with a different one -- if someone wants to recommend another free c++ math parsing library let me know.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on May 16, 2008, 02:29 PM
Mouser how easy would it be to make fc little easier to use? They way I am thinking is that we should not be needing any suffix to enter calculator. if someone starts typing 12 probably are going after some math. 12+24= should calculate the result without needing any alias in my opinion.

Or at least invoking the calc should be little more convenient. For example "`" can be a nice invoker rather than typing fc and space.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on May 16, 2008, 02:34 PM
you can do this already, and quite easily, using aliases and the dosearch special alias action.
you just need to make an alias that matches on mathematical expressions with the result "dosearch fc $$1"
i think actually joto did something like this already, maybe he will post.

ps.
i have already built a slightly improved version of FC with some new features -- it will be released when i release the new FARR version soon.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on May 16, 2008, 02:51 PM
thanks for the update Mouser. I am looking forward to use new version. Do you need beta tester :)
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on May 16, 2008, 03:44 PM
Do you need beta tester


i volunteer too  :D
Title: Re: New FARR Plugin: FCalc
Post by: hamradio on May 16, 2008, 08:55 PM
My :two: is...You can also setup a special hotkey to hit when you need a calculator and it starts with fc and a space ready for input with the hotkey system.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on May 16, 2008, 09:23 PM
Nice tip Hamradio, but to be honest I am out of shortcuts on my keyboard :) I prefer it if it is more streamlined and tied to only one hotkey. That is what I like about Farr, I can even use it as toolbar without using another shortcut.
Title: Re: New FARR Plugin: FCalc
Post by: searchingforsurf on May 21, 2008, 08:11 PM
hey mouser,

i already have something that responds to fc - a trace tool in visual studio

is there another command i can use to start fcalc?

thanks!
Title: Re: New FARR Plugin: FCalc
Post by: mouser on May 21, 2008, 08:58 PM
just go to the plugin options page, select fcalc and choose to override the regex expression for it.
Title: Re: New FARR Plugin: FCalc
Post by: kartal on May 22, 2008, 06:55 PM
Mouser, regex field is not editable?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 09, 2008, 10:38 AM
Updated to version 1.19.01:

You need to be using FARR 2.04.02 (https://www.donationcoder.com/forum/index.php?topic=10505.0) or later for this version.
Title: Re: New FARR Plugin: FCalc
Post by: herojoker on June 09, 2008, 11:03 AM
Typing sqrt(-1) opens an extra window showing the error message "sqrt: DOMAIN error"
Would be nice if this could be suppressed.
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on June 09, 2008, 11:33 AM
great version keeping variables is a very good idea

i have a small request for the next release
what if i already use the ` key for something else (hotkey when FARR is focused)
it would be great to be able to have an additionnal way to clear history (say clearh for instance)
Title: Re: New FARR Plugin: FCalc
Post by: czb on June 09, 2008, 11:14 PM
You need to be using FARR 2.04.02 (https://www.donationcoder.com/forum/index.php?topic=10505.0) or later for this version.
Should not there be a compatibility check in DC updater for those having stable release of FARR, so it will not be prompted and installed to them?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 09, 2008, 11:20 PM
it's a good point.. currently i don't have such a check in the updater, but its an extremely good idea to add it.
Title: Re: New FARR Plugin: FCalc
Post by: ottenm on June 12, 2008, 06:47 PM
Sorry for my inexperience.  I spent *days* tuning up FARR a few months ago when I first got it and I haven't touched it since, except for using it 10,000x/day every day.  And enjoying it every single time.

I got a dialog about an fcalc update, accepted it, and now my (alias? hotkey?  I'm not sure) does not work to launch fcalc, and neither does 'fcalc' when I type it into the FARR window.  I had it rigged up to use '=' somehow, but I'm not sure how I did it.  I could type "=3+4", and the dialog would show "= 3+4" (added space) along with the result(s) and the rest of the fcalc window.

Under the plug-in manager, it shows fcalc is up to date.  I also did the "Install from the web even though that version is identical to the one installed", and still nothing gets found when I type 'fcalc' or use =.

Again, sorry for the noviceness.  I gave it a good try, about 45 minutes now, but no luck.

Thanks for any help.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 12, 2008, 06:59 PM
ottenm, i apologize.

the problem is that a new release of FARR was put out but is not yet on the updater, and it changes the way it works with fcalc.  so your problem is you have a new fcalc but not a new farr.

you can get the new farr here: https://www.donationcoder.com/forum/index.php?topic=10505.0
Title: Re: New FARR Plugin: FCalc
Post by: ottenm on June 13, 2008, 05:46 AM
I ran the installer, but still no FCalc showing up.  My version says 2.00.145.

When I "Click To Examine And Configure Plugins", the "Plugin Manager" dialog opens but no plugins are listed (at the top?).  This is (was) the page where I "custom override"-ed "fc" so it would work with "=".  When I click "Find and Reload All Plugins", I get a message that all plugins  were unloaded.  When I click "Check For Plugin Updates", the DcUpdater dialog opens an lists five "Installed Packages", including FCalc 1.09.01, all are checked and all say "Up To Date".  I've tried installing them with the right-click "Install from the web even though the latest version is identical to the version that is already running".

Thanks for any help.  And apologies for the long explanation and inability to resolve this on my own.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on June 13, 2008, 06:03 AM
Install this version of FARR (no need to uninstall previous version, this will install on top of it):
https://www.donationcoder.com/Software/Mouser/findrun/downloads/alpha/FindAndRunRobotSetup.exe
Title: Re: New FARR Plugin: FCalc
Post by: ottenm on June 13, 2008, 10:06 AM
All is perfect again.  Thanks Mouser.
Title: Re: New FARR Plugin: FCalc
Post by: cansee on July 31, 2008, 12:21 AM
Hi all.
Sorry for my bad English - i'm from russia.

FCalc is great.  :up: But i have some troubles. Spent hour trying to find any help, manual, instructions how to use this plugin, but find nothing. Is any help available? In the "readme.txt" file only this text:
"INSTRUCTIONS FOR USE By default this plugin is set to trigger when you start your search with:  fc
You can type any keywords after the ff to filter and score your results,
 e.g.: fc 2+2"
and
"NOTES: None yet."
I can't find how to define variable, can't see list of supported functions like sin() and avg()...  :(
Help file - that would be a good idea for this good plugin. May be it already exists?
Thanks for any advice.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on July 31, 2008, 10:35 AM
hi cansee.

yes, fcalc needs more documentation.. i guess i originally expected it would just be a sample plugin and someone would come up with a better one.

to assign variables, just do:
a=5
cost=2322.23

etc.

then just use the variables whereever you want.

you can edit the variables from the plugin advanced configuration options.

as for functions available, they are from muparser:
http://muparser.sourceforge.net/mup_features.html#idDef2
Title: Re: New FARR Plugin: FCalc
Post by: nitrix-ud on July 31, 2008, 01:18 PM
and "lv" gives you the last value
Title: Re: New FARR Plugin: FCalc
Post by: mouser on July 31, 2008, 01:27 PM
you can also do simple sequential operations like this (each one on it's own line):

123
+34
+4
+343
100
-100


in other words if you just do OPERATION VALUE [ENTER]
it uses the last value as the left hand side.
Title: Re: New FARR Plugin: FCalc
Post by: cansee on August 01, 2008, 08:15 AM
Thank you very much  :)
Title: Re: New FARR Plugin: FCalc
Post by: wudile on August 05, 2008, 08:43 PM
can it support the conversion between hex and decimal value?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on August 05, 2008, 09:48 PM
can it support the conversion between hex and decimal value?
unfortunately not, BUT there are other plugins+aliases that use online services to do this, and i hope someone can make an improved calc that does.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on November 06, 2008, 12:18 AM
oiur own master javascript plugin writer czechboy has been working on a fscript/javascript based plugin that behaves much like fcalc BUT supports hex/bin conversions and user-customizable functions, which i think he will be unveiling soon..
Title: Re: New FARR Plugin: FCalc
Post by: daanvink on February 03, 2009, 03:22 PM
Hi all.
Sorry for my bad English - i'm from russia.

FCalc is great.  :up: But i have some troubles. Spent hour trying to find any help, manual, instructions how to use this plugin, but find nothing. Is any help available? In the "readme.txt" file only this text:
"INSTRUCTIONS FOR USE By default this plugin is set to trigger when you start your search with:  fc
You can type any keywords after the ff to filter and score your results,
 e.g.: fc 2+2"
and
"NOTES: None yet."
I can't find how to define variable, can't see list of supported functions like sin() and avg()...  :(
Help file - that would be a good idea for this good plugin. May be it already exists?
Thanks for any advice.

check this, the basis of the plugin: http://muparser.sourceforge.net/index.html
Title: Re: New FARR Plugin: FCalc
Post by: daanvink on February 03, 2009, 03:39 PM
For defining a variable just type
fc a=3
From then on when you type a, you get the value 3

Also I found some predefined constants like
fc _pi
fc _e

Good luck.
Title: Re: New FARR Plugin: FCalc
Post by: ayryq on March 13, 2009, 04:15 PM
I currently use the number pad keys to select results during normal FARR use... but this disables use of number pad keys to enter calculations in fcalc. Is there a way around this? Or must I uncheck "Numpad keys launch results..."

Thanks
Title: Re: New FARR Plugin: FCalc
Post by: jgpaiva on March 21, 2009, 11:24 AM
ayryq: do you have an old version of fcalc or farr? I have some idea about that having been fixed in a recent version..
Title: Re: New FARR Plugin: FCalc
Post by: ayryq on March 21, 2009, 12:02 PM
The most recent version of FARR (from the website) is 2.49.01. I have version 2.52.02. (from DC Updater)
I have version 1.10.01 of FCalc, which is the current version available for download.

I just double checked (in case an update recently fixed this) and am still experiencing the NumPad problem.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on March 21, 2009, 12:07 PM
I'll look into it.
note that czb's pack has a more sophisticated calculator for farr: https://www.donationcoder.com/forum/index.php?topic=17153.0
Title: Re: New FARR Plugin: FCalc
Post by: IainB on December 11, 2009, 11:25 PM
I just installed this. Thanks mouser!
Seems like a very nice calculator.
Title: Re: New FARR Plugin: FCalc
Post by: d4ni on December 13, 2009, 10:19 AM
@IainB

czb's JSCalc is actually much more advanced than FCalc and is recommended (even by Mouser himself) over FCalc. I'm not saying FCalc isn't good but JSCalc surely is better.

JSCalc is part of czb's CZB pack (https://www.donationcoder.com/forum/index.php?topic=17153.0), so download that to get JSCalc, among other plugins.
Title: Re: New FARR Plugin: FCalc
Post by: IainB on December 19, 2009, 07:55 AM
@d4ni: Thanks. I installed CZB pack a while back, had some probs and deinstalled it.
FCalc is just nice and simple, and it works OK.
Title: Re: New FARR Plugin: FCalc
Post by: rjbull on March 01, 2010, 04:57 PM
After long absence, I just installed FARR on a new computer.  What do I need to do to get FCalc working again, please?
Title: Re: New FARR Plugin: FCalc
Post by: mouser on March 01, 2010, 06:01 PM
To install, use the dcupdater, OR grab from here and unpack into your FARR Plugins directory: https://www.donationcoder.com/Software/Mouser/findrun/addons/FCalc/FCalc.zip

Note that for people who want to be able to write custom functions, CZB's jscalc is the way to go.
Title: Re: New FARR Plugin: FCalc
Post by: rjbull on March 02, 2010, 02:44 PM
To install, use the dcupdater, OR grab from here and unpack into your FARR Plugins directory: https://www.donationcoder.com/Software/Mouser/findrun/addons/FCalc/FCalc.zip

mouser, I tried DcUpdater, but it gave a 403.  Thanks for the link above - installed and working now   :)
Title: Re: New FARR Plugin: FCalc
Post by: ottenm on March 15, 2010, 07:24 AM
I want to use '='  to open fcalc so I entered this to "Regular Expression (custom override)":
^=(.*)$|^=$

It opens fcalc just fine, but when I hit enter fcalc disappears and the command line gets replaced with 'fc'.  So I tried using this regex instead:

^=(.*)$|^=$|^fc (.*)$|^fc$
... which keeps fcalc opened, but it stops functioning (or at least stops reacting to me entering more expressions).

Thanks for any suggests-
Title: Re: New FARR Plugin: FCalc
Post by: Paul Gardner on September 23, 2011, 07:49 AM
I'm getting an error message from this plugin when I use it.  I'll type "fc 2+2", then hit Enter, and receive the following error :

[ You are not allowed to view attachments ]

(In case the attachment didn't get put in correctly, the error message reads "Cannot create file "C:\Program Files(x86)\FindAndRunRobot\Plugins\FCalc\advoptions.cfg")

I'm running on an 64-bit Enterprise machine and have to enter my admin user and pwd to change the Program Files directories.  Can that file be moved to the Temp or AppData directory?  I check the options for the plug-in and didn't see any way to change the location.

Thanks!
Paul
Title: Re: New FARR Plugin: FCalc
Post by: mouser on September 23, 2011, 09:40 AM
Paul, I'm afraid this may be a real oversite in my code which normally is smart about where configuration files go.. it seems the plugin specific advoptions files are trying to write into the Program Files\Plugins directory.. when they shouldn't..

Let me try to put together a fix.

One temporary workaround for you would be to move the entire Find And Run Robot directory out of you Program Files\ directory and into your documents area, and edit the configdir.ini to uncomment the Portable=True line, thereby running FARR in portable mode which shouldn't suffer from this problem.



ottenm -- sorry i missed your original question. are you still searching for a solution?
Title: Re: New FARR Plugin: FCalc
Post by: daddydave on September 23, 2011, 10:39 AM
To fix some similar issue, I gave my username Full Control permissions to C:\Program Files (x86)\Find and Run Robot (allowing to trickle down to subfolders). I used to have to do that a lot with various programs in Vista, not so much in Windows 7--I've used both Home and Premium (probably because I figured out that most programs that need to write to Program Files are packaged in a ZIP file, so those I now put in C:\Tools instead.) And btw I also use the 64 bit version of the OS.
Title: Re: New FARR Plugin: FCalc
Post by: mouser on March 25, 2015, 05:34 AM
fcalc updated to v 1.12:

LATEST HELP:

 fc expression -- calculate an expression
 fc ` -- clear history
 fc VARNAME=VAL -- assign a var
 fc clear [VARNAME] -- clear variables
 fc list -- list defined variables
 use special var 'lv' to refer to last value or just start expression with +-*/^
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: Falcon_four on April 14, 2015, 08:39 AM
Hi Mouser,

When updating via DCupdater it seems to be successful except that the previous version of the dll is not replaced; the meta files are, so DCUpdater seems to think has updated but FARR clearly shows the previous version.  I've only just noticed, but it has happened on two of the PCs I've just checked, one Windows 8.1 x64 and one Server 2012 R2.

I also noticed I needed to close FARR to update the .dll which the updater did not seem to do.

Falcon_four

Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: mouser on April 14, 2015, 08:57 AM
Thanks for the report Falcon -- i need to look into this.. it's possible i never actually updated the version number of fcalc.
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: ghfhhghdfghghghsa on October 19, 2015, 04:27 PM
Anyone else having issues with FARR crashing on Windows 10 with FCalc installed? Still works fine on Win8. On Win10, intermittently I get "Access violation at address 63278250. Read of address 63278250.", most often when closing FARR. HOWEVER, this only appears to occur when the troubleshooting log is disabled, which is very frustrating as I don't want to leave the troubleshooting log enabled and also means when it crashes there is no log. Any ideas?
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: ayryq on October 19, 2015, 04:38 PM
I've not had any problems, but I just checked and troubleshooting log is enabled (is that the default?). I just turned it off on one computer to see if it crashes.
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: mouser on October 19, 2015, 04:50 PM
Not heard of this before but win10 is new territory... can you reproduce the problem reliably on a specific set of actions?
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: IainB on October 20, 2015, 02:12 AM
I have FARR with FCalc installed, under Win10 Pro, and experience no problems. Seems to work just fine.
I should add that FARR is installed NOT in a C:/Program Files... directory, but in a separate subdirectory C:/UTIL/.../FARR, and the FARR plugins are installed in a subdirectory to .../FARR/...
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: mouser on October 20, 2015, 08:21 AM
I have FARR with FCalc installed, under Win10 Pro, and experience no problems. Seems to work just fine.

this could be the key -- it may be that fcalc is trying to save its history/settings in a directory it's not supposed to on a normal install, and that win8 put up with it, but win10 isn't..
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: IainB on October 21, 2015, 03:55 AM
^^ Yes, that's why I thought I should mention it. After a bit of trial and error, trying to get around Win10's security policy seeming to have a fascistic dislike of anything that tries to edit files in a C:/Program Files sub-directory, I have found it's quickest to simply install my "non-standard" programs in some other directory.
For some time now I've found that installs outside of C:/Program Files tend to be more certainly under the user's control and more likely to be able to work without failure.
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: ghfhhghdfghghghsa on October 22, 2015, 04:35 AM
Exiting the application seems to be a good trigger, I'd say 95% of the time when right clicking the tray icon and selecting "Exit Find and Run Robot" I get the exception, but only when FCalc is installed and the troubleshooting log is disabled. The exception pops up 6 times - always the same addresses, then a popup saying "Abnormal program termination". It could actually be 100% of the time, but I'm not certain of that. I'm running portable off a USB stick. The very same stick works without issue on Windows 8, I switch between a few different systems, it's only the Windows 10 installs that are a problem. It does the same thing when run elevated.

It's probably not a big deal, the primary reason it annoys me is because I run off a USB stick. I exit FARR when I need to eject the stick (usually in a hurry), and it crashes almost every time. I disable the troubleshooting log because I sync the USB stick, and I like to keep the list of files that have to be synced every time to a minimum.
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: mouser on October 23, 2015, 01:56 PM
and the troubleshooting log is disabled.

that might be a good clue -- it sounds like maybe i just overlooked some code trying to write to the non-existent troubleshooting log.
ill see if i can figure out why that might be and fix it.
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: ghfhhghdfghghghsa on October 29, 2015, 11:36 PM
I did a bit more testing. It happens even if the file exists on the file system, but only when the option in FARR is disabled. It doesn't appear to actually log anything on exit, which is when the issue seems to occur. It has also started happening on my Windows 8.1 system, which makes me think something in my environment has changed, but nothing has really changed recently. Here is everything logged on my system while the log is enabled for a start then exit (which is all I need to do to reproduce the issue with the log disabled):

::: [ Starting Find and Run Robot v2.226.01 on Friday October 30, 2015 at 03:32:31 PM ] :::
*Loading plugin: FCalc\FCalc.dll
 Success.
::: [ Program ends on Friday October 30, 2015 at 03:32:54 PM ] :::
Title: Re: New FARR Plugin: FCalc
Post by: dasnolojy on June 24, 2016, 01:03 AM
I want to use '='  to open fcalc so I entered this to "Regular Expression (custom override)":
^=(.*)$|^=$

It opens fcalc just fine, but when I hit enter fcalc disappears and the command line gets replaced with 'fc'.  So I tried using this regex instead:

^=(.*)$|^=$|^fc (.*)$|^fc$
... which keeps fcalc opened, but it stops functioning (or at least stops reacting to me entering more expressions).

Thanks for any suggests-

Use ^(?:fc |=)(.*)$
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: tomos on July 12, 2017, 07:22 AM
Trying to calculate an angle in a right-angle triangle.

I know to get the angle I want, I need
tan-1

is this possible using Fcalc?
if not, can anyone recommend something?
(I tried a few online calculators but they dont allow pasting :-/ )

EDIT//
more in depth post about my problems :p in the Calculor thread:
https://www.donationcoder.com/forum/index.php?topic=43180.msg410719#msg410719
//EDIT
Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: ayryq on July 12, 2017, 08:52 AM
FCalc is built on muparser; see the built-in functions here:
http://beltoforion.de/article.php?a=muparser&hl=en&p=features

I guess you want atan()? This gives results in radians. You can get degrees with the built-in "_pi" constant like
fc atan(1)*180/_pi

Title: Re: FARR Plugin: FCalc v1.12 (Mar 25, 2015)
Post by: tomos on July 12, 2017, 09:04 AM
FCalc is built on muparser; see the built-in functions here:
http://beltoforion.de/article.php?a=muparser&hl=en&p=features

I guess you want atan()? This gives results in radians. You can get degrees with the built-in "_pi" constant like
fc atan(1)*180/_pi

thanks ayryq !

must save that list. I usc Fcalc regularly but mostly for simple arithmetic