I like to visit the CG Society website from time to time, as it is community for 2D/3D artists and many tallented people post their work there.
There is one problem thought - when you open one of the galleries, it is organised in threads. So to see all images added since your last visit, you have to open each thread, wait till it loads, and it sometimes even timeouts...
To overcome this impractical browsing, I used INet module to download the forum page source code to memory without images (via INET_URLGetString), then I analyze it using string functions (GRAB$) for threads and its images, and create simplified view for me (creating custom HTML file on the fly) - just images and their titles (like in more classical gallery).
As the discussions around images on CG are sometimes interesting, I made the output in a way, that when you click the image, it takes you to the full version of the thread. Via context menu you can always get back.
It is not the most complex program ever made , but I think it can demonstrate how to use ThinBASIC for customizing the web browsing experience.
I attach the sources here, controls are simple, just click one of the buttons (3D / Stills for example), wait a bit for the load, and then you can enjoy the images without hectic thread opening.
The image count setting in the bottom part of the window allows you to setup how many images do you want to download.
The source code is organised to 3 files:
- CGSociety_GalleryBrowser.tBasic - application itself
- CGSociety_WebsiteHandling.tBasicU - specific routines to manage CG Society website forum
- Control_NeatButton.tBasicU - specific routines for label-based flat button, which can "hold" string information
Petr
Bookmarks