Text from a card to a file and back again

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
wilhelmeros
Posts: 1
Joined: Thu Nov 20, 2008 8:06 pm

Text from a card to a file and back again

Post by wilhelmeros » Thu Nov 20, 2008 8:12 pm

Hello to all,

i am new in revolution.
How can i save text from a field on a card in a way, that if i start my app the text is shown on the right place again.

who can help me?
Great regards
wilhelmeros

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Thu Nov 20, 2008 8:38 pm

Hi wilhelmeros,

Why do you want this? If you are using a stack that is not part of a standalone, you can just save your stack with the information in the field.

Anyway, this is a way you could do this.

Code: Select all

on closeStack
  put fld x of cd y into url ("file:" & <path to your file>)
  pass closeStack
end closeStack

on preOpenStack
  put url ("file:" & <path to your file>) into fld x of cd y
  pass preOpenStack
end preOpenStack
This is one of many possible ways. We might come up with something else, if you tell us why you need this.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply