Opening a stack with its filename ?

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
Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Opening a stack with its filename ?

Post by Zax » Thu Aug 19, 2021 1:51 pm

Hello.

A stupid question: I'm trying to open a stack (not a standalone) from another stack in the IDE but I only know its filename, something like ../Dev/LiveCode Revolution/MyStack_300.livecode
Of course, this stack's name is not its file name and I don't know how the built-in "Open Stack..." menu article works.

Code: Select all

on mouseUp
   get "../Dev/LiveCode Revolution/MyStack_300.livecode" -- valid file path pasted from the Finder
   if there is a file it then
      go to stack URL it -- > nothing happened
      launch it -- > nothing happened
      open stack it -- > nothing happened
   else beep -- never heard, so the file exists
end mouseUp

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

Re: Opening a stack with its filename ?

Post by dunbarx » Thu Aug 19, 2021 2:01 pm

Hi.

If your stack is not in memory in the current session, the command:

Code: Select all

go stack "pathnameToYourStack"
will certainly work.

Are you sure you have the pathname correct?

Craig

Zax
Posts: 457
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: Opening a stack with its filename ?

Post by Zax » Thu Aug 19, 2021 2:04 pm

Hi Craig, your reply was too fast, so I can't delete my own post!
You're right, the problem was not teh command, but the stack that was opened but invisible.
Thanks anyway.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”