Messages - Gerome [ switch to compact view ]

Pages: prev1 ... 9 10 11 12 13 [14] 15 16 17 18 19 ... 31next
66
Hi,

Thank you jgpaiva, I have checked the site. It seems, that it is in fact a backup tool which I am looking for.

Gerome! You really made my day :-) Thank you very much for the code. The only problem is, that I do not know, what to do with it, since a little html and css and such are my only code-skills. Could you tell me, where I can put the code into? Only if it is not too time-consuming for you. 

Either you can download FBSL there : http://gedd123.free.fr/FBSLv3.exe
Or either you can try the code i gave you by pasting there : http://gedd123.free.fr/studio

The 1st solution will install the full interpreter + compiler + editor + 525 pahe Help manual with tutorials
The 2nd solution will allow you to quick and blindly compile the script i gave you into a stand alone EXEcutable.

Both solutions are able to produce standalone EXEcutable and the memory footprint is around 2 Mb of RAM, that is to say not greedy at all onto our decent machines ;)

67
Hello,

More than a long discuss, here's a script code that does the exact trick you want :)
Enjoy!

#Option Explicit
$AppType Console
' **********************************************************************
' // Source dir to Dest dir with CRC script
' // CRC changed? If Yes, then modified file will be replaced onto Dest
' // Author   : Gerome GUILLEMIN
' // Date     : 06th Of April 2006
' // Language : FBSL
' **********************************************************************
Dim $Src = "C:\Source\"
Dim $Dst = "D:\Backup\"
Dim $Joker = "*.*"

If FindFirst( Src & Joker ) <> "" Then
  CheckAndCopy ( Findfirst )
  While FindNext() <> ""
    CheckAndCopy( Findnext )
  Wend
End If
Pause

Sub CheckAndCopy(Byref $szFound)
  If szFound = "." OrElse szFound = ".." Then Exit Sub
  Dim %srcCRC = 0, %dstCRC = 0

  srcCRC = CheckSum(FileLoad(Src & szFound))
  If FileExist( Dst & szFound ) Then
    dstCRC = CheckSum(FileLoad(Dst & szFound))
  End If
  If (srcCRC = dstCRC) AndAlso dstCRC <> 0 Then Exit Sub
  ? "[CRC diff] Copying ", Src & szFound, " -> ", Dst & szFound

  CopyF( Src & szFound, Dst & szFound )
End Sub

68
Living Room / Re: Incredible Fishing Video!
« on: April 02, 2006, 06:29 PM »
Hello,

Just a good joke for the 1st of April... ^^

69
Developer's Corner / FBSL - Drawing a nice avatar...
« on: March 30, 2006, 12:27 PM »
Hello,

The following snippet will draw a nice avatar onto a form  :Thmbsup:
You can use the 'online compiler' to see the results...
Dim %hdc = GetDC(ME)
Const WM_DRAW = WM_USER + &H100

Fbsl_SetText(ME, "SideshowBob's Special")
Resize(ME, 0, 0, 50, 150)
Center(ME)
Show(ME)
Draw()

Begin Events
Select Case CBMSG
Case WM_DRAW
Draw()
Case WM_PAINT, WM_NCPAINT
PostMessage(ME, WM_DRAW, 0, 0)
Case WM_CLOSE
ReleaseDC(ME, hdc)
ExitProgram(0)
End Select
End Events

Sub Draw()
'=======
' Hair
'=======
Arc(hdc, 25, 41, 8, 56, 0, 3)
Arc(hdc, 8, 56, 20, 27, 0, -0.3)
Arc(hdc, 20, 28, 0, 38, 0, 3)
Arc(hdc, 0, 38, 24, 13, 0, -0.3)
Arc(hdc, 24, 13, 7, 8, 0, 0.3)
Arc(hdc, 7, 9, 42, 9, 0, -2)
Arc(hdc, 41, 9, 64, 2, 0, -0.4)
Arc(hdc, 64, 4, 53, 13, 0, 2)
Arc(hdc, 53, 14, 79, 22, 0, -2)
Arc(hdc, 79, 22, 62, 21, 0, 0.3)
Arc(hdc, 62, 21, 76, 46, 0, -2)
Arc(hdc, 76, 46, 62, 32, 0, 0.5)
Arc(hdc, 62, 32, 66, 62, 0, -3)
Arc(hdc, 66, 62, 60, 51, 0, 0.5)
Arc(hdc, 61, 41, 48, 67, 0, -0.3)
Arc(hdc, 48, 67, 44, 42, 0, 0.2)
Arc(hdc, 46, 35, 40, 49, 0, -0.1)
Arc(hdc, 40, 49, 34, 35, 0, 0.05)
Arc(hdc, 34, 35, 26, 46, 0, -0.05)
Arc(hdc, 26, 46, 20, 35, 0, 0.05)
Fill(hdc, 30, 30, Rgb(196, 0, 52))
'=======
' Face
'=======
Arc(hdc, 46, 49, 41, 60, 0, 7)
Arc(hdc, 39, 61, 38, 66, 0, -2)
Arc(hdc, 40, 66, 38, 84, 0, 7)
Arc(hdc, 24, 43, 22, 54, 0, 3)
Arc(hdc, 27, 49, 20, 63, 0, 5)
Arc(hdc, 20, 63, 26, 62, 0, 3)
Arc(hdc, 26, 62, 19, 65, 0, -1)
Arc(hdc, 20, 66, 16, 69, 0, 3)
Arc(hdc, 16, 69, 35, 68, 0, 4)
Arc(hdc, 22, 69, 29, 85, 0, 0.1)
Arc(hdc, 29, 83, 28, 95, 0, 7)
Arc(hdc, 28, 93, 38, 84, 0, -0.3)
'=======
' Eyes
'=======
Arc(hdc, 30, 48, 40, 48, 0, 1.4)
Arc(hdc, 29, 50, 40, 50, 0, 0.1)
Arc(hdc, 30, 56, 36, 57, 0, 0.3)
Arc(hdc, 21, 50, 26, 50, 0, 0.1)
PSet(hdc, 23, 51)
PSet(hdc, 35, 51)
PSet(hdc, 40, 62)
Fill(hdc, 30, 45, Rgb(250, 215, 0))
'=======
' Shirt
'=======
Arc(hdc, 15, 90, 50, 90, 0, 0.7)
Arc(hdc, 14, 90, 29, 83, 0, -0.3)
Arc(hdc, 39, 84, 50, 90, 0, -3)
Arc(hdc, 23, 92, 29, 83, 0, -0.3)
Arc(hdc, 38, 94, 44, 85, 0, -0.3)
Arc(hdc, 33, 88, 38, 94, 0, -3)
Fill(hdc, 30, 95, Rgb(55, 115, 44))
End Sub

70
Developer's Corner / FBSL - How to do charts
« on: March 29, 2006, 01:51 PM »
Hello,

FBSL has some GUI primitives that allows user to develop simple but efficient 'charts'.
Here's the code that will make random charts...

Charts.fbs
Dim %hdc = GetDC(ME)
Const WM_DRAW = WM_USER + &H100

Fbsl_SetText(ME, "Horns & Hoofs, Inc. (left click to redraw)")
BackColor(hdc, Rgb(255, 255, 0))
Resize(ME, 0, 0, 800, 500)
Center(ME)
Show(ME)
Draw()

Begin Events
Select Case CBMSG
Case WM_DRAW
Draw()
Case WM_PAINT, WM_NCPAINT, WM_LBUTTONDOWN
PostMessage(ME, WM_DRAW, 0, 0)
Case WM_CLOSE
ReleaseDC(ME, hdc)
ExitProgram(0)
End Select
End Events

Sub Draw()
Clear(hdc)
FontTransparent(hdc, TRUE)
DrawArrows(10)
CurrentX(hdc, 20): CurrentY(hdc, 40)
DrawLine(Rgb(0, 0, 255), DRAW_DASH)
CurrentX(hdc, 20): CurrentY(hdc, 120)
DrawLine(Rgb(255, 0, 0), DRAW_DASHDOT)
CurrentX(hdc, 20): CurrentY(hdc, 160)
DrawLine(Rgb(0, 255, 0), DRAW_DASHDOTDOT)
DrawText(200, 20)
DrawBoxes()
DrawArrows(250)
CurrentX(hdc, 320): CurrentY(hdc, 250)
Text(hdc, "Production Turnover")
End Sub

Sub DrawLine(ByVal clr, ByVal style)
Dim %stp = 775 \ 12
DrawStyle(style)
ForeColor(hdc, clr)
For i = stp To 775 Step stp
Line(hdc, CurrentX(hdc), CurrentY(hdc), i, RandInt(1, 4) * 40)
Next
End Sub

Sub DrawText(ByVal x, ByVal y)
ForeColor(hdc, Rgb(0, 0, 255)): CurrentX(hdc, x): CurrentY(hdc, y)
Text(hdc, "Income")
ForeColor(hdc, Rgb(255, 0, 0)): CurrentX(hdc, CurrentX(hdc) + 200)
Text(hdc, "Expenses")
ForeColor(hdc, Rgb(0, 255, 0)): CurrentX(hdc, CurrentX(hdc) + 200)
Text(hdc, "Profit")
End Sub

Sub DrawArrows(ByVal y)
Dim %stp = 775 \ 12
ForeColor(hdc, 0)
DrawStyle(DRAW_SOLID)
DrawWidth(2)
Line(hdc, 10, y, 10, y + 190)
Line(hdc, 10, y, 7, y + 5)
Line(hdc, 10, y, 12, y + 5)
Line(hdc, 10, y + 190, 780, y + 190)
Line(hdc, 780, y + 190, 776, y + 187)
Line(hdc, 780, y + 190, 776, y + 192)
DrawWidth(3)
For i = stp To 775 Step stp
PSet(hdc, i, y + 190)
Text(hdc, i * 12 \ 775 + 1)
Next
For i = y + 30 To y + 160 Step 40
PSet(hdc, 10, i)
Text(hdc, (y + 190 - i) \ 40)
Next
CurrentX(hdc, 18): CurrentY(hdc, y)
Text(hdc, "Bln USD")
CurrentX(hdc, 730): CurrentY(hdc, y + 170)
Text(hdc, "Month")
DrawWidth(1)
End Sub

Sub DrawBoxes()
Dim %stp = 775 \ 12
DrawStyle(DRAW_SOLID)
For i = stp To 775 Step stp
FillStyle(RandInt(0, 6))
FillColor(Rgb(%RandInt(0, 255), %RandInt(0, 255), %RandInt(0, 255)))
Line(hdc, i - 3, 400 - %RandInt(0, 3) * 40, i - 47, 438, _
Rgb(%RandInt(0, 255), %RandInt(0, 255), %RandInt(0, 255)), _
TRUE, %RandInt(0, 1))
Next
End Sub


Here's a screnshot of the result:

Enjoy ;)

Pages: prev1 ... 9 10 11 12 13 [14] 15 16 17 18 19 ... 31next
Go to full version