SRP Utilities is a free conglomeration of tools to make life for the OpenInsight programmer easier.
The dynamic array is the corner stone of the BASIC+ language. Simple array manipulation is elegantly and efficiently handled by the OpenInsight engine. However, there are a few tasks that become inefficient due to complexity or limits of the interpreted language. SRP Utilities offloads much of this to the SRPUtilty.dll for easy, fast processing.
There are several array manipulation services at your disposal thanks to the SRP_Array function. The Clean service quickly removes blanks and duplicates from your array, and Join builds a new array that is a logical combination of two arrays. Need to prepare a two-dimensional array for use with V119? Use the Reorder service to rearrange your columns, then use Rotate to turn an ARRAY into an LIST. Both functions perform at incredible speeds not possible in the BASIC+ function. Better yet, forget using V119 and use the SortRows or SortSimpleList services instead. Doing so will eliminate the need to prepare your data altogether. And they’re fast!
These days, most applications need to interact with the Windows registry. SRP_Registry makes it all very easy. This single function offers a handful of services, like the Utility function in OpenInsight. The EXISTS service determines if a key or value exists. The LISTVALUES and LISTKEYS services enumerate registry entries. You can read from the registry using the READ and READDEF services and write to the registry using the WRITE service. Lastly, you can delete from the registry using the DELETE service. You get easy to use and easy to read error checking to boot.
Controlling how your windows appear is another important facet of application development. SRP Utilities makes window management and control easier with a few additional functions. The SRP_Set_MinMaxInfo function allows you to constrain a window’s size and location, while the SRP_Show_Window function lets you display windows taking into account differences in user themes. Use the SRP_Set_SysColorChange function to ensure your windows and controls update their colors when the user changes the system’s colors.
Need to run an external command or executable without seeing the ugly DOS window? Use the SRP_Run_Command to run external commands and reroute the output to BASIC+ or an OpenInsight edit box. Or use it simply to avoid seeing that ugly DOS window. No matter how you use it, your application looks good. Did we mention how ugly that DOS window is?
Sometimes, you may find yourself needing to copy data into a WinAPI structure for which you only have a pointer. The SRP_Copy_Memory method solves the problem by letting you perform direct byte-for-byte copies from BASIC+ variables to WinAPI pointers. Use with caution.
While there are screenshot capabilities built into windows, and even some great third party products, they usually involve several steps. With SRP_Save_Screenshot, you can programmatically take a screenshot, save it to a bitmap file, and use it as you wish. For example, you could allow the use, with a single click, to print the screenshot of a window directly to a printer using OIPI.
The windows taskbar is usually off limits to programmers, but there are times when we want to access it’s behavior in order to provide feedback to the user. With the SRP_Taskbar method, you can do just that. For example, you can change the text that appears when the taskbar groups your application into a single button.
Network communication is vital in today’s application, and sometimes we need to talk to a remote service in a low-level way. SRP_TcpClient makes it simple to connect to a remote TCP/IP socket and send it data. It also simplifies communication with the SRP Engine Service.
If you use Win32 API calls a lot, then you have certainly encountered the frustration of one such call returning data that OI was not able to convert from it’s internal Win32 type into OI. We’ve got you covered with SRP_Win32_To_OI and SRP_OI_To_Win32.
Need to know if the user has been away from the computer for a while? Use SRP_Get_IdleTime to determine the amount of time the user has not touched their mouse or keyboard. Useful if you need release resources that are tied up due to end user neglect.
The SRP Utilities library includes cryptography support. Generating check sums for verification and digital signatures can be achieved using the SRP_Hash function. Need to encode binary data in a format suitable for transfer or printing? Use the SRP_Encode and SRP_Decode functions. All cryptography functions are flexible, fast and secure.
If you need to break beyond the 32-bit barrier when performing math on decimal numbers with more than 16 digits, turn to the SRP_Math function. It provides over 40 operations that and can handle any number of decimal places.
XML has become quite ubiquitous in the programming world, which is usually good news for OpenInsight developers. After all, multivalue data maps naturally to XML structures and the string processing power of BASIC+ makes it easy to generate XML data on the fly. However, pulling XML data out in a meaningful way usually requires tedious work that could be easily avoided using modern conventions. SRP_Extract_Xml uses the XPath query language to extract data from an XML file using one line of code.
COM functionality was built into OpenInsight in 7.2, but the developers at SRP have encountered the need to access COM objects for clients unwilling to move out of older versions of OI. SRP_Com works in any version of OpenInsight. We’ve tried to make it streamlined and easy to use, so you may even consider using it in newer versions of OpenInsight as well.
Pricing and Licensing
SRP Utilities is FREE. The developer is permitted to use this license in any supported development and deployment system.