[FBSL] FARR's Calc tool updated! - DonationCoder.com
HOME | Blog | Software | Reviews and Features | Forum | Help | Donate
Click here to
donate and join now!
Welcome Guest. April 25, 2015, 06:18:57 PM

Please login or register.
Or did you miss your validation email?

Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.

 You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 Learn about the DonationCoder.com microdonation system (DonationCredits). Entire Forum This board This topic Members Help Desk Entire Site
 Forum Home Thread Marks Chat! Downloads Search Login Register
Pages: [1]   Go Down
 Reply  |  New Topic  |  Print
 Author Topic: [FBSL] FARR's Calc tool updated!  (Read 2420 times)
Gerome
Charter Honorary Member

Posts: 154

 « on: September 26, 2006, 04:25:32 AM »

Hello,

I've improved my FARR's calculator!

Here's the link : http://gedd123.free.fr/Fbsl/DC/FBSLCalc_16-09.zip

How to install Fbslcalc.fbs into FARR ?
-1- Copy FBSLCalc.exe into \FindAndRunRobot\Scripts\
-2- Open FARR and edit Option, select the 'calc'item,and replace its regex config with this one :
calc \$\$1 | Scripts/FBSLCalc.exe "\$\$1"
-3- Save

That'all folks!
Now you can play with the newest calc

Usage : FBSLCalc.exe expression

Examples :
basic sample :
Calc 2+2
It'll return '4'

graphical sample :
calc /code=FBSL_Control("Button", Me, "Hello", 1000, 10, 10, 75, 23, 0, 0):show(me):begin events:If CBMsg = WM_COMMAND And CBCTL =1000 then msgbox(0, "Button clicked!", "yoo", 0):end events
it'll afx a form with a button, then just click onto the button...

sample sample :
calc /code=ExecLine(FileLoad("./PMem.fbs"))

Enjoy!

Here is the source of the newest FARR's calc :
`Formatted for UNKNOWN with the GeSHI Syntax Highlighter [copy or print]#Option Explicit'#AppType Console If Not STANDALONE Then    Fbsl2Exe( Command(1) ): ExitProgram(0)End If '// -----------------------------------------------------------------'// GEG 26 September 2006'// FBSLCALC.EXE 2.5/56*PI'// FBSLCALC.EXE /code=msgbox(Null,"Hello","Test",MB_ICONINFORMATION)'// -----------------------------------------------------------------Static \$code, \$resulttext, \$result, \$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." & crlf & _                "If you encounter any problems, tell'em there : " & crlf & _                "http://www.fbsl.net/phpbb2/index.php", _                "Freestyle Basic Script Langage (FBSL) Calculator:", MB_OK +MB_ICONINFORMATION)    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)End If If Instr(cmd,"/code=") Then    cmd = Remove(Trim(cmd), "/code=")    code = "result = " & cmd & " : Return result"    resulttext = cmd & " = " & ExecLine(code)Else    cmd = Replace(Trim(cmd), ",", ".")    code = "result = " & cmd & " : Return result"    ExecLine(code)    result = Replace(result, ".", GetLocalSeparator())    resulttext = cmd & " = " & resultEnd If If StrLen(cmd) = 0 Then ExitProgram(-1) ClipboardSetText(result)'resulttext)MsgBox(NULL, resulttext, "Freestyle Basic Script Langage (FBSL) Calculator / Executor:", _       MB_OK+MB_ICONINFORMATION) Function GetLocalSeparator()    Dim \$Buffer * 4    ApiCall( "GetNumberFormat", "kernel32", 0, 0, "1.1", 0, @Buffer, Len(Buffer) )    Return Mid(Buffer,2,1)End Function`
 Logged

Yours,
(Â¯`Â·._.FBSL Help file]
(Â¯`Â·._.Â
jgpaiva
Global Moderator

Posts: 4,724

Artificial Idiocy

 « Reply #1 on: September 26, 2006, 09:19:39 AM »

And here's the regex i use: (notice that it only works for the calculator itself)

[copy or print]
(.*\+.*|.*\-.*|.*\*.*|.*\/.*)
this expression will match anything that includes a *, +, / or -, which means you are able to do maths only by typing it in farr instead of having to prepend "calc".

(i know, it's not a very good expression since it uses the . aka dot)
 Logged

Pages: [1]   Go Up
 Reply  |  New Topic  |  Print
Jump to:
 Forum Home Thread Marks Chat! Downloads Search Login Register

DonationCoder.com | About Us
 DonationCoder.com Forum | Powered by SMF
[ Page time: 0.036s | Server load: 0.1 ]

 Translate Arabic Bulgarian Catalan Chinese Croatian Czech Danish Dutch Filipino Finnish French German Greek Hebrew Hindi Indonesian Italian Japanese Korean Latvian Lithuanian Norwegian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swedish Ukrainian Vietnamese