PureBasic Survival Guide XXIX - Projects
PureBasic Survival Guide
a tutorial for using purebasic for windows x.xx

Part 0 - TOC
Part I - General
Part II - Converts
Part III - Primer I
Part IV - Primer II
Part V - Advanced
Part VI - 2D Graphics I
Part VII - 2D Graphics II
Part X - Assembly
Part XI - Debugger
Part XII - VirtualBox
Part XIII - Databases
Part XIV - Networking
Part XV - Regular Expressions
Part XVI - Application Data
Part XXVII - Irregular Expressions
Part XXIX - Projects

Part XXIX - Projects
v9.01 29.05.2017

Functional stand-alone

101. Wakiewakie
102. WallX
103. SQB

Purebasic and / or programming

201 CodeCaddy
202. REval
203. td_lib
204. x_lib


301. Runalot
302. Sweetspot

29.0 Projects & Applications

Functional stand alone programs

A few applications that I wrote and may be useful to others.

Purebasic or coding related

These programs are specifically related to programming, or to PureBasic itself.

Experimental or discontinued

Stuff I fooled around with, or plan to return to some day...

29.101 Wakiewakie


What it is

A WOL tool aimed at HTPC owners, or users of other client / server setups that require the server to be awoken.

Primary difference between Wakiewakie and other WOL tools is ease of configuration, detection of assigned IP addresses, and a (self adjusting) progress indicator.

What it does

  1. Makes sure the local (client) machine has a valid address
  2. Ping some always on device (typically a router)
  3. Send a WOL to a certain mac address (typically the network card of the machine to wake up)
  4. Ping the server (to make sure it's awake)
  5. Return control to the user (or a batch file)
  6. Create a desktop shortcut with all options set



Just start the executable.When using the 'history' option Wakiewakie will create one additonal file called wakiewakie.his in the same folder as the executable.


There is a build-in and external (text) help file, and all fields have tool-tips.

Additional information

29.102 WallX


What it is

A wallpaper tool (not a wallpaper manager!) aimed at multi monitor setups and virtual machines.

WallX is a small utility I wrote after fooling around with VirtualBox. It creates backgrounds 'on the fly' allowing quick identification of different VM's, and also loads proper scaling random wallpapers, regardless of (multi) monitor resolution or orientation. Scroll down to see 'dual monitor auto resizing auto cropping wallpaper' in action...


What it does

  • Create background images for better identification of multiple machines, for example VM's.
  • Load selected or random wallpapers and resize them properly to match your multi monitor setup.
  • Detects IP and screen changes when in resident mode.
  • Runs on Windows98, XP 32, Vista 64, Windows 7, 8, 10.
  • Auto crop / stretch loaded wallpapers to match single and dual monitor setups.
  • Allows a set of 'preferred pairs' by creating a file wallx.set.
  • Automatically renew your wallpaper when you're inactive.



Unpack and copy the file wallx.exe to a comfy place. Starting the program without any command line options will bring up a little help screen.


There is a build-in and external (text) help file, and all fields have tool-tips. Start the program without any command line options, or use the option 'help' and you will get a little help screen.

Remember to add 'start' if you want to run resident.

For a quick trial run, unpack all files and doubleclick on runme.bat.

Additional information

The new (v1.70x) GUI (which doesn't look that sexy, I know...):

Here are some example images created with WallX:

wallx.exe blue mark "MEDIASERVER" resident

wallx.exe base dots text "BASE IMAGE | WIN 98 SE UK | NOT FOR REGULAR USE | ~host~ ~ip~"

wallx.exe red big 1

wallx.exe traffic fade big 2 dots text "MAIL SERVER | ~host~ - ~ip~"

And two examples of multi monitor wallpapers with transparent text superimposed:

wallx.exe monitor 0 load c:\software\wallpaper\an_evangelion.jpg monitor 1 load c:\software\wallpaper\an_eureka7_1.jpg monitor all transparent big ~ip~ text "TEST | ~host~ ~ip~ " 

wallx.exe load c:\software\wallpaper\2h_mountain_lake.jpg dots transparent big ~desktop~ text "MONITOR ~desktop~ | ~timestamp~" fade

29.103 SQB


What it is

A .M3U playlist manager / tool for the SqueezeBox LMS. Only of use to SqueezeBox or other .M3U users.

With this you can manage your playlists, and export and convert (all songs on) a playlist to easily copy them to, for example, a portable MP3 player, a phone, or a memory stick or card to use in your car.

This is the first version ever. So be gentle :-)


What it does

  • Check and modify (SqueezeBox) .M3U playlists
  • Help detecting missing files
  • Simplify exporting and converting all songs in a playlist to a specific folder



  • Unpack and copy the SQB folder anywhere you like
  • Run SQB.exe
  • Make sure to set all proper paths on the preferences tab


  • Nothing yet. But it works :-)
  • Note that SQB uses Sox for FLAC to MP3 conversion, see the Sox folder for more details on Sox
  • Most MP3 patents have expired by now, except for the US, where the final patent will expire December 2017
  • Sox requires some additional DLL's to handle MP3's, they are included
  • You're not allowed to use these DLL's in the US, but you could rebuild the DLL's or Sox itself using the source which is freely available on the Internet
  • Do you know about EncSpot?

Other information

29.201 CodeCaddy


What it is

Who's your daddy? CodeCaddy! An add-on for the Purebasic IDE, that even The Hoff would use!

  • In silly words: CodeCaddy is an instant context related reference search tool, backup assistent, multiline construction enhancement and code synchronizer / reformatter. Pfff.
  • In real language: a smart search that looks in your current code as well as all other files, and shows the results in a seperate window. Plus, it brings a couple of tools along.
I'm not sure if CodeCaddy did inspire the Purebasic devs to improve their IDE (but it's nice to flatter oneself) or if great minds think alike (which in my case would then also apply to small minds :-)) but most of the features of CodeCaddy have made it in this or some other form into the IDE. I still use CodeCaddy for its backup mechanism, look-up feature, and 'unused' code stripper.


What it does

  • looks for any occurancies of specified code or keywords in all sorts of files
  • create numbered backups (jaPBe style with a little pizzaz) in a dedicated backup folder using .cdy and .bak files
  • installs itself in the PureBasic IDE tools menu, but only if you tell it to
  • synchronizes two folders taking .cdy .pb .bak files in account (good for bringing your code with you)
  • adds build date, build number and save number constants on compilation time (like PureBuild, only better ;-))
  • flatten multiline sections, ie. lines ending on '_'
  • searches the web from within the PureBasic IDE
  • removes unused code before compilation
  • free, indefinitely
If you really really really want to compare CodeCaddy with other tools, it's a little of...
  • PureBuilder
  • CodeArchive search
  • Constant explorer
  • Code reformatter
  • Alt+F1
... all rolled into one. Sort of. In fact, I never felt the need for any of the above since I wrote CodeCaddy :-)



Did I mention there was some documentation inside the download? :-) Anyway, there are several ways to try CodeCaddy, and eventually install it. Here are a few options...

The 'lazy' way

CodeCaddy can install itself if you want, more for the lazy people:

  1. download codecaddy.zip
  2. unpack, copy codecaddy.exe in your PureBasic folder
  3. run it
  4. use the menu option Tools / Install in IDE

The 'I wanna' know all' way

  1. download codecaddy.zip
  2. unpack, copy codecaddy.exe in your PureBasic folder
  3. run it
  4. press the help button
  5. follow the instructions

The 'I love my DOS box' way

  1. download codecaddy.zip
  2. unpack, copy codecaddy.exe in your PureBasic folder
  3. open a command box / dos box / shell prompt whatever
  4. cd to your purebasic folder
  5. execute: codecaddy find "<pb file name>" "<search phrase>"

The 'I don't trust you with my editor preferences anyway' way.

  1. download codecaddy.zip
  2. copy codecaddy.exe into your pb folder
  3. run codecaddy.exe
  4. select the menu Options / Preferences
  5. go to the tab Search
  6. select the top 'asterix' button (the one behind the 'Basic' section)
  7. select your PB folder, or a folder where you save all your PureBasic source files (anything ending on .pb will do)
  8. leave preferences with Ok
  9. hit the F2 key (search)
  10. enter the first letters of a procedure or variable name that you know of
  11. hit Start

  12. in the resulting window the top half shows all hits, the bottom half shows the related code


  • On-board documentation
  • Example usage in flash (can be viewed from within CodeCaddy)...
  • Horrible download or youtube video showing how to use it. (Apologies for the quality, and make sure you buy the FireFly DVD afterwards!)

Additional information

The Hoff

For more information on The Hoff, go here... Don't forget to ask :-)


CodeCaddy has been used extensively in writing CodeCaddy :-) CodeCaddy itself was originally written in PureBasic 4.4x (but I've been recompiling it on any version of Purebasic ever since), and works on:

  • Windows XP
  • Windows Vista
  • Windows 7
  • Windows 8
  • PureBasic 3.94
  • PureBasic 4.xx 5.xx (thus far on all versions)
I dropped Windows 98.

Example use

  • How did I name that variable?
      1. from inside the PB IDE, first start CodeCaddy with [Control]+[F1]
      2. then hit [Control]+[F] (tell CodeCaddy to search for a certain term)
      3. enter the search phrase and hit [Enter]
      4. CodeCaddy will list all occurances in your current code, in your includes, and in any other paths if specified
      5. CodeCaddy will colour code and categorize the results, so you can easily spot procedures, structures, constants and variables
      6. you can scroll through the results using the up/down key, and the found match will be shown in it's context

  • I need to look up an example of a keyword / function...
      1. inside the PB IDE, move the cursor on top of the word you're looking for
      2. then hit [Control]+[F1]
      3. and CodeCaddy will list all matches, and you can easily view details on each of them
      4. (and suddenly it's a good idea to put some remarks in your collection of procedures at the start of each procedure :-))

  • I need to look up an example of a keyword / function on the InterNet...
      1. inside the PB IDE, move the cursor on top of the word you're looking for
      2. then hit [Alt]+[F1]
      3. and CodeCaddy will launch your browser and specified searches

  • What was the value of that constant again?
      1. as before, nothing to stop you from including a file with PB or Windows constants, or any other text file
      2. so start CodeCaddy, hit the [Control]+[F] and enter that phrase
      3. CodeCaddy splits the search in two stages, it halts between these two stages, waiting for a keypress to continue
      4. you can specify additional files or paths in CodeCaddy under Options / Preferences / Search...
      5. ... include, for example, files with PB constants, or a C compiler's .h file, or anything else in Ascii
  • My code is all messy! Let's clean it up then!
      1. then let's reformat your code!
      2. inside the PB IDE, hit [Alt]+[R]...
      3. ... and all code will be nicely indented
  • Keeping track of version and build numbers is easy...
      1. CodeCaddy keeps automatically track of each build and version by storing some information in a .CDY file...
      2. ... which is updated on every save and every build
      3. use two special constants to use this information inside your program
  • Maintaining multiple backups so I won't accidentally overwrite my (older, working) source code is a chore. No, it's not!
      1. CodeCaddy automatically creates backups of your source file in a dedicated folder
      2. and numbers each backup subsequently, so you can return to an older version of your source even after multiple edits and runs
  • Can I bring my sources with me? And stop worrying about overwriting a newer version with some older code once I start lugging code around?
      1. define two folders in CodeCaddy (Options / Preferences / Other/ CodeSync)
      2. hit [F9] and both will be synchronized
      3. CodeCaddy will ask you for confirmation if it can't figure out what is the latest version (using not only the timestamp but also information in the associated .CDY files)
To be honest, I find it very hard to explain. Just use it and see for yourself, move the cursor over something you need to know more about, and hit [Control]+[F1] or [Alt]+[F1]and watch the magic.


CodeCaddy on Windows XP classic.

Some fields in the Preferences window.

CodeCaddy on Windows XP 'themed'.

29.202 REval


What it is

REval is a simple Regular Expression tool I often use to validate regular expressions in my code. As reval is writtin in PureBasic using the same regular expression engine I know the results in my code will match those in REval.


What it does

  1. Type your regular expression in the top bar, and type or paste the lines you want to test in the bottom box.
  2. If the regular expression is a valid one a green square will light up, and if any of the 'test subjects' qualify they will be hightlighted.



Just run it.


29.203 TD_lib

What it is

A collection of algoritms related to thermo dynamics.

What it does

Interested in thermo dynamics? Well, I'm definitely not, but I needed some formulas for my work. This file contains a number of collected routines, scavenged from the web, and converted to PureBasic. All credits go to Schlatter / Baker / Kuemmel / Strijk and many others, listed in the source. Any mistakes are likely mine.

Criticasters may notice that my conversion to PureBasic is anything but efficient, I've just tried to stay as close as possible to the original Fortran code to simplify debugging using the included examples of Schlatter and Baker. And as I know close to nothing about Fortran and even less about thermo dynamics you can see my problem... Use at your own risk.

The full conversion is not entirely done, I think I've done 70% or so, which included all the routines I needed. Feel free to work on the remainder :-)


  • Download tdlib.zip - source code with some examples

Additional information

This is not a .lib file but a regular PureBasic include file.

29.204 X_lib

What it is

A collection of different procedures I use in several projects.

What it does

Not much by itself.


I do not maintain a seperate x_lib archive. If you need the latest version, please download CodeCaddy and copy the appropriate folder(s) from the source.

Additional information.

  • This is not a .lib file but a regular PureBasic include file.
  • This code is not multi-threading safe.

29.301 Runalot

What it is



What it does

Little tool to open a set of URL's at once. I used this in the past to hunt Ebay and Marktplaats for bargains, and open a few of my favorite websites as well.


  • Download runalot.zip - source code with some examples

29.302 Sweetspot

What it is