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, 6:37 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
126
Hello,

Always dreamed about getting DLL exported functions ?

Here's the code to get'em :
'###################################
' Display DLL Exports
'###################################
Option Explicit
#DLLDECLARE imagehlp("ImageDirectoryEntryToData")
Dim $IMAGE_EXPORT_DIR,%BaseAddress,%pExportDirectory,%pSize
Dim $ExportNamePointerTable,$namefunc,%t,$filename
Dim %hList,$LV_ITEM,$sSave,%hStatus,%hMenu,%FileMenu,$filename,$divide

Begin Const
    ID_OPEN                      = 1001
    ID_EXIT                      = 1002
    LVSCW_AUTOSIZE               = -1
    LVS_LIST                     = 0x0003
    LVIF_TEXT                    = 0x1
    LVIF_IMAGE                   = 0x2
    LVS_REPORT                   = 0x0001
    LVS_TYPEMASK                 = 0x3
    LVS_EX_GRIDLINES             = 0x1
    LVS_EX_FULLROWSELECT         = 0x20
    LVS_EX_LABELTIP              = 0x00004000
    LVS_NOSORTHEADER             = 0x8000
    IMAGE_DIRECTORY_ENTRY_EXPORT = 0
End Const

Fbsl_Settext(Me,"DLL Exports")
hMenu = CreateMenu()
FileMenu = CreateMenu()
AppendMenu( FileMenu, MF_String,ID_OPEN, "&Open")
AppendMenu( FileMenu, MF_SEPARATOR,0, "")
AppendMenu( FileMenu, MF_String,ID_EXIT, "&Exit")
InsertMenu(hMenu,1,MF_PopUp, FileMenu, "&File")
SetMenu( Me,hMenu)

Alloc(LV_ITEM,36)
Alloc(IMAGE_EXPORT_DIR,40)
Alloc(ExportNamePointerTable,5120)
Alloc(namefunc,255)
Alloc(divide,12)
SetMem(LV_ITEM,LVIF_TEXT,0)

Resize(Me,0,0,420,420)
hList = FBSL_Control("SysListView32",Me,"",0,10,10,400,350,_
    WS_VISIBLE + WS_CHILD + LVS_LIST + LVS_TYPEMASK + LVS_NOSORTHEADER,WS_EX_STATICEDGE)
hStatus = FBSL_Control("msctls_statusbar32",Me,"",0,0,0,0,0,WS_VISIBLE + WS_CHILD,0)
FBSL_SetFont(hList,"Lucida Console",12,FW_NORMAL,0,0,0)

SendMessage(hList,LVM_SETCOLUMNWIDTH,0,LVSCW_AUTOSIZE)
SendMessage(hList,LVM_SETEXTENDEDLISTVIEWSTYLE,0,LVS_EX_LABELTIP )
SendMessage(hList,LVM_SETBKCOLOR,0,rgb(234,230,230))
SendMessage(hList,LVM_SETTEXTBKCOLOR,0,rgb(234,230,230))

SetMem(divide,250,0): SetMem(divide,420,4)
SendMessage(hStatus,SB_SETPARTS,2,divide)
ModStyle(Me,0,WS_SIZEBOX,0)
Center(Me): Show(Me)

Begin Events
    Select Case cbmsg
        Case WM_COMMAND
            If CBCTL = ID_OPEN Then
                SendMessage(hList,LVM_DELETEALLITEMS,0,0)
                filename = FBSL_GetFileName( "Open", "DLL File|*.dll", 0)
                BaseAddress = LoadLibrary(filename)
                pExportDirectory = ImageDirectoryEntryToData(BaseAddress,1,_
                                    IMAGE_DIRECTORY_ENTRY_EXPORT,@pSize)
                MemMove(IMAGE_EXPORT_DIR,pExportDirectory,40)
                Alloc(ExportNamePointerTable, GetMem(IMAGE_EXPORT_DIR,24,4) * 4)
                memmove(ExportNamePointerTable, BaseAddress + GetMem(IMAGE_EXPORT_DIR,32,4),_
                        GetMem(IMAGE_EXPORT_DIR,24,4) * 4)
                For t = 0 To GetMem(IMAGE_EXPORT_DIR,24,4) - 1
                    MemMove(namefunc,BaseAddress + GetMem(ExportNamePointerTable,t * 4,4),255)
                    SetMem(LV_ITEM,t,4)
                    SetMem(LV_ITEM,@namefunc,20)
                    SendMessage(hList,LVM_INSERTITEM,0,LV_ITEM)
                Next
                SendMessage(hStatus,SB_SETTEXT,0,filename)
                SendMessage(hStatus,SB_SETTEXT,1,"Number of Functions: " &_
                            GetMem(IMAGE_EXPORT_DIR,24,4))
                FreeLibrary(BaseAddress)
                Erase ExportNamePointerTable
        End If
        If CBCTL = ID_EXIT Then EXITPROGRAM(0)
    End Select
End Events

And here's a screenshot to see the result of the KERNEL32.DLL captured :


Enjoy ;)

127
Hello,

Hello,

Frankly ?
The best i've ever seen is my actual config :
a good USB PC Link between my PC and my MP3/CDR/W Philips HIFI stereo Expanium techology with 75 WRMS :)
Why buying something else ?  :tellme:

Please forgive me, but I don't understand exactly what you are talking about.  Do you mean you just attach a boombox to your computer?  Is there a link you can give for this?

Actually, if what you are talking about is a boombox, I don't think it will work.  I have to have small speakers so I can put it on my desk.

I have an HI FI Philips with an USB PC Link, so i can plug my PC to it and i can stream my music onto my Philips  : no need to plug speakers, and the sound quality can not be compared to speakerz :)

128
Hello,

I was wondering if anyone here had some good recommendations for a good 2.1 speaker system.  I'm going to use it here at work, so it will be at a fairly low volume, so pristine quality isn't necessary.  I want to keep it under $100, maybe even $50, if possible.

I have these speakers that go under my flat panel monitor from Dell, but there's no subwoofer, so I want something with a subwoofer (and I can't justify the company paying for it).  Anyway, I'm looking at the following, but any other recommendations are welcome:
-Dell A425, or A525 (by Altec Lansing, I can find some on ebay)
-Various Logitech 2.1 speakers

That's all I know of so far.  Thanks.

Frankly ?
The best i've ever seen is my actual config :
a good USB PC Link between my PC and my MP3/CDR/W Philips HIFI stereo Expanium techology with 75 WRMS :)
Why buying something else ?  :tellme:

129
General Software Discussion / Re: Firefox url entry problem ...
« on: February 09, 2006, 05:26 PM »
Hi man,

I have FireFox 1.5.0.1, typed http://www.fbsl.net into the address bar and pressed Enter key and it has jumped to the very link i've precised : NO problem at all  :Thmbsup:

130
Developer's Corner / FBSL - a simple Web browser
« on: February 09, 2006, 04:45 PM »
Hello,

Fbsl is able to create controls on the fly thanks to its API capacity to dialog with and thanks to the rich funds that Windows has, I'll show you how easy it is to embedd a web browser component with Fbsl and thanks to ATL APIs...
Get ready... ?

At first, here's the script :
'$AppType GUI
option explicit
$DLLDeclare ATL.AtlAxWinInit
Dim %hDisplay, $URL

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

And then, here's the result :

131
Developer's Corner / FBSL - its own IDE
« on: February 09, 2006, 04:13 PM »
Hello,

FBSL has a built in editor coded in... FBSL :)
All in all, it is able to compile itself, decompile, bookmark, find & replace, change its appearance and much more!

Have a look !


It does look nice, doesn't it ?

132
Hehe :)

Yes, now you got what I was trying to say  :Thmbsup:

But I doubt this will work for apps like FDM (Free Download Manager, read about it on https://www.donation...dex.php?topic=1801.0) since they normally just show their tray icon, so there's no window that could be checked for activity...
:

I bet you should try with the appropriated SendMessage, or with a language that well knows how to handle with a pico precision how to speak correctly with those kinda stuff :)

133
Hi,

If you gimme the name of the API that allows to retrieve the Status of a running program, i can make a sample to demonstrate easily how to do this job :)

134
Post New Requests Here / Re: MP3 HTML Generator
« on: February 08, 2006, 01:14 PM »
Hi,

Is the qsort an API call?  Does it do a natural sort?  Or does it sort like Excel by default 0,1,10,2,3,4,5 etc?  (Natural sort would go 0,1,2,3,4,5,6,7,8,9,10)

Kevin

ScQsort() internally uses QSort system API, it is aimed at qsorting SC == String Collection.

135
Post New Requests Here / Re: MP3 HTML Generator
« on: February 08, 2006, 10:26 AM »
Hello,

The following code will :
- Look for all .mp3 files located into 'MYDIR'
- Pipe the output of the request into a String variable
- Replace portions of directory from the string variable
- Transpose the string variable into a String Collection
- Qsort the String collection
- Output the result into a text file

It's a simple program that should show the ease that Fbsl has to manipulate external programs, string collection and IO manip...

$AppType Console
Macro OEMACCENTS(s) = WideToAnsi( AnsiToWide(s, CP_OEMCP), CP_ACP )

Begin Const
    '!! Change the directory there !!
    MYDIR = "C:\Music\"
    MYEXT = "*.mp3"
End Const

? "Scan in progress..."
GetMp3List( MYDIR & MYEXT, MYDIR )
? "Done!"
Pause

Sub GetMp3List( Byval $szDir, Byval $szRemove )
    Dim $lpBuffer = OEMACCENTS( StrPipe("CMD.exe /C dir " & szDir & " /s /O /B /N" ) )
    lpBuffer = Ucase(lpBuffer)
    szRemove = Ucase(szRemove)
    lpBuffer = Replace( lpBuffer, szRemove, "" )
    Dim %Sc = Scnew()
        ScImport( Sc, lpBuffer, Lf )
    ScQsort( Sc )
    Dim %fp = FileOpen( ".\_List_Sorted.m3u", Output )
       FilePrint( fp, ScExport( Sc, Lf, 1 ) )
    FileClose( fp )
    ScFinalize( Sc )
End Sub

Enjoy ;)

136
Post New Requests Here / Re: MP3 HTML Generator
« on: February 08, 2006, 08:54 AM »
Hi,

went through your site Gerome its a great thing you have made. I am not used to FBSL though, but i'll give it a shot. But surely I wouldnt be able to develop a code in time. Could you please code something for me?

warm regards

Ok, i'll try to make a basic skeletton, and you'll dive into the language after, as you'll probably see, it is simple to develop things like that using Fbsl ;)

137
Developer's Corner / Re: All about FBSL!
« on: February 08, 2006, 06:51 AM »
Hi,

Cool.  I went through the first GUI tutorial last night... and kept getting a "This variable is locked error."  I copied and pasted from the help file.  Any ideas?  The GUI window would come up but no richedit box came up.  Any attempt to resize crashed the program until I changed one of the variables in the resize sub (I think it was hRichText to hRich... but not sure).

Kevin

Yes, i have to renew my old skool tutos...
BTW, it works if you test amongst the 200 provided scripts by the setup :)
The problem into the GUI tutorials is that they date back from FBSL v2 and into that version Fbsl_RichEdit existed, but v3 has revolutionned all those extra grammar GUI functions, and we now have only one function that allows you to create ANY GUI control at runtime that is to say the use of Fbsl_Control().
But one can easily create an 'Fbsl_Richedit' thanks to MACRO that Fbsl handles with ease !

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

This way, you've just created 'Fbsl_Richedit' and you can use it with ease :)

Don't forget Fbsl has BASIC language inheritance, but has also the best of C/C++ background can provide, that is to say MACRO (#define in C/C++) and CLASS ( pseudo classes a la C++ ) but more easy to use, but all in all, Fbsl represents 5 continuous years of work and we now have a mature language, even if it can look Basic, Fbsl is not only a basic language, it can provide much more that you could have imagined, so please read the help file, execute all samples and study'em, i bet my trousers you'll be amazed ;)

138
Developer's Corner / Re: FBSL - How to embedd a flash PACMAN
« on: February 08, 2006, 03:50 AM »
Hi,

cool.

Into the script, just replace
PutValue( oFlash, ".Movie=%s", "http://www.80smusiclyrics.com/games/pacman/pacman.swf" )

by any kinda real cool flash game name (local path or internet link)...
I guess you have tons of those kinda gamez somewhere ? :)

139
Hi,

-1- FBSL has an online documentation, BUT i won't expose it yet because my web hoster allows me ONLY 1 GB traffic per month, so crossing my online help would be more destructive than constructive for the project...

-2- FBSL CHM Help has an INDEX page where ALL keywords are listed / ordered and classified by THEMES, so wher's the problem ? :)

-3- FBSL has an online Wiki, but it is reserved to few people who cares for the project, that is to say that bring a real job into the FBSL help process.

-4- FBSL needs you ;)

Enjoy!

140
Developer's Corner / Re: All about FBSL!
« on: February 08, 2006, 03:00 AM »
Hello,

FBSL has no GUI limits in theory.
The only limit known is that you are limited to 16 million parameters to any Api calls :)
The other limit is the amount of RAM you have onto your PC :)
With FBSL, one can subclass any control, all events are available and no special wrapper has been settled : this also avoids to limit the language!

Enjoy!

141
Developer's Corner / Re: All about FBSL!
« on: February 07, 2006, 06:00 PM »
Hi,

There is an online compiler.
FBSL.exe

Also you can't beat MSDN, just google for the API command your looking for.
I also use API-Guide as a reference.

Rick is modest, he just has omitted he has developped a graphical script that is able to grab DLLs functions names + a bit of enhancement was done to make automatic Declares ready to be used in FBSL !
Further more, his code has been factorized and put into an incldue file that allows user to load at RUNTIME ANY DLL and read its exports, load its ProcAdresses into the current FBSL process and... tadammm : you can then exploit'em on the fly without any extra much more declare !!!
Magic ?

#include <.\include\DllExports.inc>

Sub main()
   Dim $sBuffer
   DllExportLoader( SysDir & "\user32.dll", sBuffer )
   Execline( sBuffer )

   ' // Invokes a user32.dll function previously loaded thx to 'DllExportLoader' !!!
   MessageBoxA( Null, "Yeah", "Hi from #include <.\include\DllExports.inc>!", MB_ICONINFORMATION )
End Sub

So, got interested in Fbsl ?

142
Developer's Corner / Re: All about FBSL!
« on: February 07, 2006, 05:48 PM »
Hi,

Sounds nice.  I downloaded and installed.... I'll have to play around with it at work.  Is there any way to not have to install FBSL to code it?  Is there a zip file I can just unzip and "away I go?"  I really am interested in the API functionality... why reinvent the wheel?  Are there any good Windows API references you know of?  THanks

Kevin

No setup -> http://gedd123.free.fr/FBSLv3bin.zip
Help file   -> http://gedd123.free.fr/FBSLv3.zip

Have to manually associate .fbs with fbsl.exe or with fbsl_tiny.exe :)

143
Hi,

FBSL forum has been hacked 3 times in the last 2 years!
I used to have more than 300 subscribed users!
Now, since months i've decided to buy a real safer service to host my forum, and more than 100 people came back in less than 6 months : that's not bad at all :)
Plus, i've made a 500 page Help file that I'm trying to put on steroid by injecting tons of samples onto it with details as much as possible and with the the less english mistakes i can make ( sorry i'm french ;) )
Anyway, i also know Purebasic and i know his author, which is also a French fellow ;)

Enjoy!

144
Developer's Corner / Re: All about FBSL!
« on: February 07, 2006, 05:08 PM »
Hi,

I've got a question for you... I looked at FBSL very briefly a year ago or so, but since then I found out about AutoIt.  After using AutoIt for a while I realize that it's powerful... but somewhat slow because of it's overhead.  Is FBSL closer to being an actual language rather than a "translator?"  In other words, from what I understand, AutoIt translates it's syntax into a C style language.  Naturally, programs written in C to begin with can be faster and more efficient.  Is FBSL a layer on top of C?(Sorry my terminology is way off... I'm not a dedicated programmer, just a VBA/AutoIt scripter!) 

Kevin

Interesting question :)
One year ago, FBSL was into its V2 that is now dead and burried because of too much slow procedures and too much RAM greedy...
We (the FBSL Team) decided to rewrite FBSL from scratch months ago.
This time, all is written in pure C ANSI C89 && C99 + AT&T ASM.
FBSL is still an interpreter but this time compared to V2, the V3 is barely 1000 times faster!
Inner maths routines are AS fast as pure C code.
Externally, loops & co are somewhat as fast (or sometimes more) faster than a VB compiled native code!
FBSL is not compiled because the purpose is keeping the best flexibility that you can't have with a real compiled language : we have axed our language onto flexibility and ability to play recursively and infinitely Fbsl code that is able to interpret Fbsl code that is to interpret Fbsl code etc...
Infinite depth, Classes, virtual functions are possible in FBSL!
Say what ?
Still not have your ow copy?
Rhoooo... bum rush the show ;)

145
Developer's Corner / FBSL - Net Send grabber + logger
« on: February 07, 2006, 04:55 PM »
Hello,

Sometimes, when you're at office without admin rights or poweruser rights, you are feeling kinda bitter...
And to send messages to your collegues, you have to use the NET SEND mycollegue TheMessage blahhh
to discuss a bit...
Yes, but exchnaging those kinda msg is heavy and not convivial, plus you can't grab the text that is just popped at screen...
I've found a solution !

I've developped a tiny GUI application that is in charge of scruting for incoming net sended messages, grabbing its very content, redirecting the message into a richedit control + logging the very content of the popped messages + closing the popped message !!!

Here's a screen shot of a just grabbed popped message :


Here's the main script that does the trick :
#Option Explicit
#DllDeclare User32( "EnumWindows", "GetWindowText", "GetWindowTextLength", _
                    "GetDlgItem", "SetFocus", "FindWindow", "FlashWindow" )

' // Replace with the correct translation here
Const service = "Service Affichage des messages "
Const sep     = "--------------------------------------------------------------------------------"
Const STYLE = WS_CHILD + WS_CLIPSIBLINGS + WS_VISIBLE + WS_HSCROLL + WS_VSCROLL + ES_MULTILINE + _
              ES_AUTOVSCROLL + ES_AUTOHSCROLL + WS_TABSTOP
LoadLibrary("Riched20.dll")
Dim %H = 420, %W = 220, $sGet, %fp
Resize( Me, 0, 0, H, W )
Dim hwndInput = FBSL_Control ( _
         "richedit20a", Me, "", 1000, 20, 20, H-40, W-40, STYLE, WS_EX_CLIENTEDGE )
Fbsl_settext( Me, "NET Send Capturer / logger" )
SetTimer(Me, 3615, 100)

fp = Fileopen( ".\Capturer.log", Append )

Center(Me): ResizeMe(): Show(Me)

Begin Events
    If cbmsg = wm_close Then
        Killtimer( Me, 3615 )
        Fileclose( fp )
        Exitprogram(0)
    End If
    If cbmsg = wm_timer Then
        MyGetNetSend()
    End If
    If cbmsg = wm_size Then
        ResizeMe()
    End If
End Events

Sub MyGetNetSend()
    Dim %hwnd = FindWindow(Null, service )
    Dim %Ret = GetWindowTextLength(hwnd)
    If Ret > 0 Then
        Dim $sSave, %hdlg
        sSave = Space(Ret)
        GetWindowText( hwnd, sSave, Ret + 1 )
        If Left(sSave, Len(service)) = service Then
            ' // Message Window
            hdlg = GetDlgItem( hwnd, 0xFFFF )
            Ret = GetWindowTextLength(hdlg)
            sSave = Space(Ret)
            GetWindowText( hdlg, sSave, Ret + 1 )
            Sendmessage( hwnd, WM_CLOSE, 0, 0 )
            Fbsl_Gettext( hwndInput, sGet )
            sGet = sGet & sSave & CrLf & sep & CrLf
            Fbsl_Settext( hwndInput, sGet )
            Fileprint( fp, sSave )
            FlashWindow( Me, True )
        End If
    End If
End Sub

Sub ResizeMe()
Dim %TopWin, %leftWin, %RightWin, %BottomWin
   GetClientRect(Me, TopWin, leftWin, RightWin, BottomWin )
   Resize( hwndInput, 20, 20, RightWin - 40, BottomWin - 60 )
End Sub

The only thing to adapt into that script will be this only line :
Const service = "Service Affichage des messages "

It was tested onto : NT4, Win2k and WinXP French versions with success :)
And what about you ? :)

Tell me please :)

146
Developer's Corner / All about FBSL!
« on: February 07, 2006, 03:46 PM »
Dear All,

I'm quite new here, i won't bother you, but i've noticed since i've been greatly granted to this wonderful place, that some people have been interested in my language aka FBSL

So, any remarks, questions, scripts and tidbits would be very welcomed here.

147
Yo Ed!

I like your frank discuss :)
We can have a chat onto DC's IRC chat if you want, i can show you the deepest things that FBSL holds!

148
Living Room / Re: What's your "Autism Quotient"?
« on: February 07, 2006, 02:58 PM »
17 for me :)
I'm saved ;-P

149
Post New Requests Here / Re: MP3 HTML Generator
« on: February 07, 2006, 06:46 AM »
Hi,

The thing I need is a software that can

1) generate MP3 list by tags
2) Sort it according to User defined order of Album, genre, artist, etc
3) generate an meaningful output or say organized output on html or text, html prefferd.
4) more over just go through the screenshots of the software and see how it produces lists. I just want a soft copy of my mp3s in a list just a list not want to develop a webpage as MP3 HTML Generator is good for making a webpage.



This can be done easily using FBSL with :
- Reading MP3s and extracting their TAGs
- Storing each MP3 tag into a, fbsl String Collection
- Once the directory has been crossed, we can Qsort our collection(s) and output the content into a CSV file or into an XML file or HTML file :)

150
Developer's Corner / Re: XML Class
« on: February 07, 2006, 05:18 AM »
Hi,

i'm going to move this to coders corner.

Ok, thanks :)
Don't forget to test all of my samples with my online compiler :)
http://gedd123.free.fr/studio <- Fbsl Online compiler!

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