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: FourthWorld, heatherlaine, Klaus, kevinmiller

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

Opening a File to view

Post by hrcap » Sun Sep 18, 2022 3:31 pm

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: 2852
Joined: Sun Sep 23, 2007 4:58 pm

Re: Opening a File to view

Post by SparkOut » Sun Sep 18, 2022 3:40 pm

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: 9389
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Opening a File to view

Post by richmond62 » Sun Sep 18, 2022 3:56 pm

Let me guess . . .

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Opening a File to view

Post by dunbarx » Sun Sep 18, 2022 5:15 pm

Hi.

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

Craig

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

Re: Opening a File to view

Post by hrcap » Sun Sep 18, 2022 5:34 pm

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

Return to “Getting Started with LiveCode - Complete Beginners”