Perform shell in terminal window

Is there a way for performing a shell command, from xojo, but inside a (new) Terminal window, so that the terminal window remains open?

dim s as new shell
s.execute("osascript -e 'tell app ""Terminal"" to do script ""ls""'")

Thereā€™s probably a more ā€œlegitā€ way that some of the mac peeps here might be able to help with, this was after a quick google as Iā€™m not a mac person.

thanks Julian, works!

For private usage thatā€™s fine. For a distributed application you want to check security/permission.

See this example project: Xojo Code Example: Using Applescript for Automation

1 Like