Wrote this small script to optimize a device string for Hstouch display;
still learning to script VB so pretty sure there is a cleaner way to get the same result, open to ideas to optimize this:
Sub Main(ByVal Parms as String)
"O 32 km/h rafale 46 km/h"
becomes
"O32-46"
still learning to script VB so pretty sure there is a cleaner way to get the same result, open to ideas to optimize this:
Sub Main(ByVal Parms as String)
Code:
Dim X As String = hs.DeviceString(2405) Dim Y As String Dim Z As String Dim A As String Y = Replace(X, "km/h", "") Z = Replace(Y, "rafale", "-") A = Replace(Z, " ", "") hs.SetDeviceString(8622, A, true) End Sub
"O 32 km/h rafale 46 km/h"
becomes
"O32-46"
Comment