In my app, I wish to open a text file with the default text editor of the system. Please, how to do ? I know with bash, but is there a native Gambas command ?
Code: Select all
xdg-open myfile.txt
Code: Select all
xdg-open myfile.txt
As an alternative, take a look at "TextEditor" in the component: gb.form.editor
Shell "xdg-open PathToMyFile.txt"
Or
EXEC ["xdg-open", "PathToMyFile.txt"]
Public Sub Button1_Click()
Desktop.Open("/path/to/myFile.txt")
End
or by using "DesktopFile" Class of "gb.desktop" Component:
EXEC["libreoffice","--writer example.txt"]
Command line applications for the various formats of Libre Office.EXEC["localc","example.csv"]
Full command line list can be found here.