topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Friday April 19, 2024, 6:56 am
  • 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: [1] 2 3 4 5 6 7next
1
Hi,
An archive inside an archive inside an archive...

Compress then recompress the resulting file. Add spice by alternating compression software. Let's see what happens.

Better have a tool for extracting.  ;D


Apart from fooling anti viruses and be seen like a hacker i really don't see any pluvalue here...
 

2
Developer's Corner / [FBSL] Environment class - for scripting support
« on: October 05, 2006, 03:13 PM »
Hello,

A great FBSL fan (Ferdinand Piatnik) has developped a very nice tool with it.
This is a 'shell' program like that does a lot of nice things.

Here is the whole description + source code + zipped attachement.

I propose class env as a tool to use with FBSL programs in BAT files.
When instance of class env is created it processes the FBSL program command parameters.
Features are:
options - parameters which begin with with "-" are treated as options.
First character after "-" is saved as option identification, the reminder of parameted is saved as option argument.
Options are processed until non option parameter is found.
fileset expansion - parameters which contain "*" or "?" joker characters are considered as fileset definition
and are expanded to list of files.
Joker characters are allowed anywhere in directory path(except for drive specification)
standard input redirection - parameter which starts with "<" defines STDIN file.
Parameter must be enclosed in quotes(") because of standard DOS(cmd.exe) processing.
standard output redirection - parameter which starts with ">" defines STDOUT file.
When parameter starts with >> then standard output is appended to specified file.
Parameter must be enclosed in quotes(") because of standard DOS(cmd.exe) processing.

These features are not enabled by default.
The Initialize method has three parameters:
%flags - sum of following flags is recognized at this time (-1 covers any present or future options):
env.C_OPT - option proccessing is enabled
env.C_FILES - fileset proccessing is enabled
env.C_STDIO - standard input/output proccessing is enabled
env.C_ESC - escaping of any proccessing is enabled(by prefixing parameter by character "/")
%fAllow - specifies file attributes which are allowed for files to be returned in fileset (when fileset expansion is enabled)
Default value is FILE_ATTRIBUTE_ARCHIVE+FILE_ATTRIBUTE_READONLY
%dAllow- specifies file attributes which are allowed for directories to be examined (when fileset expansion is enabled)
Default values is FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_READONLY

Class env exposes following constants:

C_STDIO = 1 'allow redirection of STDIN, STDOUT
C_FILES = 2 'expand parameters with * and ?
C_ESC = 4 'parameters starting with \ are not processed(\ is trimmed off)
C_OPT = 8 'leading parameters starting with - are processed as options

Methods:

Method getFiles - returns array of files
Parameters:
$fname - file search string - it may contain "*" and "?" characters
$dir (default="") - directory string prepended to search string - must end with "\" ,
"*" and "?" characters are not allowed/processed
%fAllow (default=FILE_ATTRIBUTE_ARCHIVE+FILE_ATTRIBUTE_READONLY)
specifies file attributes which are allowed for files to be returned in fileset
%dAllow(default=FILE_ATTRIBUTE_DIRECTORY+FILE_ATTRIBUTE_READONLY)
specifies file attributes which are allowed for directories to be examined

Method redirectStdIn - specifies standard input file. True is returned if redirection succedes, false otherwise.
Parameter:
$p_fileName (default="")- specifies STDIN file. When "" then default STDIN is restored.

Method redirectStdOut - specifies standard output file. True is returned if redirection succedes, false otherwise.
Parameters:
$p_fileName (default="")- specifies STDOUT file.When "" then default STDOUT is restored.
$p_mode (default="w") - specifies write mode. When "w" text is written to new file. If "a" is specified, then text is appended to existing file.

Method printError writes text to FBSL console even if STDOUT is redirected.
Parameters:
$p_message - text to be written
$p_CRLF - (default=CRLF) - text to be appended to p_message

I could not find problems on my computer.
There is a bug/problem with use of _dup2 function for STDIN, but workaround with use of fflush corrected problems.

In Attachment there are files:
env.inc - env class definition
envDemo.fbs - demo FBSL script - called by demo.bat
demo.bat - BAT script to demonstrate uses of env class. If I knew how, I would make it better.

The Class code :
Code: Text [Select]
  1. Class env
  2.         #DllDeclare crtdll(_dup As myDup, _dup2 As myDup2, _fileno As myFileNo, fopen As myFopen, fflush As myFflush)
  3.         #DllDeclare kernel32(GetStdHandle, WriteConsole)
  4.         'http://msdn2.microsoft.com/en-us/library/8syseb29.aspx
  5.         '
  6.         Private
  7.         Shared  %d_stdIn = 0, %d_dupStdIn, %d_newStdIn = 0, %d_stdOut = 0, %d_dupStdOut, %d_newStdOut = 0
  8.         Shared  %d_errHandle = 0
  9.         '
  10.         Function redirect_($p_fileName, $p_mode, %p_old, %p_dup, %p_new)
  11.                 Const FAIL = -1
  12.                 Const NONE = 0
  13.                 Dim %d_tmp, d_handle
  14.                 If p_mode = "r" Then
  15.                         d_handle = STDIN
  16.                 Else
  17.                         d_handle = STDOUT
  18.                 End If
  19.                 If p_old = 0 Then 'get file descriptor and its duplicate  
  20.                         p_old = myFileNo(d_handle)
  21.                         p_dup = myDup(p_old)
  22.                 End If
  23.                 If p_fileName = "" Then ' restore old
  24.                         If p_new <> 0 Then
  25.                                 myFflush(d_handle)
  26.                                 If myDup2(p_dup, p_old) = -1 Then
  27.                                         Return(FALSE)
  28.                                 End If
  29.                                 p_new = 0
  30.                         End If
  31.                 Else
  32.                          %d_tmp = myFopen(p_fileName, p_mode) ' open new file
  33.                         If d_tmp = NONE Then Return(FALSE) 'failed to open file
  34.                          %d_tmp = myFileno(d_tmp) ' get file descriptor from file pointer
  35.                         If  %d_tmp = FAIL Then ' 'failed to get file descriptor
  36.                                 Return(FALSE)
  37.                         Else
  38.                                 If myDup2(d_tmp, p_old) = FAIL Then Return(FALSE) 'failure
  39.                                 p_new = d_tmp
  40.                         End If
  41.                 End If
  42.                 Return(TRUE)
  43.         End Function
  44.        
  45.         Method Initialize(%flags = 0, _
  46.                 %fAllow = FILE_ATTRIBUTE_ARCHIVE + FILE_ATTRIBUTE_READONLY, _
  47.                 %dAllow = FILE_ATTRIBUTE_DIRECTORY + FILE_ATTRIBUTE_READONLY)
  48.                 Dim %f_stdio = flags BAnd C_STDIO
  49.                 Dim %f_files = flags BAnd C_FILES
  50.                 Dim %f_esc = flags BAnd C_ESC
  51.                 Dim %f_opt = flags BAnd C_OPT
  52.                 Dim %i, $v, %ok, $fin = "", $fout = "", $mode = ""
  53.                 argv[] = Command(1 - STANDALONE)
  54.                 For i = 2 - STANDALONE To CommandCount() - 1
  55.                         ok = TRUE
  56.                         v = Command(i)
  57.                         If f_esc Then
  58.                                 If v{1} = "/" Then
  59.                                         ok = FALSE
  60.                                         f_opt = FALSE
  61.                                         argv[] = Mid(v, 2)
  62.                                 End If
  63.                         End If
  64.                         If ok Then
  65.                                 If f_opt Then
  66.                                         If v{1} = "-" Then
  67.                                                 If Mid(v, 2, 1) <> "" Then
  68.                                                         options = options & Mid(v, 2, 1)
  69.                                                         optv[] = Mid(v, 3)
  70.                                                 End If
  71.                                                 ok = FALSE
  72.                                         Else
  73.                                                 f_opt = FALSE
  74.                                         End If
  75.                                 End If
  76.                         End If
  77.                         If ok Then
  78.                                 If f_stdio Then
  79.                                         If v{1} = ">" Then
  80.                                                 ok = FALSE
  81.                                                 If v{2} = ">" Then
  82.                                                         fout = Mid(v, 3)
  83.                                                         mode = "a"
  84.                                                 Else
  85.                                                         fout = Mid(v, 2)
  86.                                                         mode = "w"
  87.                                                 End If
  88.                                         ElseIf v{1} = "<" Then
  89.                                                 ok = FALSE
  90.                                                 fin = Mid(v, 2)
  91.                                         End If
  92.                                 End If
  93.                         End If
  94.                         If ok Then
  95.                                 If f_files Then
  96.                                         If Instr(v, "*") Or Instr(v, "?") Then
  97.                                                 argv = Array_Merge(argv, getFiles(v, "", fAllow, dAllow))
  98.                                                 ok = FALSE
  99.                                         End If
  100.                                 End If
  101.                         End If
  102.                         If ok Then
  103.                                 argv[] = v
  104.                         End If
  105.                 Next
  106.                 argc = Count(argv)
  107.                 If fin <> "" Then redirectStdIn(fin)
  108.                 If fout <> "" Then redirectStdOut(fout, mode)
  109.         End Method
  110.         '
  111.         Public
  112.        
  113.        
  114.         Dim options = "", optv[], argv[], %argc = 0
  115.         Begin Const
  116.                 C_STDIO = 1 'allow redirection of STDIN,STDOUT
  117.                 C_FILES = 2 'expand parameters with * and ?
  118.                 C_ESC = 4 'parameters starting with \ are not processed(\ is trimmed off)
  119.                 C_OPT = 8 'leading parameters starting with - are processed as options
  120.         End Const
  121.        
  122.         Method getFiles($fname, $dir = "", _
  123.                 %fAllow = FILE_ATTRIBUTE_ARCHIVE + FILE_ATTRIBUTE_READONLY, _
  124.                 %dAllow = FILE_ATTRIBUTE_DIRECTORY + FILE_ATTRIBUTE_READONLY)
  125.                 #DllDeclare crtdll("_findfirst" As myFFirst, "_findnext" As myFNext, "_findclose" As myFClose)
  126.                 'http://msdn2.microsoft.com/en-us/library/kda16keh.aspx
  127.                 'fname - path string with optional * and ? joker characters at any position
  128.                 'dir - optional base directory - no joker characters allowed (must end with \)
  129.                
  130.                 Dim arr[]
  131.                 Dim %p, %pJoker, %pRest = 0
  132.                 Dim $path = dir, $search = fname, $rest, $f
  133.                 Dim %fMask = BNot fAllow, %dMask = BNot dAllow
  134.                 Dim %fStat, %fHandle, %attr, %searchHandle, $fileInfo * MAX_PATH + 41
  135.                 'are there any joker characters?
  136.                 pJoker = Instr(search, "*")
  137.                 p = Instr(search, "?")
  138.                 If p And p < pJoker Then pJoker = p
  139.                 '
  140.                 If pJoker Then 'jokers exist in search
  141.                         p = InstrRev(search, "\", pJoker)
  142.                         If p Then
  143.                                 path = dir & Left(search, p) 'set new base directory
  144.                                 search = Mid(search, p + 1)
  145.                         End If
  146.                         pRest = Instr(search, "\") 'is joker for directory?
  147.                         If pRest Then 'directory with joker characters
  148.                                 rest = Mid(search, pRest + 1)
  149.                                 search = Left(search, pRest - 1)
  150.                         End If
  151.                 End If
  152.                 fHandle = myFFirst(path & search, @fileInfo)
  153.                 fStat = fHandle
  154.                 While fStat <> -1
  155.                         'f =TO_LPSTR( @fileInfo+20)
  156.                         If f{1} <> "." Then
  157.                                 attr = GetMem(fileInfo, 0, %4)
  158.                                 If pRest Then
  159.                                         If Not (attr BAnd dMask) And (attr BAnd FILE_ATTRIBUTE_DIRECTORY) Then arr = Array_Merge(arr, getFiles(rest, path & To_Lpstr(@fileInfo + 20) & "\", fAllow, dAllow))
  160.                                 Else
  161.                                         If Not (attr BAnd fMask) Then arr[] = path & To_Lpstr(@fileInfo + 20)
  162.                                 End If
  163.                         End If
  164.                         fStat = myFnext(fHandle, @fileInfo)
  165.                 Wend
  166.                 If fHandle <> -1 Then myFClose(fHandle)
  167.                 Return arr
  168.         End Method
  169.        
  170.         Method printError($p_message, p_CRLF = CRLF)
  171.                 Dim %d_len, d_buf = $p_message & p_CRLF
  172.                 If d_errHandle = 0 Then d_errHandle = GetStdHandle(STD_ERROR_HANDLE)
  173.                 WriteConsole(d_errHandle, @d_buf, StrLen(d_buf), @d_len, 0)
  174.         End Method
  175.        
  176.         Method redirectStdIn($p_fileName = "")
  177.                 Return(redirect_(p_fileName, "r", d_stdIn, d_dupStdIn, d_newStdIn))
  178.         End Method
  179.        
  180.         Method redirectStdOut($p_fileName = "", $p_mode = "w")
  181.                 Return(redirect_(p_fileName, p_mode, d_stdOut, d_dupStdOut, d_newStdOut))
  182.         End Method
  183. End Class

3
General Software Discussion / Re: What IRC client do you use?
« on: October 05, 2006, 03:05 PM »
Hello,

I use Miranda, but be aware, sometimes it totally freezes and hang my computers ( windows 2k Sp4 )

4
Hello,

MojoPac is a new software product recently launched at DEMO which enables you to run applications directly from a USB device, without affecting your PC in any way and without needing the software installed on your PC. It has great potential, but also has some show stopping flaws which this article I've written points out. MojoPac - Potentially Great Software with Serious Flaws

I've seen the demos, and it could have been seen interesting, but IMO it's just another way to transform your iPod or alike with great storage (4GB is then recommended) to a backup drive of your desktop... nothing yet super exciting... or may be i've missed something but... anyway...

5
Developer's Corner / Re: A little laugh for coders
« on: October 04, 2006, 12:23 PM »
Hello,

Kinda special humor, none of those jokes made me laugh... :/

6
Developer's Corner / Re: FBSL - A brand new FBSL code editor
« on: October 04, 2006, 03:00 AM »
Hi Gerome
...
BTW -  What is FBSL mainly about? 
...
Looking forward to some dialog...
Calvin

Here you'll find summary informations about my product : http://gedd123.free....es/what_is_fbsl.html

7
General Software Discussion / Re: Screensaver Maker Recommendations?
« on: October 04, 2006, 02:22 AM »
Hi,

i go for simpler solutions, with IrfanView. :)

From the same vein, there is the most excellent one aka XNView

8
General Software Discussion / Re: Screensaver Maker Recommendations?
« on: October 04, 2006, 02:16 AM »
...
Requirements:
...
    * It must be capable of building a nice installer that can be shared with others.

Suggestions?
-mouser

i use inno setup and istool for all of my programs.
but im looking for a screensaver maker not an installer.

So what ??????????

9
General Software Discussion / Re: Screensaver Maker Recommendations?
« on: October 03, 2006, 06:32 PM »
Hello,

IMO, the best installer is Innosetup and its best GUI front-end is IsTool

I use them both since more than 5 years now and never had any problem under Win95... Vista RC :)

Silent install can be also done with Innosetup!

You can add Delphi units code to your Innosetup script, it works like a charm!

Latest info : both are free!

Enjoy!

10
Hi,

Microsoft Windows 2000 [Version 5.00.2195]
(C) Copyright 1985-2000 Microsoft Corp.

C:\Documents and Settings\Gerome1>shutdown /?
'shutdown' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.

FYI, it does NOT exists under Windows 2000 and inferior

11
Developer's Corner / Re: SkyIDE - Latest Release Information
« on: October 03, 2006, 04:47 PM »
I have win2k Sp4 FR.
The msgbox appears and when clicked onto OK then nothing appends...

12
Developer's Corner / Re: SkyIDE - Latest Release Information
« on: October 03, 2006, 03:06 PM »
Hello,

I dunno if someone have tested lastest SkyIDe, but whan i try to execute SkyIDE.exe, i just obtain this box :

13
Hello,

I wonder,is there any program which can open mdb file as access.I ask that beacuse in access you can make very easily functional programs but the problem is you need to have access for open it.So is it possible to open it and will it look like in access with some program?

With ODBC drivers you can get connected to any common Microsoft DBMS systems or pseudo ones ( XLS, MDB ).
But those kinda 'databases' are just beeing able to be used as databases, the UI things won't be accessible because an MDB or an XLS are basically more or less databases, but you can order them to add sheets or alike, but if you want to use them, you really have to reinvent the UI wheel for those files...

14
Developer's Corner / Re: FBSL - A brand new code editor
« on: October 03, 2006, 02:45 AM »
Try this excellent one : CodeBlocks
The open source, cross platform Free C++ IDE

DevCPP is a little bit outdated compared to codeBlocks, and there are nightly builds that are really tested and also excellent!

15
Hello,

But perhaps the point, Gerome, is that 1 millsion USD > Nothing
 -- and as an American company, USD would make sense as the prize, no?

Ok Allen et al, I've just seen my jokes are just badly interpreted... I'm sorry for you... :)
BTW, this offer seems nice.

16
Hi,

@Gerome: we'd still accept you if you'd show less negativity, really!

What about negativity ?
Because 1 million of Euro is > to 1 million of USD ?
ROFL

17
Hi,

Gerome, don't be hatin'! 8)

It's a great, free service - it must be the DIGG effect, normally the site is pretty fast.

http://www.rememberthemilk.com/ has been recognized not as the most simple, but as the most powerful online reminder service. What I like best (next to the powerful keyboard shortcuts that are similar to those in Google Mail) is that you can set it to send you IM reminders (ICQ, AIM, ...) when a task is due. That's really cool when you work with computers, and even *more* cool when using Miranda with the OSD plugin (OSD=On-Screen Display, like channel number and volume on the screen of a TV set)!

 :-*

I don't believe in the marketting done around this web service.
The idea is simple and great, the interface aka its maniability, ergonomy, choice of pale colours that i can't really see lead me to unsubscribe rapidly...

18
Hi,

Bah... I'd prefer 1 million Euros :)

19
Darn, it worked a couple months ago :(


Hehehe... it used to work months ago, on the contrary, Api-Guide url is still available and will be helpful for long time i hope :)

20
Hello,

I subscribed to it, seemed fantastic, the interface was in french naturally, but when i decided to use it, its pseudo transparent colors and keyboard shortcuts and its speed (very slow) have turned me to unsubscribe from this webservice 10 minutes after a pale use...
Sorry, the idea is great, the use (IMO) is detestable.

21
Hello,

Looks a bit impractical to me... I use the PlatformSDK from May 2002, afaik the last htmlhelp v1 release before MS switched to the crappy new htmlhelp system.


This tool was developped in VB, and its interface mimmics HTML Help, but it's a pure EXEcutable, not a CHM at all, so i' don't see any crappy things at all onto this excellent software.
This software is considered as a reference to the eyes of VB/vb.Net developpers.

22
Developer's Corner / Re: FBSL - A brand new code editor
« on: October 02, 2006, 02:41 AM »
Hello,

I've looked, but I haven't seen any reviews about the best coding editor or was the "Best Text Editor" review (BTW - Great article :Thmbsup:) supposed to address this?

CJ

Something like that would depend on the language you are programming in and other factors.

I can't see the best editor for something like Python or Perl as also being the best for Delphi.

1/ Eclecta's editor is 100% realized and coded with FBSL v3 and FOR editing Fbsl code.
2/ Its source code is also available into latest Fbsl setup
3/ If you want Eclecta's editor can be used for any other language, you just have to edit its INI file and replace Fbsl keywords by your favourite language.
4/ If anyone wants to make a review of this editor, feel free, it can be interesting to read about it :)

23
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 03:17 PM »
Hello,

Here is the ported version to FBSL v3 :
One cas easily compare the C version vs the FBSL one and have a look at slight difference of both languages :)
Compiled as 'tiny' Fbsl executable, it's final weight is around 8Kb.
Code: Text [Select]
  1. // ********************************
  2. // Author : Gerome GUILLEMIN
  3. // Coded in FBSL v3
  4. // Date : 01st of October 2006
  5. // ********************************
  6. #DllDeclare Kernel32( "CreateFile", "CloseHandle", "GetSystemTime", "SystemTimeToFileTime", "SetFileTime" )
  7.  
  8. Function Main()
  9.     Dim %lngHandle = NULL
  10.     Dim $szFileName * MAX_PATH+1
  11.     If CommandCount() = 2 Then
  12.         StrCpy( szFileName, Command(1) )
  13.         lngHandle = CreateFile(szFileName, GENERIC_WRITE, _
  14.                     FILE_SHARE_READ + FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0)
  15.         If lngHandle AndAlso lngHandle <> INVALID_HANDLE_VALUE Then
  16.             SetFileToCurrentTime( lngHandle )
  17.             CloseHandle( lngHandle )
  18.             Return 1 // => 1 will be the OK return
  19.         End If
  20.     End If
  21. Return 0 // => 0 will be the KO return
  22. End Function
  23.  
  24. Function SetFileToCurrentTime(Byval %hFile)
  25.   Dim $ft * 16 'FILETIME
  26.   Dim $st * 16 'SYSTEMTIME
  27.  
  28.   GetSystemTime(@st)                 // gets current time
  29.   SystemTimeToFileTime(@st, @ft)     // converts to file time format
  30.   Return SetFileTime(hFile, 0, 0, @ft) // sets last-write time for file
  31. End Function

See the attached Zip file to get the whole thing.
Enjoy FBSL !

24
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 02:23 PM »
Just for fun, here's a 1kb C (well, C++) version, that has proper system return code :)


Nice!
Here's a good link btw : http://smallcode.web...optimization-tricks/

25
Developer's Corner / Re: Tiny 'Touch' 32 bits program in C (3 kb)
« on: October 01, 2006, 02:20 PM »
Hi,
Interesting... AFAIK, win32 PE header is already 1KB in side...



Yes, but there are also PE compilation options using MSVC++6.0 that allows you to make 512 bytes length 32 bits executables :)
Below it's impossible, but 512 bytes for MSVC++ 6 is amazing :)

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