topbanner_forum
  *

avatar image

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

Login with username, password and session length
  • Monday March 1, 2021, 5:05 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
101
Developer's Corner / Re: Farr's ADDNOTE
« on: March 13, 2006, 04:23 AM »
Hi mouser,

Yes, all is possible in FBSL!

1) To get Commandlines ytou can use this :

For i = 0 to CommandCount()
  szCmd = Command(i)
Next i

And then you can parse each one starting with wanted keywords and so on...

2) no problem, you have to document it :)

3) just do this mod :
instead of :
szCmdFull = Replace(szCmdFull, "_", CRLF)

type this :
szCmdFull = Replace(szCmdFull, "\n", CRLF)

But, actually i'm at office... so i have to work before playing, but you can add these mods yourself ;)

102
Developer's Corner / FBSL - A simple Web browser
« on: March 12, 2006, 04:20 PM »
Hello,

A simple web browser with a mutex that allows to execute more than one instance at a time :)

#Option Explicit

#DllDeclare atl.AtlAxWinInit
Dim %hMutex, $URL, %hDisplay

' // Create a Mutex : only ONE instance is allowed !!
hMutex = ApiCall("CreateMutex", "kernel32", 0, 1, "__MUTEX__Browser__")
If GetLastError() = 183 Then ExitProgram(-1)

Fbsl_SetText(ME, "==FBSL Basic Web Browser==")
Resize(ME, 0, 0, 600, 500)
Center(ME)

Const hURL = Fbsl_Control("Edit", ME, "http://www.fbsl.net", 0, 10, 3, 368, 23, _
WS_CHILD + WS_VISIBLE + WS_TABSTOP + ES_AUTOHSCROLL, WS_EX_CLIENTEDGE)
Const IDB_Go = 1000
Fbsl_Control("Button", ME, "Go", IDB_Go, 380, 3, 75, 23, WS_CHILD + WS_VISIBLE + WS_TABSTOP, 0)
AtlAxWinInit(0)
hDisplay = Fbsl_Control("AtlAxWin", ME, "MSHTML:<HTML></HTML>", _
0, 0, 30, 600, 460, WS_CHILD + WS_VISIBLE, WS_EX_CLIENTEDGE)
Show(ME)
RefreshMe()

Begin Events
    Select Case CBMSG
        Case WM_SIZE
            RefreshMe()
        Case WM_CLOSE
            ExitProgram(0)
        Case WM_COMMAND
            If CBCTL = IDB_Go Then EventGo()
    End Select
End Events

Sub EventGo()
    Fbsl_GetText(hURL, URL)
    If URL = "" Then Return
    If (hDisplay <> 0) Then Destroy(hDisplay)
    hDisplay = Fbsl_Control("AtlAxWin", ME, URL, 0, 0, 30, 600, 460, _
    WS_CHILD + WS_VISIBLE + WS_VSCROLL + WS_HSCROLL, WS_EX_CLIENTEDGE)
    RefreshMe()
End Sub

Sub RefreshMe()
    Dim %Lefti, %Topi, %Righti, %Bottomi
    GetClientRect(ME, Lefti, Topi, Righti, Bottomi)
    Resize(hDisplay, 10, 30, Righti - 25, Bottomi - 70)
End Sub

103
Developer's Corner / Farr's ADDNOTE
« on: March 12, 2006, 03:57 PM »
Hello,

Mouser asked me an addnote tool for his Farr tool...
Here's the beast that can be compiled there : http://gedd123.free..../studio/fbsl2exe.php

' // ------------------------------------------------------------------
' // Addnote -clip|-timestamp|-top YOURMESSAGE_UNDERSCORES_MEAN_CRLF :)
' // ------------------------------------------------------------------

Dim $szCmd1, $szCmdFull, %fp, $szTemp
Begin Const
    file = ".\addnote.txt"
    sepa = "------------------------------------"
End Const

If STANDALONE = TRUE Then
    szCmd1 = LCase(Command(1))
    szCmdFull = Remove(Command(-1), szCmd1)
    szCmdFull = Replace(szCmdFull, "_", CRLF)
    szCmdFull = Trim(szCmdFull)
   
    szCmdFull = Replace(szCmdFull, ch34 & ch34, "")
    If Left(szCmdFull, 1) = ch34 AndAlso Right(szCmdFull, 1) = ch34 Then szCmdFull = Mid(szCmdFull, 2, StrLen(szCmdFull) - 2)
    szCmdFull = Trim(szCmdFull)
    If StrLen(szCmdFull) = 0 Then ExitProgram(-1)
   
    Select Case szCmd1
        Case "-clip"
            fp = FileOpen(file, APPEND)
            FilePrint(fp, szCmdFull)
            FilePrint(fp, sepa)
            ClipboardSetText(szCmdFull)
            FileClose(fp)
        Case "-timestamp"
            'March 12, 2006 - 19:35:27 PM
            fp = FileOpen(file, APPEND)
            FilePrint(fp, GetMonth(Time(6)) & " " & Time(7) & ", " & Time(5) & " - " & _
            Time(1) & ":" & Time(2) & ":" & Time(3) & " " & Time(4))
            FilePrint(fp, szCmdFull)
            FilePrint(fp, sepa)
            FileClose(fp)
        Case "-top"
            fp = FileOpen(file, BINARY_INPUT)
            szTemp = FileGet(fp, FileLen(file))
            FileClose(fp)
            fp = FileOpen(file, OUTPUT)
            FilePrint(fp, szCmdFull)
            FilePrint(fp, sepa)
            FilePrint(fp, szTemp)
            FileClose(fp)
    End Select
End If

Function  $GetMonth(ByVal  %iMonth)
    Select Case iMonth
        Case 1
            Return "January"
        Case 2
            Return "February"
        Case 3
            Return "March"
        Case 4
            Return "April"
        Case 5
            Return "May"
        Case 6
            Return "June"
        Case 7
            Return "July"
        Case 8
            Return "August"
        Case 9
            Return "September"
        Case 10
            Return "October"
        Case 11
            Return "November"
        Case 12
            Return "December"
    End Select
End Function

So mouser?

104
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)

105
General Software Discussion / Re: Free Visual Studio 2005
« on: March 11, 2006, 08:28 AM »
Hi,

I did not know that $400 was 'free'... ^^

106
Developer's Corner / FBSL - A brand new FBSL code editor
« on: March 09, 2006, 05:59 PM »
Hello!

FBSL v3 has a brand new code editor!

This brand new version is now capable of :
- checking your typos at runtime!
- exporting your script in HTML



Enjoy ;)

107
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... :)

108
Developer's Corner / Farr's 'Calc' program completely revisited!
« on: March 07, 2006, 05:17 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 ;)

109
Post New Requests Here / Re: IDEA: Run bat files transparently
« on: February 15, 2006, 05:55 PM »
Hi,

In Fbsl you just have to do that :
StrPipe( "CMD.exe /K test.bat", SW_HIDE )

Into the bat file you can do such code :
@echo off
Echo Hello World! > log.txt

Your bat will be executed silently and without any console output thanks to thr SW_HIDE parameter :)

The StrPipe has more extends in Fbsl, you can redirect the piped process to any valuable Handle, that is to say it's very handy to grab a result from something that writes into stdout :)

Enjoy ;)

110
General Software Discussion / Re: PlayWave.exe + Timed ScreenSaver
« on: February 13, 2006, 04:32 PM »
Hi,

See? AHK has SO many options to offer, I didn't even SEE them all yet! ;D

Another taste, but no need to have a specific layer here : just pure plain script that natively handles any DLL call...
#Option Explicit

Const SND_NODEFAULT = &H2
FBSL_GetFileName( "Open WAV", "WAV Files(*.wav)|*.wav", 0 )

If FBSL_GetFileName <> "" Then
  $apptype console
  Color( 2, 14 )
  ? ".........WAVE FORM FILE PLAYER................................"
  Apicall( "sndPlaySound", "winmm", FBSL_GetFileName, SND_NODEFAULT )
  ? ".............................................................."
End If

You can try it into my Fbsl Online Compiler to see the result :)

111
Developer's Corner / Re: FBSL - Online XML Database Snippits
« on: February 12, 2006, 07:37 PM »
Hello again,

I've updated the capture because i've added the ability to auto compile the script you want :)
Feedback is welcome ;)

112
Developer's Corner / FBSL - Online XML Database Snippits
« on: February 12, 2006, 07:05 PM »
Hello,

Here's my online XML Database code repository that handles 170 FBSL snippets...


For people who want to know more about this tool, please read this post :
http://www.fbsl.net/.../viewtopic.php?t=636

Enjoy Fbsl !

113
Hi,

FWIW,
The CreateToolhelp32Snapshot api can return lots of information about running processes, threads and modules operating on your system.

CreateToolhelp32Snapshot

May i precise this URL :
http://msdn.microsof...hreadentry32_str.asp
and look at the 'tpBasePri' flag where are exposed the differents states of the thread... :)
I didn't remember who said that it was impossible to grab/exploit those informations with Fbsl... ^^

114
Hi,

On the Start menu, you can sort the All Programs menu. Windows XP sometimes adds new shortcuts to the bottom of the All Programs menu when you expect them to appear in alphabetical order. In either case, finding the program you want to run is difficult when the sort order of the Start menu gets out of hand.

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder contains the sort order of the Favorites menu and Start menu. The subkey Favorites contains the sort order of the Favorites menu. The subkey Start Menu contains the sort order of the classic Start menu, and the subkey Start Menu2 contains the sort order of the new Start menu.

Deciphering the contents of these three keys is next to ridiculous, but you can remove any of them to resort the corresponding menu in alphabetical order. For example, to restore the All Programs menu to alphabetical order, remove the subkey Start Menu2. To remove a subkey:
•   

In the left pane, right-click the subkey you want to remove, and then click Delete.

To restore the Favorites menu in both Windows Explorer and Internet Explorer, remove the subkey Favorites. I typically remove MenuOrder to resort all of the menus at the same time.

Source :: http://www.microsoft...neycutt_03may05.mspx

Tested onto my Win2k : it works nicely ;)

115
Hi cpilot,

Here's the result of your script onto my win2k :


Just for information, for those who don't have Fbsl instlled yet, you can test those scripts by simply copying/pasting them into my online Fbsl compiler, it'll output an executable of the given script :)
See http://gedd123.free.fr/studio for more informations :)

Enjoy ;)

PS : Hey LuckyMan212! Just take this as an invitation to know more about Fbsl...

116
Developer's Corner / FBSL - Xml snippet database
« on: February 11, 2006, 06:46 AM »
Hello,

I've made a simple GUI interface that is able to load an XML database.
It is oriented to hold snippets script code.

Here's a capture of the project :


And now the source code :
' ---------------------------------------------
' XML data base reader by Gerome GUILLEMIN
' Cool XML DOM documentation can be found there :
' http://www.devguru.com/Technologies/xmldom/quickref/xmldom_index.html
' ---------------------------------------------
$Apptype GUI
#Option Explicit
ComWarnings(False)
'$Trace On

Dim %obj, %cnodes, %wdrange, $S1, %i, %j, %k, $strerr, %NodeList, %numNodes, %bLoad, %bLastEntity
Dim %TopWin, %leftWin, %RightWin, %BottomWin, %NodeListCount, $fp, %mb

LoadLibrary("Riched20.dll")
Macro CRichEdit( Caption, hWnd, ID, X, Y, Height, Width ) = FBSL_Control (_
         "richedit20a", hWnd, Caption, ID, X, Y, Height, Width,_
         WS_CHILD + WS_CLIPSIBLINGS + WS_VISIBLE + WS_HSCROLL + WS_VSCROLL + ES_MULTILINE + _
         ES_AUTOVSCROLL + ES_AUTOHSCROLL + WS_TABSTOP + ES_WANTRETURN , WS_EX_CLIENTEDGE )

Macro CInput( Caption, hWnd, ID, X, Y, Height, Width ) = FBSL_Control (_
         "edit", hWnd, Caption, ID, X, Y, Height, Width,_
         WS_CHILD + WS_CLIPSIBLINGS + WS_VISIBLE + WS_TABSTOP + ES_LEFT + ES_AUTOHSCROLL + ES_MULTILINE, WS_EX_CLIENTEDGE )

'// Label
Macro CLabel( Caption, hWnd, ID, X, Y, Height, Width ) = FBSL_Control (_
"static", hWnd, Caption, ID, X, Y, Height, Width,_
WS_CHILD + SS_NOTIFY + SS_CENTER + WS_VISIBLE, WS_EX_CLIENTEDGE )

FBSL_SetText(Me, "FBSL XML database")
ReSize(Me, 0, 0, 640, 480)
Center(Me)

Begin Enum
IDB_OPEN = 1000
IDB_PREV
IDB_NEXT
IDB_LBL
IDB_XML
IDB_RICH
End Enum

Begin Const
OUTFILE  = ".\_MySamplesNEW.xml"
    hEdit    = CRichEdit( "", Me, IDB_RICH, 0, 0, 800, 600 )
hStatus  = FBSL_Control("MSCtls_StatusBar32", Me, "", 0, 0, 0, 0, 0, 0, 0)
BUT = 60
CARTOUCH = "XML Files(*.xml)|*.xml"
hBtn1    = FBSL_Control("Button", Me, "&Open", IDB_OPEN, 10, 20, BUT, 20, WS_Child + WS_Visible + WS_TabStop, 0)
hBtn2    = FBSL_Control("Button", Me, "<<", IDB_PREV, 10+BUT*1, 20, BUT, 20, WS_Child + WS_Visible + WS_TabStop, 0)
hBtn3    = FBSL_Control("Button", Me, ">>", IDB_NEXT, 10+BUT*2, 20, BUT, 20, WS_Child + WS_Visible + WS_TabStop, 0)
hBtn4    = FBSL_Control("Button", Me, "&New XML DB", IDB_XML, 10+BUT*8+60, 20, BUT+20, 20, WS_Child + WS_Visible + WS_TabStop, 0)
hLbl1 = CLabel( "Nothing loaded yet...", Me, IDB_LBL, 10+BUT*3+10, 20, BUT+BUT, 20 )
End Const
FBSL_SetFont(hEdit, "Arial", 10, FW_BOLD, 0 ,0 ,0)
EnableWindow( hBtn3, False )
EnableWindow( hBtn2, False )

k = 1: bLastEntity = -1
GoSub ResizeMe
Show(Me)

Begin Events
Select Case CBMsg

Case WM_Close
Gosub MYReleaseObjects
GoSub WriteLastEntity
Exitprogram(0)

Case WM_Command
Select Case CBCTL
Case IDB_OPEN
GoSub LoadXml
If bLoad = True Then GoSub ClickPrevious
Case IDB_PREV
If bLoad = True Then GoSub ClickPrevious
Case IDB_NEXT
If bLoad = True Then GoSub ClickNext
Case IDB_XML
fp = FileLoad( FBSL_GetFileName( "Open", _
"FBSL Files(*.fbs)|*.fbs|Text Files(*.txt)|*.txt|CSV Files(*.csv)|*.csv|All Files(*.*)|*.*", 0 ) )
GoSub FillingXmlDB
End Select

Case WM_Size
GoSub ResizeMe

End Select
End Events

:ClickPrevious
If obj <> 0 Then
If k > 1 Then k = k - 1
If k = 1 Then
EnableWindow( hBtn2, False )
EnableWindow( hBtn3, True )
End If
GoSub GetNodeListCount
GoSub GetNodeListItem
End If
Fbsl_SetText( hLbl1, $k & "/" & $NodeListCount & " entries" )
Return

:ClickNext
If obj <> 0 Then
If k < NodeListCount Then k = k + 1
If k = NodeListCount Then
EnableWindow( hBtn3, False )
EnableWindow( hBtn2, True )
End If
GoSub GetNodeListCount
GoSub GetNodeListItem
End If
Fbsl_SetText( hLbl1, $k & "/" & $NodeListCount & " entry" )
Return

:LoadXml
k = 1: bLoad = False
If obj <> 0 Then GoSub MYReleaseObjects
obj = CreateObject("Microsoft.XMLDOM")
PutValue(obj, ".async(%b)", False)
PutValue( obj, "ValidateOnParse = %b", True )
If StrLen(FBSL_GetFileName( "Open", CARTOUCH, 0 )) > 0 Then
CallMethod( obj, ".Load(%s)", FBSL_GetFileName )
If GetValue( "%d", obj, ".parseError.errorCode" ) <> 0 then
strerr = "Error at line : " & GetValue( "%d", obj, ".parseError.line" ) & _
GetValue( "%s", obj, ".parseError.srcText" )
Msgbox( Null, strerr, "XML ERROR!", MB_OK + MB_ICONSTOP )
Else
bLoad = True
End If
End If
Return

:GetNodeListCount
If NodeList <> 0 Then ReleaseObject(NodeList)
Set NodeList = GetValue( "%o", obj, ".getElementsByTagName(%s)", "Sample")
NodeListCount = GetValue( "%d", NodeList, ".Length" )
If NodeListCount = 0 Then
MsgBox( Me, "Error : bad XML file format !", "Error", MB_ICONWARNING + MB_APPLMODAL )
GoSub MYReleaseObjects
End If
Return

:GetNodeListItem
Fbsl_SetText( hEdit, GetValue( "%s", NodeList, ".item(%d).text", k-1 ) )
Return

:MYReleaseObjects
ReleaseObject(NodeList)
ReleaseObject(obj)
ReleaseObject(cnodes)
Return

:ResizeMe
GetClientRect(Me, TopWin, leftWin, RightWin, BottomWin )
Resize( hEdit, 10, 50, RightWin - 25, BottomWin - 100 )
Resize( hStatus, 10, 10, RightWin-25, 0)
Return

:FillingXmlDB
If Strlen(fp) > 0 Then
fp = Replace( fp, "&", "&amp;" ): fp = Replace( fp, "<", "&lt;" )
fp = Replace( fp, ">", "&gt;" ) : fp = Replace( fp, " ", " " )
mb = MsgBox( Null, "Click NO to just add this sample" & _
Crlf & "Click YES to add this sample and to complete the XML database", _
"Adding ending tag or not...", MB_YESNOCANCEL + MB_APPLMODAL + MB_ICONWARNING + MB_DEFBUTTON2 )
If mb = IDCANCEL Then Return
FileOpen( OUTFILE, Append )
If FileLen(OUTFILE) = 0 Then
FilePrint( FileOpen, "<?xml version=""1.0"" encoding=""ISO-8859-1""?>")
FilePrint( FileOpen, "<Fbsl_Samples>" & CrLf & Tab & "<Content>" )
End If
If Asc(fp{StrLen(fp)}) = 10 Then
If Asc(fp{0}) = 10 Or Asc(fp{0}) = 13 Then
FilePrint( FileOpen, Tab & Tab & "<Sample>" & fp & Tab & Tab & "</Sample>" )
Else
FilePrint( FileOpen, Tab & Tab & "<Sample>" & CrLf & fp & Tab & Tab & "</Sample>" )
End if
Else
If Asc(fp{0}) = 10 Or Asc(fp{0}) = 13 Then
FilePrint( FileOpen, Tab & Tab & "<Sample>" & fp & CrLf & Tab & Tab & "</Sample>" )
Else
FilePrint( FileOpen, Tab & Tab & "<Sample>" & CrLf & fp & CrLf & Tab & Tab & "</Sample>" )
End If
End If
bLastEntity = 0
If mb = IDYES Then
bLastEntity = 1
FilePrint( FileOpen, Tab & "</Content>" & CrLf & "</Fbsl_Samples>")
End if
FileClose(FileOpen)
End If
Return

:WriteLastEntity
If bLastEntity = 0 Then
FileOpen( OUTFILE, Append )
FilePrint( FileOpen, Tab & "</Content>" & CrLf & "</Fbsl_Samples>")
FileClose(FileOpen)
End If
Return

117
Developer's Corner / FBSL - Icon viewer
« on: February 11, 2006, 06:32 AM »
[modified source to avoid crash]
Hello,

Here's a icon viewer developped in Fbsl.


The source code will show you how to :
-use volatile CLASS
-use API calls
-use API structure manipulation

'======================================================
' Shell32 Icon Index FBSL
'======================================================
#Option Explicit
#DLLDECLARE user32("GetSystemMetrics","DestroyIcon")
#DLLDECLARE comctl32("ImageList_Create","ImageList_ReplaceIcon")
#DLLDECLARE shell32("ExtractIcon")
DIM $LV_ITEM, %hList, %t, %hIcon, %hImage, $index, %j

' ------------------------------------------------------
'// SysListView Class :: TYPE + MACRO
' ------------------------------------------------------
Class SLV '// volatile class (== without parens() )
    Macro SetValue(param1, param2) = SetMem( LV_ITEM, param1, param2 )
    Static mask  = 0, iItem = 4, iSubItem = 8, state = 12
    Static stateMask = 16, pszText = 20, cchTextMax = 24, iImage = 28
    Static ILC_COLOR32 = 32, ILC_MASK = 1, LVSIL_SMALL = 1, LVSIL_STATE = 2
    Static LVS_LIST = 0x0003, LVIF_TEXT = 1, LVIF_IMAGE = 2, LVS_REPORT = 0x0001
    Static LVS_TYPEMASK = 3, LVS_EX_GRIDLINES = 1, LVS_EX_LABELTIP = 0x00004000
    Static LVIS_STATEIMAGEMASK = 0xF000, SM_CXICON = 11, SM_CYICON = 12
End Class

' ------------------------------------------------------
' // Main Entry point
' ------------------------------------------------------
Sub Main()
    MYCreateSysListView()
    Begin Events
    End Events
End Sub

' ------------------------------------------------------
'// ListView Creation
' ------------------------------------------------------
Sub MYCreateSysListView()
    Fbsl_settext(me,"Shell32 Icon Index")
    Alloc(LV_ITEM,36)

    SLV->SetValue( SLV->LVIF_TEXT + SLV->LVIS_STATEIMAGEMASK + SLV->LVIF_IMAGE, SLV->mask )' set state masks
    SLV->SetValue( 256, SLV->cchTextMax)

    hList = Fbsl_control("SysListView32",me,"",0,0,0,500,294,_
            WS_VISIBLE + WS_CHILD + SLV->LVS_LIST + SLV->LVS_TYPEMASK + SLV->LVS_REPORT, WS_EX_STATICEDGE)

    SendMessage(hList, SLV->LVM_SETBKCOLOR, 0, rgb(255,255,192))
    SendMessage(hList, SLV->LVM_SETTEXTBKCOLOR, 0, rgb(255,255,192))
    SendMessage(hList, SLV->LVM_SETEXTENDEDLISTVIEWSTYLE,0, SLV->LVS_EX_LABELTIP)

    '==========create an image list======================
    hImage = ImageList_Create(GetSystemMetrics(SLV->SM_CXICON),_
             GetSystemMetrics(SLV->SM_CYICON), SLV->ILC_COLOR32 + SLV->ILC_MASK, 1, 1)

    '====Extract the icon then destroy the handle to replace with next icon
    For t = 0 To 237
        hIcon = ExtractIcon(0,"shell32.dll",t)
        ImageList_ReplaceIcon(hImage,-1,hIcon)
        DestroyIcon(hIcon)
        If hIcon <> 0 Then j = t
    Next

    '=====set the image list to the listview=========
    SendMessage(hList,SLV->LVM_SETIMAGELIST,SLV->LVSIL_SMALL,hImage)

    '=====populate the listview======================
    For t = 0 To j
        index = "Icon # : " & t
        SLV->SetValue( t, SLV->iItem) ' item index
        SLV->SetValue( @index, SLV->pszText) ' pointer to text string
        SLV->SetValue( t, SLV->iImage) ' image index
        SendMessage(hList,SLV->LVM_INSERTITEM,0,LV_ITEM)
    Next
    Resize(me, 0, 0, 520, 324)
    Center(me)
    Show(me)
End Sub

Enjoy ;)

118
Hello,

I am not defying FBSL, in fact I know very little about it.  I glanced briefly at the "home page" of it which is just a forum and did not have the time to dig very deeply into it.  From what little I know, it seems to have a fairly small following and thus I doubt if anyone here, aside from Gerome himself of course, would be able to code this app using FBSL.  It also seems to be a high-level language similar to VBscript, which leads me to believe it might be slower than compiled C code as well.  I would be more than happy to be proven wrong of course!

Hehe...
No defy please :)
FBSL is 5 years old, and is capable of manipulating :
-1- 5 variables types : 32bits integers, 32bits floats, 64bits doubles, strings and pointers.
-2- has several native layers : COM, API, CLIPBOARD, STRING, MATHS, REGEX, COLLECTIONS, MMF, LZO COMPRESSION, SOCKETS, THREADS and CONSOLE.
-3- is able to 'self compile' into an EXEcutable that is 100% autonomous ( no extra runtime to run the code)
-4- is able to 'self decompile' an EXE into an .fbs script file/buffer
-5- has a 3rd part Stdcall flat model DLL to make C, VB, Delphi developpers using this dll to use some FBSL code through their applications.
-6- a 500 pages CHM help file that comes with grammar documentation + samples, several tutorials, macro files, declare files, constants files and more!

Compared to VBScript & JScript, FBSL is 20x faster than those scripting languages.
Compared to VBScript & JScript, FBSL is capable of beeing compiled as autonaumous EXEcutables.
Compared to VBScript & JScript, FBSL is able to call API functions from ANY kinda DLL ( C,C++,Delphi,.NET,... )
Compared to VBScript & JScript, FBSL is capable of executing VBS & JS :)
Compared to VBScript & JScript, FBSL is capable of GUI.
Compared to VBScript & JScript, FBSL is capable of Callbacks.
Compared to VBScript & JScript, FBSL is capable of natively Compressing Data.
Compared to C compiled code, FBSL is about 10% slower.
But FBSL remains a script language, onto its category, FBSL is placed amongst the fastest scripting languages :)

Yes my site is focused onto Fbsl forum, BUT don't forget that FBSL is a language, so i can guess a forum is more oriented to my language than to our personal lifes :)

At last, i'm not here to decorate, not making vaporware/deadware like tons of'em one can easily find over the internet... and amongst'em tons of started projects...

BTW, if you need help, i ust can invite you to my Forum, it's free and open minded ;)

Have a good day!

PS : to reply to the question, YES, FBSL is capable of treating the kinda GUI software you want to have...

119
General Software Discussion / Re: Best Executable Compressor Programs
« on: February 10, 2006, 04:11 PM »
Hi,

I've already tested PECompact and ... it still has a big problem with DLLs !!!
The idea is nice, the compression is good, but it fails onto some DLLs.
I've experimented it several times against my DLLs and i've never had any successful results :/
The *ONLY* program i've never had any kinda failure or warning is, and still is, is UPX Executable compressor !
FYI, my Fbsl runtimes are UPX'ed :)

120
Hi,

:tellme: Sorry, I reread you post, and it's removing duplicats you want. Are the file names accurate enough to be used to distinguish the files, or should the size/date/CRC be checked, too?

Skrommel

The deal should be not very hard to resolve since Microsoft provides COM methods to its favourite player!
The following link will expose one of the branch to manipulate a WMP playlist :
http://msdn.microsof...layernewplaylist.asp
There are other ones, but if you're familiar with VB/VBA or any other language that is able to CreateObject ( so does Fbsl ;) ), then you'll be able to succed in your initial will  8)

121
Find And Run Robot / Re: F&RR does mathematics...
« on: February 10, 2006, 07:08 AM »
Hello,

maybe the first plugin will simply be a plugin that can shell a command to a commandline app, capture the output, and display it nicely in the results window - seems like that would be useful for lots of things like this.

With this simple Fbsl's GUI script, you'll grab the stdoutput of any executable that produces output :)

Dim %hEdit = Fbsl_control("edit", Me, "", 1, 0, 0, 320, 200, 0x50310084, 0)
  Dim $buf = StrPipe("CMD /C DIR C:\*.txt /o/b/n" )
  Fbsl_SetText( hEdit, buf )
  Resize(Me, 0, 0, 324, 204 )
  Center(Me): Show(me)
Begin Events
End Events

The result is a GUI winform sized to 320x200 with a TextBox containing the result of the following shelled command line :
CMD /C DIR C:\*.txt /o/b/n

As you've seen, it does not require any extra EXEcutable to do the job since StrPipe does the whole job for you ;)
Any comments ?  :Thmbsup:

122
Developer's Corner / Re: FBSL - a simple Web browser
« on: February 10, 2006, 05:03 AM »
Hello,

I've refined the code and fixed 2 bugs, one of the 2 bugs was sucking RAM :)
Enjoy this smoother version :=)

'$AppType GUI
option explicit
$DLLDeclare ATL.AtlAxWinInit,shlwapi.SHAutoComplete
Dim %hDisplay, $URL

FBSL_SetText(Me, "==FBSL Basic Web Browser==")
ReSize(Me, 0, 0, 600, 500)
Center(Me)
Const SHACF_URLMRU = &H4

Const SHACF_URLHISTORY = &H2

Const SHACF_URLALL = (SHACF_URLHISTORY + SHACF_URLMRU)
Const hURL = FBSL_Control("Edit", Me, "", 0, 10, 3, 368, 23, _
             WS_Child + WS_Visible + WS_TabStop + ES_AutoHScroll, WS_Ex_ClientEdge)
Const IDB_Go = 1000
    FBSL_Control("Button", Me, "Go", IDB_Go, 380, 3, 75, 23, WS_Child + WS_Visible + WS_TabStop, 0)
    AtlAxWinInit(0)
    hDisplay = FBSL_Control("AtlAxWin", Me, "MSHTML:<HTML></HTML>",_
                0, 0, 30, 600, 460, WS_Child + WS_Visible, WS_Ex_ClientEdge)

SHAutoComplete(hURL,SHACF_URLHISTORY)

Show(Me)
RefreshMe()

Begin Events
    Select Case CBMsg
        Case WM_Size
            RefreshMe()
        Case WM_Close
            ExitProgram(0)
        Case WM_Command
            If CBCtl = IDB_Go Then EventGo()
    End Select
End Events

Sub EventGo()
    FBSL_GetText(hURL, URL)
    If (hDisplay <> 0) Then
        Destroy(hDisplay)
        hDisplay = 0
    End If
    If URL = "" Then Exit Sub
    hDisplay = FBSL_Control("AtlAxWin", Me, URL, 0, 0, 30, 600, 460,_
               WS_Child + WS_Visible + WS_VScroll + WS_HScroll, WS_Ex_ClientEdge)
    RefreshMe()
End Sub

Sub RefreshMe()
Dim %Lefti, %Topi, %Righti, %Bottomi
   GetClientRect( Me, Lefti, Topi, Righti, Bottomi )
   ReSize(hDisplay, 10, 30, Righti - 25, Bottomi - 70)
End Sub

123
Hi!

i cant hear the difference between any of them, so i choose speakers based on their looks.
heresy i know..

I advise you to consult an otho-rino :)

124
Hi there!
I love this program!
It does exactly what i was needing, and the "copy to clipboard" feature is extremelly handy, thanks mouser for remembering it :D
Looks like Fbsl is very powerfull, maybe it should be more featured in coding snacks!
I surelly will look into it ;)
Thanks Gerome!

PS: i have set my regex to be activated with "+", i think it's easier than writing "calc".

I'm glad to see happy users :)
since Fbsl was developped for simple, middle and hard tasks, and for different programming style approaches : basic, semi ooped and more... minded developers, i can affirm that Fbsl is made for you without any restriction apart the limit of your imagination ;)

Enjoy it!

125
Developer's Corner / Re: FBSL - a simple Web browser
« on: February 10, 2006, 04:39 AM »
Yo Cpilot!

Even better!
Now i'm using your version at office, this helps me a lot at debugging my JScript code compared to a direct use of complete IE6 where it by default mask all JScripts errors (even if the check was checked!).
Anyway, your enhanced version is more practical ;)

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