Nearly there!
This is my code
Public FromMyFile as String
Public GameCode as String
Private Sub CommandButton2_OnEvent()
FromMyFile = OpenDialog.GetFile()
If FromMyFile Then
GameCode = FromMyFile
End If
Dim GameCode as String
Dim ReturnCode as Integer
'GameCode = ("/home/peter/Desktop/Gamelibrary/KasTopImm.pgn")
ReturnCode = shell("/usr/games/xboard -fcp crafty -lgf " & GameCode & " -scp crafty", FALSE)
End Sub
The file dialogue GUI shows up ok, but when you click on the file you require, the GameCode String is set to the files name only, it needs to show the path to the file as well, like the dummy example. (The bit I have commented out)
I have been using the xboard and crafty combination for a good few years now and it has always annoyed me, that to see games and analyse them I have had to copy and paste them into xboard which is much more laborious than just clicking on them. Also when I get everything up and running, I will share my code with the Linux chess community.