Various questions

Klaus kmajor at metascape.org
Tue Jan 29 08:55:01 EST 2002


Bonjour Yves,

> What's the difference between setting the directory or setting the
> default stack ?

a big one ;-)


Setting the default stack just "re-directs" all (following) commands
to that stack.

Example:

There is stack "A" with an image that you want to show and hide.

But you want to do that in a script that is stack "B"

So you would script (somewhere in stack "B"):

on xxx
  hide image "xxx" of cd 2 of stack "A"
   wait 10 secs
   show image  "xxx" of cd 2 of stack "A"
   ...
end xxx


Or better (less verbose):

on xxx
   set the defaultstack to "A"
   hide image "xxx2 of cd 2
   wait 10 secs
   show img "xxx" of cd 2
   ...



###snip

Setting the directory causes to "put" the engine into a totally new "world".

The working directory is the folder, where the engine is looking for all
objects (files/movies/sounds/stacks etc...) you use in your script.

You can actually say that the working directory is the folder where the
 engine "lives" in.

Example:

There is a jpg-file on the desktop, that you want to use in your scripts.

set the filename of img 1 to "my_image.jpg"

...will cause nothing but a grey image placeholder, because the engine
is probably still living in another folder.

Now it will look around and will NOT see the desired jpg-file.

(Hint: Right after starting RR, type this into the messagebox:

put the directory  
...and hit Return.

You will see the path to the RR-folder here.)

So RR doens't know anything about the existence of a desktop-folder,
until you definitvely tell him. (her ?)

...
set the directory to "C:/WINDOWS/Desktop/"
...

Now the line: 
set the filename of img 1 to "my_image.jpg"

will (hopefully) display a extremely cute image in img 1 :-)

I hope you can follow so far.

We have 2 problems.

1. I am not native english-speaking and
2. you are french  (Which "per se" is no problem, of course ;-)

But this combination together with the not too simple explanations
here might be a bit confusing...

(Mon francais ne suffice pas pour explainer cettes trucs... :-)

Hope this helps...

If not, you know where to send your mails to... :-)


A bientot

Klaus Major <kmajor at metascape.org>
MetaScape GmbH








More information about the use-livecode mailing list