by Richard Russell, September 2013

To open the Windows On Screen Keyboard from an LBB program use this code:
files "c:\windows\sysnative\", "cmd.exe", info$()
if val(info$(0,0)) then
  run "c:\windows\sysnative\cmd.exe /c osk.exe", hide
else
  run "cmd.exe /c osk.exe", hide
end if
The reason for this complexity is that the 32-bit version of OSK.EXE supplied with 64-bit Windows 7 does not run (this issue appears to have been fixed in Windows 8). Therefore it is necessary to force the 64-bit version to be run, which is the purpose of the above code.

If you want the code also to be compatible with Liberty BASIC 4.04, DIMension the array at the start:
dim info$(0,0)
files "c:\windows\sysnative\", "cmd.exe", info$()
if val(info$(0,0)) then
  run "c:\windows\sysnative\cmd.exe /c osk.exe", hide
else
  run "cmd.exe /c osk.exe", hide
end if