Opening a File to view

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
hrcap
Posts: 141
Joined: Mon Jan 14, 2019 5:20 pm

Opening a File to view

Post 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
SparkOut
Posts: 2988
Joined: Sun Sep 23, 2007 4:58 pm

Re: Opening a File to view

Post 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)
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10430
Joined: Fri Feb 19, 2010 10:17 am

Re: Opening a File to view

Post by richmond62 »

Let me guess . . .

. . . you are trying to write a file browser in LiveCode ?
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10507
Joined: Wed May 06, 2009 2:28 pm

Re: Opening a File to view

Post by dunbarx »

Hi.

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

Craig
hrcap
Posts: 141
Joined: Mon Jan 14, 2019 5:20 pm

Re: Opening a File to view

Post 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
Post Reply