ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Qslice... app to show cpu usage by process in a visual format, including threads

<< < (3/4) > >>

jgpaiva:
i could probably add this to process tamer without much trouble.
-mouser (February 11, 2006, 05:57 AM)
--- End quote ---
:Thmbsup: :Thmbsup: nice!

LuckMan212:
sorry to drift off topic, but I just noticed the Valentine's day Cody bird!  cute!! :-*

Gerome:
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!
-LuckMan212 (February 11, 2006, 05:51 AM)
--- End quote ---

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...

Cpilot:
Almost missed this thread.
Returning running processes with FBSL is quite simple, just use the CreateToolhelp32Snapshot api.

Here's some quick down and dirty script to get you started.  :)


--- ---#option explicit
'$apptype console
#dlldeclare kernel32("CreateToolhelp32Snapshot","Process32First","Process32Next"_
"CloseHandle","GetCurrentProcessId")

dim %hList,$TabStop,$buff,$buffer
dim $PROCESSENTRY32,%hSnapshot,%success

alloc(PROCESSENTRY32,MAX_PATH + 36)
SetMem(PROCESSENTRY32,MAX_PATH + 36,0)

alloc(TabStop,12)
alloc(buff,MAX_PATH)
alloc(buffer,MAX_PATH)
SetMem(TabStop,100,0)
FBSL_SETTEXT(me,"Running Processes")
hList = Fbsl_control("ListBox",me,NULL,NULL,20,20,360,250,_
WS_CHILD + WS_VISIBLE + WS_HSCROLL + WS_VSCROLL + LBS_SORT + LBS_USETABSTOPS,WS_EX_STATICEDGE)
SendMessage(hList,LB_SETTABSTOPS,0,0)
SendMessage(hList,LB_SETTABSTOPS,1,TabStop)
SendMessage(hList,LB_SETTABSTOPS,2,TabStop)
Resize(me,0,0,400,300)
center(me)
show( me )
GetProccess()
begin events

  select case cbmsg


    case wm_close
        exitprogram(0)
  End Select
end events

sub GetProccess()

const TH32CS_SNAPPROCESS = &H2

hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0)

If hSnapShot = -1 Then Exit Sub



success = Process32First(hSnapShot,PROCESSENTRY32)

If success = 1 then

        Do

buff = GetMem(PROCESSENTRY32,36,$MAX_PATH)
realloc(buff,strlen(buff))

buff =  buff & Tab &  GetMem(PROCESSENTRY32,20,4) & Tab & "Thread Count"

            SendMessage(hList,LB_ADDSTRING,0,buff)
        Loop while Process32Next(hSnapshot,PROCESSENTRY32)
           
    End If

    CloseHandle(hSnapShot)


End subThis will return a list of running processes and their thread count.
When I get more time I'll see what I can do about your request.

Gerome:
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...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version