topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Sunday February 28, 2021, 7:16 pm
  • Proudly celebrating 15+ 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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Gerome [ switch to compact view ]

Pages: prev1 [2] 3 4 5 6 7next
26
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 01:39 PM »
Hello,

Nicer :)
BTW, you can also compile it up to 1024 bytes using PellesC, and still in plain C :)

27
Developer's Corner / Re: [FBSL] LZO compressor
« on: October 01, 2006, 11:56 AM »
And i repeat : FBSL source code is NOT public.
And there are tons of softwares that uses part of GPL or alike sources where their sources are not publicly released and won't be released.
That's all!

28
Developer's Corner / Re: [FBSL] LZO compressor
« on: October 01, 2006, 11:33 AM »
So, you've got a special non-GPL license for LZO? :)

WTF ?
I don't see the problem here ?
I'm not obliged to publish sources of FBSL, nor the official mini LZO sources since i've NOT modified its source code.

29
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 11:29 AM »

Btw, if I'm not mistaken, CreateFile returns INVALID_HANDLE_VALUE on failure, which is -1 .. so your program returns your success value of 1 even if the file does not exist.

Right :)
So this is a fix :
if (lngHandle && lngHandle != INVALID_HANDLE_VALUE)

30
Developer's Corner / Re: [FBSL] LZO compressor
« on: October 01, 2006, 11:25 AM »
Hello,
I'd like a copy of the FBSL source code, please.

Sorry, FBSL source code is shared between the 3 FBSL developpers.
It won't be shared publicly.

31
Developer's Corner / [FBSL] LZO compressor
« on: October 01, 2006, 08:39 AM »
Hello,

Here is a simple demonstration of native LZO engine compression/decompression implemented into FBSL.
Enjoy!

Code: Text [Select]
  1. #Option Explicit
  2. #AppType Console
  3.  
  4. '// ****************************************************************************
  5. '// Simple demonstration of native LZO engine compression/decompression implemented into FBSL
  6. '// Author : Gerome GUILLEMIN
  7. '// Date : 1st of October 2006
  8. '// ****************************************************************************
  9. Dim buff, fp
  10.  
  11. Print "LZO compress..."
  12. buff = Compress(FileLoad(".\18 - Wedding idea.mp3"))
  13.  
  14. If buff <> "" Then
  15.         fp = FileOpen(".\compressed.lzo", BINARY_NEW)
  16.         If fp Then
  17.                 FilePut(fp, buff)
  18.                 FileClose(fp)
  19.         End If
  20. End If
  21. Clear buff
  22. fp = NULL
  23. Pause
  24.  
  25. Print "LZO decompress..."
  26. buff = Decompress(FileLoad(".\compressed.lzo"))
  27. If buff <> "" Then
  28.         fp = FileOpen(".\decompressed.mp3", BINARY_NEW)
  29.         If fp Then
  30.                 FilePut(fp, buff)
  31.                 FileClose(fp)
  32.         End If
  33. End If
  34. Clear buff
  35. fp = NULL
  36. Pause

32
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 07:56 AM »
Hello mouser
gerome please try to be more reasonable!  8)

actually Jibz' explanation was a great one I thought (regarding why anything but 0 is used to represent different error codes).

but regardless, this is just one of those cases where it's silly to go against the standard.  return codes can actually be used by other programs and i don't see a good reason not to follow convention.  just follow in the good hacker tradition and write a curse-filled paragraph in the readme about how you disagree with the standard, and then implement the standard :)

WTF 'standard' ?
And when APIs you're using just return 0 as ERROR, how do you consider standard as standard ?
There are several programming schools, several point of view, and mine is optimistic + API sided, where 0 means ERROR and 1 or TRUE means OK, that's all folks.

33
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 07:44 AM »
I don't sometimes care of what can say the standards...
-Gerome

If I misunderstood that somehow, please enlighten me :huh:.

Just open you eyes and your mind and all will be then clearer.

34
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 07:35 AM »
And you don't like following standards? :D

You definately NOT have read my previous posts, you're incredibly blind!

35
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 06:48 AM »
Hello,

I am just trying to help and explain, no reason to get angry :Thmbsup:.

Please i don't need help onto that part.
FYI, i'm a professional system C/C++, ASM, .NET, PLSQL developper, and i love APIs :)

36
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 06:00 AM »
Hello,

The problem with not following the generally accepted standards and conventions is that your program will behave unexpectedly.

At first, it seems you did NOT read explanations i gave into my previous post.

If somebody uses your program in a script or makefile they will automatically assume that the return value will be zero on success, so they will be scratching their heads for a while wondering why your program keeps failing until they look at the source and see it.

Secondly I gave souces also, and if you don't agree with that, feel free to make your own executable.
At last, there is no way my code lead into crash or alike, the only two return code are 1 in case of success and 0 in case of failure (generally encountered into API calls)
So WTF ?

37
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: September 30, 2006, 10:04 AM »
Hi,

...
The C standard defines two macros, EXIT_SUCCESS and EXIT_FAILURE, which can be used as appropriate return values to the operating system. They are respectively 0 and 1.

I don't sometimes care of what can say the standards...
Why ?
It's simply psychologic and it has a real explanation :
The common 'human' sense would recognize that a 'TRUE' value seems positive, and 'FALSE' the opposite.
So what ?
I've told to my program to execute this_task and it replied to me that there were NO errors singnaled, so the return is TRUE, else in case of failure it would return 0...
And this common human readable/understandable sense can be also found onto 80% of the APIs here and there, where 0 indicates a failure or a NULL return ( example : Findwindow, SleepEx, ... )

38
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: September 29, 2006, 06:57 PM »
Hello,

You really should return '0' since that's the standard returncode for success...

Now you got the sources, you can do it :)
Personally I prefer telling 1 that is equal to True when successfull and 0 that is equal to 'False' when failed... It's just another point of view!

39
Developer's Corner / Tiny 'Touch' 32 bits program in C (3 kb)
« on: September 29, 2006, 02:58 PM »
Hello,

For people who are aware of having an Unix like 'Touch' program, here are the sources + into the zipped attachement, a BAT to compile the source, the compiled source (a 3Kb one) :)

Code: C [Select]
  1. // ********************************
  2. // Author : Gerome GUILLEMIN
  3. // Coded in pure C using LCC Win32
  4. // Date : 29 th of September 2006
  5. // ********************************
  6. #include <windows.h>
  7. #include <stdio.h>
  8.  
  9. BOOL SetFileToCurrentTime(HANDLE);
  10.  
  11. int main(int argc, char **argv)
  12. {
  13.         HANDLE lngHandle = NULL;
  14.         char szFileName[MAX_PATH+1];
  15.         if ( argc == 2 ) {
  16.                 strcpy( szFileName, argv[1] );
  17.             lngHandle = CreateFile(szFileName, GENERIC_WRITE,
  18.                                         FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0);
  19.                 if (lngHandle && lngHandle != INVALID_HANDLE_VALUE) {
  20.                         SetFileToCurrentTime( lngHandle );
  21.                         CloseHandle( lngHandle );
  22.                         return 1; // => 1 will be the OK return
  23.                 }
  24.         }
  25. return 0; // => 0 will be the KO return
  26. }
  27.  
  28. BOOL SetFileToCurrentTime(HANDLE hFile)
  29. {
  30.   FILETIME ft;
  31.   SYSTEMTIME st;
  32.  
  33.   GetSystemTime(&st);                 // gets current time
  34.   SystemTimeToFileTime(&st, &ft);     // converts to file time format
  35.   return SetFileTime(hFile,           // sets last-write time for file
  36.          (LPFILETIME)NULL, (LPFILETIME)NULL, &ft);
  37. }

40
Hi,


another similar site is filext.com (yes, only one "e")

ERROR 404

41
Post New Requests Here / Re: IDEA: Command Line Renamer
« on: September 26, 2006, 12:16 PM »
Hello,

Using FBSL, you can then execute the following code once, it'll self compile as an EXEcutable, and then follow the instructions...

#Option Explicit
#AppType Console
'// FILENAME/FOLDER RENAMER with UNC support
Cls
If Not STANDALONE Then
Fbsl2Exe(Command(1), fbsl_console)
ExitProgram(0)
End If

If CommandCount() <> 3 Then
Print., "*****************************"
Print "Usage : RENAMER Source Target"
Print "*****************************",.
Pause
ExitProgram(-1)
End If

Dim $source = Command(1)
Dim $target = Command(2)

Print "> Renaming ", source, " to ", target
Dim %result = MoveF(source, target)
If result <> 1 Then
Print "< Last error returned : ", GetLastError()
Else
Print "< ", source, " successfully renamed to ", target
End If


42
Developer's Corner / [FBSL] FARR's Calc tool updated!
« on: September 26, 2006, 04:25 AM »
Hello,

I've improved my FARR's calculator!

Here's the link : http://gedd123.free....C/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 :
Code: Text [Select]
  1. #Option Explicit
  2. '#AppType Console
  3.  
  4. If Not STANDALONE Then
  5.     Fbsl2Exe( Command(1) ): ExitProgram(0)
  6. End If
  7.  
  8. '// -----------------------------------------------------------------
  9. '// GEG 26 September 2006
  10. '// FBSLCALC.EXE 2.5/56*PI
  11. '// FBSLCALC.EXE /code=msgbox(Null,"Hello","Test",MB_ICONINFORMATION)
  12. '// -----------------------------------------------------------------
  13. Static $code, $resulttext, $result, $cmd = Command(-1), ch34 = Chr(34), ch92 = Chr(92)
  14. If cmd = "" Then
  15.     MsgBox(NULL, "You need to specify an expression to evaluate, like 2+2." & crlf & _
  16.                 "If you encounter any problems, tell'em there : " & crlf & _
  17.                 "http://www.fbsl.net/phpbb2/index.php", _
  18.                 "Freestyle Basic Script Langage (FBSL) Calculator:", MB_OK +MB_ICONINFORMATION)
  19.     ExitProgram(1)
  20. End If
  21.  
  22. cmd = Replace(cmd, ch34 & ch34, "")
  23. If Left(cmd, 1) = ch34 AndAlso Right(cmd, 1) = ch34 Then
  24.     cmd = Mid(cmd, 2, StrLen(cmd) - 2)
  25. End If
  26.  
  27. If Instr(cmd,"/code=") Then
  28.     cmd = Remove(Trim(cmd), "/code=")
  29.     code = "result = " & cmd & " : Return result"
  30.     resulttext = cmd & " = " & ExecLine(code)
  31. Else
  32.     cmd = Replace(Trim(cmd), ",", ".")
  33.     code = "result = " & cmd & " : Return result"
  34.     ExecLine(code)
  35.     result = Replace(result, ".", GetLocalSeparator())
  36.     resulttext = cmd & " = " & result
  37. End If
  38.  
  39. If StrLen(cmd) = 0 Then ExitProgram(-1)
  40.  
  41. ClipboardSetText(result)'resulttext)
  42. MsgBox(NULL, resulttext, "Freestyle Basic Script Langage (FBSL) Calculator / Executor:", _
  43.        MB_OK+MB_ICONINFORMATION)
  44.  
  45. Function GetLocalSeparator()
  46.     Dim $Buffer * 4
  47.     ApiCall( "GetNumberFormat", "kernel32", 0, 0, "1.1", 0, @Buffer, Len(Buffer) )
  48.     Return Mid(Buffer,2,1)
  49. End Function

43
Developer's Corner / [FBSL] Submit your scripts online
« on: September 24, 2006, 04:03 PM »
Hello,

I've made a graphical application 100% with FBSL that is able to submit your scripts onto an online mySQL database.
Your typed (or picked from disk) script can be submitted online via a simple command button.
More than comments, here are two screenshots that show how this tiny application works.

At first type your code / or pick it from your disk :


And then, admire the submitted sample directly from the Web :


Enjoy!

44
General Software Discussion / Re: idea for donation coder CD
« on: September 20, 2006, 04:41 PM »
Hey Mouser !

Good idea - especially if some of us developers can volunteer our software to be on it~!  :D


Feel free to add FBSL onto the CD, you have my permission!

45
Developer's Corner / [FBSL] M3u list generator
« on: September 09, 2006, 05:02 AM »
Hello,

For people who cares about generating rapidly an M3u list, here's a quick tool that will do it for you.

Just compile it with FBSL and place the compiled file into a known path.

Then from any command line or alike (FARR), you just have to change dir and execute M3u.exe.
Nothing else to do, then the M3u list file will be generated into the target dir!

Enjoy it! 8)

Code: vb.net [Select]
  1. #Option Explicit
  2. #AppType Console
  3.  
  4. ' ----------------------------
  5. ' -- M3u list generator
  6. ' -- GEG 09-09-2006
  7. ' ----------------------------
  8.  
  9. M3u(".\*.mp3", ".\_List.m3u")
  10.  
  11. Sub M3u($what, $where)
  12.         CD CurDir()
  13.         Dim %fp, $c, $big, $fil = FindFirst(what), $m3u = where
  14.  
  15.         While fil <> ""
  16.                 big = big & fil & CRLF
  17.                 fil = FindNext
  18.         Wend
  19.  
  20.         If Len(big) Then
  21.                 fp = FileOpen(m3u, OUTPUT)
  22.                 If fp Then
  23.                         FilePrint(fp, big)
  24.                         FileClose(fp)
  25.                 Else
  26.                         Print "Error while opening ", m3u
  27.                 End If
  28.         End If
  29.  
  30.         Print "Do you want to hear the playlist now [Y]es, [N]o ?";
  31.         Do
  32.                 c = UCase(ReadChar())
  33.         Loop While c = CR OrElse c = LF
  34.  
  35.         If c = "Y" AndAlso FileExist(m3u) Then
  36.                 ApiCall("ShellExecute", "Shell32", NULL, "open", m3u, "", "", SW_SHOW)
  37.         Else
  38.                 Print "See you later!"
  39.                 Sleep(1000)
  40.         End If
  41. End Sub

46
Hello,

I've made a script using FBSL to update it...
Just have to complete it for your favourite appz :)
#option Explicit
#AppType CONSOLE

#DllDeclare Shell32( "ShellExecute" ), Urlmon( "URLDownloadToFile" ), Kernel32( "Sleep" )
MACRO RunEx(lpFile,lpParameters,nShowCmd) = ShellExecute(0,"open",lpFile,lpParameters,0,nShowCmd)

? "Trying to get the latest FBSL Setup..."
Dim %iRet = URLDownloadToFile( NULL, "http://gedd123.free.fr/FBSLv3.exe", ".\FBSLv3.exe", 0, NULL )
If iRet = 0 Then
  ? "Gotcha!"
  RunEx( ".\FBSLv3.exe", " /VERYSILENT", SW_SHOWNORMAL )
  ? "FBSL v3 silent Install in progress..."
  Sleep(2000)
End If

47
FBSL - Freestyle Basic Script Langage / Your first Console program
« on: August 13, 2006, 08:08 AM »
Hello,

This will be your first FBSL program.
FBSL is scripting like language that is able to run Console programs as well as Graphical ones...

Let's dive into our first Console program...
Here's the code :

Code: Text [Select]
  1. #AppType Console
  2. Color(14,0): Cls: Print "Hello World!"
  3. Print
  4. Print
  5. Print "                / `._     .       .      _.' \"
  6. Print "              '[email protected] = `.     \     /     .' = @.'"
  7. Print "               \ @`[email protected] `.    \   /    .' @.'@ / "
  8. Print "                \;`@`[email protected] `.   \ /   .' @.'@`;/  "
  9. Print "                 \`[email protected] `[email protected] `'.(*).'` @.' @.'/   "
  10. Print "                  \ '=._`. @ :=: @ .'_.=' /    "
  11. Print "                   \ @  '.'..'='..'.'  @ /     "
  12. Print "                    \[email protected]_.==.: = :[email protected]_/      "
  13. Print "                    /  @ @_.: = :[email protected] @  \      "
  14. Print "                   /@ _.-'  : = :  '-._ @\     "
  15. Print "                  /`'@ @ .-': = :'[email protected] @`'`\    "
  16. Print "                  \[email protected]_.=` .-: = :-. `[email protected]/    "
  17. Print "                    \._.-'   '.'   '-._./      "
  18. Print
  19. Print "... you just run your first FBSL program!"
  20. Print
  21. Pause

Just copy/paste it onto your favourite notepad, then save it as myfirstprogram.fbs
Double click onto it and you'll see a nice yeallow butterfly appearing onto a console window telling 'Hello world'

If you want to know more about FBSL and its capabilities, I invite you to download the manual that is a 550 CHM help file that comes with tutorials and language help + extras.
You can grab it there : http://gedd123.free.fr/FBSLv3.exe

Enjoy FBSL!

48
Developer's Corner / Re: Turbo C and Turbo Pascal are back!!
« on: August 09, 2006, 09:27 AM »
Hi,

Definately hate those products...

49
Find And Run Robot / Re: appending text to todo.txt file?
« on: July 21, 2006, 08:21 AM »
Hi,

gotcha.  can't wait to see the final exe!

I'm the main FBSL author that has made this little tool for FARR.
It was a 1st essay, when i have time i'll rewrite it, but if you have also a bit of time, you can try to enhance it if you know some programming like vb or alike, because FBSL is a sorta vb like but it is able to compile as a real stand alone executable without depends :)

50
Try FBSL, it'll be for sure easier at this kinda stuff

Pages: prev1 [2] 3 4 5 6 7next