The official release of XL Share Board is right around the corner. The beta has been a huge success and I’ve been surprised with how easy it’s been to develop the application in RealBasic. I started to wonder how feasible it would be to port one of my existing applications to Mac OS X using RealBasic so I decided to try and port XL Screen Streamer. I knew the two hardest pieces would be taking and compressing screenshots and the web server.
I already had a basic web server in XL Share Board that I could extend so I took a couple of hours improving the file delivery functions and adding features to track users and amount of data transferred. I wanted the server capabilities to be comparable to the Windows version. I was able to get about 80% of the features the web server in the Windows version has which was enough to let me move forward.
RealBasic does not have support for taking screenshots out of the box and most of the examples I found seemed like little hacks. Luckily I had been looking at the MBS Plugins which have several functions for taking screenshots so I decided to give that plug-in suite a try. The MBS Plugins were a life saver, the screenshot functions worked great and offered both full screen and region based screenshots. They also included the ability to create overlay windows which is what the Windows version currently uses to allow you to select a region to capture and to draw the selection highlight border. The other big thing they provide are several image manipulation functions which include image compression. So I was able to quickly implement the screenshot routines with compression and the ability to choose a region to capture using the overlay window.
In just one Saturday I had a working port of XL Screen Streamer with most of the major features fully working using the same viewer clients as the Windows version. I need to add some polish and implement a couple of other features but XL Screen Streamer for Mac will be coming to the Apple App Store soon.

I am very excited about my first cross platform application. It’s called XL Share Board and it lets you share text from your clipboard and files (using drag and drop) with any Windows or Mac OS X computer on your network. I built this app because I am constantly going back and forth between my Windows 7 laptop and my iMac and always found myself needing to copy and paste text between the two. It’s built in RealBasic and it was actually a lot easier than I expected. I was able to finish a prototype in a couple of days and had it working in Windows and OS X in about a week. The Windows and OS X apps are lightweight and have no dependencies whatsoever. I might even be able to make a portable version of each. I definitely recommend RealBasic to anyone who wants to quickly make some cross platform applications.
It is currently in beta but you can read more about it and/or download the beta here.
I was working on a RealBasic project last night and found myself needing a URL encode/decode routine. RealBasic does not have one and I was not able to find any sample online, so I decided to look for a quick and dirty Visual Basic routine and convert it to RealBasic. It’s not the most elegant solution but it met my needs. The original VB code by Igor can be found here.
URL Encoding Converted to RealBasic:
Function URLEncode(s as String) As String
Dim TempAns As String
Dim CurChr As Integer
CurChr = 1
Do Until CurChr - 1 = Len(s)
Select Case Asc(Mid(s, CurChr, 1))
Case 48 To 57, 65 To 90, 97 To 122
TempAns = TempAns + Mid(s, CurChr, 1)
Case 32
TempAns = TempAns + "%" + Hex(32)
Case Else
TempAns = TempAns +"%" + Right("0" + Hex(Asc(Mid(s, CurChr, 1))), 2)
End Select
CurChr = CurChr + 1
Loop
return TempAns
End Function
URL Decoding Converted to RealBasic:
Function URLDecode(s as String) As String
Dim TempAns As String
Dim CurChr As Integer
CurChr = 1
Do Until CurChr - 1 = Len(s)
Select Case Mid(s, CurChr, 1)
Case "+"
TempAns = TempAns + " "
Case "%"
TempAns = TempAns + Chr(Val("&h" + Mid(s, CurChr + 1, 2)))
CurChr = CurChr + 2
Case Else
TempAns = TempAns + Mid(s, CurChr, 1)
End Select
CurChr = CurChr + 1
Loop
return TempAns
End Function
One change to note from the original is that I made the encoding routine always convert “+” to its hex equivalent.