Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3816

Open a file with TextEdit

$
0
0

Hello,
I am trying to launch a file, SpecialFolder.Desktop.child(“links.txt”), programatically with TextEdit, it does not launch but the message box is displayed.
What could be the problem?

Dim document As FolderItem
Dim TextEditApp As FolderItem = SpecialFolder.Applications.child("TextEdit.app")
document = SpecialFolder.Desktop.child("links.txt")
// https://forum.xojo.com/t/launch-and-open-file/54435/2
dim sh as new shell
dim command as String = "open -a " + TextEditApp.ShellPath + " " + document.ShellPath
sh.Execute(command) // Does not work
msgbox "Button pressed"

This link is closed Launch and Open File - #2 by Christian_Mézes

Thanks in advance.

Lennox

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3816

Trending Articles