Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 09, 2016, 05:43:20 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Farr's 'Calc' program completely revisited!  (Read 5952 times)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Farr's 'Calc' program completely revisited!
« on: March 07, 2006, 05:17:06 PM »
Hello!

Mouser can now execute this Fbsl script that is a complete replacement of his 'Calc' tool integrated into his nice Farr program!

With this version you can now use Farr like this :

Calc 1+1
and then it'll give '2' as result : ok classical and same like before...

But, one can also type this :
Calc apicall( "MessageBox", "user32", null, "Fbsl & Farr powah!", "Mouser!", MB_OK )

And then the complete expression will be executed and a messagebox will tell you "Fbsl & Farr powah!"
That is to say that this single executable allows you not only to execute common maths tasks, but you can also execute the whole things that Fbsl allows you to do aka : API, COM, REGEX, MATHS and more than 300 inner functions + your own ones at runtime via Farr!

$AppType GUI
' // GEG 07 March 2006
if standalone = false then
fbsl2exe(command(1))
ExitProgram(0)
end if
Dim $cmd = Remove(command(-1), APPEXEPATH & APPEXENAME)
if cmd = "" Then
Msgbox(Null, "You need to specify an expression to evaluate, like 2+2.", "Freestyle Basic Script Langage (FBSL) Calculator:", MB_OK)
ExitProgram(1)
End If
Dim $code = "Dim $result = " & cmd & " : Return result"'
Dim $resulttext = cmd & " = " & Execline(code)
ClipBoardSetText( $resulttext)
Msgbox(Null, $resulttext, "Freestyle Basic Script Langage (FBSL) Calculator / Executor:", MB_OK)

Complete compiled program is located there :
http://gedd123.free.fr/Fbsl/FBSLCalc.zip

And then replace your actual FBSLCalc.exe located into \Program Files\FindAndRunRobot\Scripts
with this brand new one!


Enjoy!
Feedback appreciated ;)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: March 07, 2006, 05:25:12 PM by Gerome »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,421
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #1 on: March 07, 2006, 08:46:11 PM »
nice! when you combine this with the regular expression support in farr it should let you do some powerful stuff!

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #2 on: March 08, 2006, 12:34:00 PM »
Hi,

nice! when you combine this with the regular expression support in farr it should let you do some powerful stuff!

In fact one can imagine this :
imagine some datas containing code into the Clipboard...
If you type this with my revisited code :
Calc ClipboardGetText()
then the content will be read and executed directly :)
we can imagine tons of nice code like that... the limitations are just given by your ideas... :)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #3 on: March 12, 2006, 03:15:14 PM »
Hi,

Get this one and compile it as 'FBSLCalc.exe' and replace the actual 'FBSLCalc.exe' from the
D:\Program Files\FindAndRunRobot\Scripts\
directory, and enjoy the newest interpreter !

Example :
Calc msgbox( 0, "hello", "title", MB_OK )
Calc "2+2*5"

With OR without "", it'll work same way ;)

'$AppType GUI
' // GEG 12 March 2006
If STANDALONE = FALSE Then
    Fbsl2Exe(Command(1))
    ExitProgram(0)
End If
Dim $cmd = Command(-1), ch34 = Chr(34), ch92 = Chr(92)
If cmd = "" Then
    MsgBox(NULL, "You need to specify an expression to evaluate, like 2+2.", "Freestyle Basic Script Langage (FBSL) Calculator:", MB_OK)
    ExitProgram(1)
End If

cmd = Replace(cmd, ch34 & ch34, "")
If Left(cmd, 1) = ch34 AndAlso Right(cmd, 1) = ch34 Then cmd = Mid(cmd, 2, StrLen(cmd) - 2)
Dim $code = "Dim $result = " & cmd & " : Return result"
cmd = Trim(cmd)
If StrLen(cmd) = 0 Then ExitProgram(-1)

Dim $resulttext = cmd & " = " & ExecLine(code)
ClipboardSetText($resulttext)
MsgBox(NULL, $resulttext, "Freestyle Basic Script Langage (FBSL) Calculator / Executor:", MB_OK)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: March 12, 2006, 03:38:11 PM by Gerome »

jgpaiva

  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • View Profile
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #4 on: March 12, 2006, 03:50:10 PM »
This is the best completion for farr.
As I use farr all the time, and need to make fast calculations, there is nothing better than having "calc.exe" in farr!

Thanks Gerome!  :Thmbsup: :Thmbsup:

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #5 on: March 13, 2006, 04:26:53 AM »
Hi,

Hehe, thanks for your kind words :)
But, you just have to thank Fbsl in fact, it'll easily realize your ideas, just have to type them since all is possible in Fbsl ;)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #6 on: March 13, 2006, 05:27:01 PM »
Hello,

I've found another NICER way to provide toolz for FARR!!!
My goal was simple and it works nicely!
Jgpaiva helped me for configuraing FARR, but the whole thing works...

So... what about not distributing compiled tools ?
The reply is YES, it is possible!
Just provide FBSL.exe into the FARR's script directory, and YOUR script tools and the whole is done at 99.9% !!!

The only thing left resides into this Zipped file that is a complete replacement of FbslCalc.exe!!
Just get it now and follow the mini help text file and then tell me if it workd correctly :)
I'm sure you'll enjoy it ;)
Here's the link to get the beast : http://gedd123.free....C/FBSLCalc_13-03.zip
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: Farr's 'Calc' program completely revisited!
« Reply #7 on: April 12, 2006, 04:24:17 AM »
Hi mouser,

I hope you won't forget to include this newest version to the next FARR distro... :)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)