Page 1 of 1

Opening a File to view

Posted: Sun Sep 18, 2022 3:31 pm
by hrcap
Hi Guys

I hope that everyone is well.

Probably quite a simple one bu I cant find anything on it.

If I have a file on e.g. my desktop and the path to the file is in e.g. t_path how do I open that file...

so for example if t_path was a Microsoft Word document how do I get the file to open in Microsoft Word

or if the file was an iCal (.ics) file how do I open it so it displays in Calendar.


.... in layman's terms I want to achieve the same as when I double click on the file on my desktop.


Many Thanks

Re: Opening a File to view

Posted: Sun Sep 18, 2022 3:40 pm
by SparkOut
If I have understood correctly, I think you will want to investigate

Code: Select all

launch (t_path)
--or
launch document (t_path)

Re: Opening a File to view

Posted: Sun Sep 18, 2022 3:56 pm
by richmond62
Let me guess . . .

. . . you are trying to write a file browser in LiveCode ?

Re: Opening a File to view

Posted: Sun Sep 18, 2022 5:15 pm
by dunbarx
Hi.

Aren't we talking about the "open file" command?

Craig

Re: Opening a File to view

Posted: Sun Sep 18, 2022 5:34 pm
by hrcap
Hi Guys

Thank you very much, I had tried Open File, and Launch, hence why I was a a bit stuck... I've just tried your suggestions of Launch Document and that works perfectly thank you.

Its for a booking system, once the date is booked into the system it will then give the option to add the entry to the users Calendar on their computer.


Many Thanks

Hadleigh