modify, copy, clone, folders and files, in stack, nonstack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
modify, copy, clone, folders and files, in stack, nonstack
Hi, everyone,
I need to copy a set of folders and files and then rename them based on user input.
I was looking at the import feature but it only allow the import of a text file or images ect.
I was wondering if there were a way to import a series of folders that contain files, like text or html files.
So this would be something like a template folder containing files of text or html
I was thinking I could save it as a non stack file but it would be easier if I could store them in a stack and just copy or clone the stack with the files in them.
(that may not be possible)
so if I have to save as a non stack file system, how would I reference this resource for scripting in revolution, here is an over view of what I am after.
copy or clone template then save in temp stack or data or folder ect.
then I would further process the contents of the folders and files using revolution.
Any thoughts on the best way to store this file system into stacks or externals?
Thanks in advance for your time.
Tim
I need to copy a set of folders and files and then rename them based on user input.
I was looking at the import feature but it only allow the import of a text file or images ect.
I was wondering if there were a way to import a series of folders that contain files, like text or html files.
So this would be something like a template folder containing files of text or html
I was thinking I could save it as a non stack file but it would be easier if I could store them in a stack and just copy or clone the stack with the files in them.
(that may not be possible)
so if I have to save as a non stack file system, how would I reference this resource for scripting in revolution, here is an over view of what I am after.
copy or clone template then save in temp stack or data or folder ect.
then I would further process the contents of the folders and files using revolution.
Any thoughts on the best way to store this file system into stacks or externals?
Thanks in advance for your time.
Tim
Hi,
In those cases that you only want to move a folder to a different location, use the rename folder command.
Best,
Mark
In those cases that you only want to move a folder to a different location, use the rename folder command.
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
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Short way:
Execute this code (for example in the message box):
Long way:
Most of Rev's functionality is rev script, within revolution stacks. Normally the IDE hides those from you. However, you can change a setting to show them. In the Properties the General tab, select "Revolution UI elements appear in list of stacks". Then open the Application Browser from the Tools menu. There should now be many stacks with the prefix "rev" in the list.
This is also one of the reasons why you should not name any of your stacks "Rev" at the beginning (for example "Revolving", or "Reverence").
Execute this code (for example in the message box):
Code: Select all
edit the script of Button "revCommon" of cd 1 of stack "revlibrary"
Most of Rev's functionality is rev script, within revolution stacks. Normally the IDE hides those from you. However, you can change a setting to show them. In the Properties the General tab, select "Revolution UI elements appear in list of stacks". Then open the Application Browser from the Tools menu. There should now be many stacks with the prefix "rev" in the list.

Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Posts: 2
- Joined: Mon May 05, 2008 12:29 am
Very old post with a new question...
How did you discover that the revCopy command was on THAT button in THAT stack?
Once I knew where to look I found it OK but if I was hunting to find a command what would I do?
Also, do you know, if I want to replace this with a non-applescript version (say using a shell command) can I just replace it here or do I need to write my own version and put it in my stack?
Hope you're still out there...
Tom
Once I knew where to look I found it OK but if I was hunting to find a command what would I do?
Also, do you know, if I want to replace this with a non-applescript version (say using a shell command) can I just replace it here or do I need to write my own version and put it in my stack?
Hope you're still out there...
Tom
BvG wrote:Short way:
Execute this code (for example in the message box):Long way:Code: Select all
edit the script of Button "revCommon" of cd 1 of stack "revlibrary"
Most of Rev's functionality is rev script, within revolution stacks. Normally the IDE hides those from you. However, you can change a setting to show them. In the Properties the General tab, select "Revolution UI elements appear in list of stacks". Then open the Application Browser from the Tools menu. There should now be many stacks with the prefix "rev" in the list.
:arrow: This is also one of the reasons why you should not name any of your stacks "Rev" at the beginning (for example "Revolving", or "Reverence").
Hi Tom,
Well, I like to tear things apart to see how they work, although "Curiosity killed the cat"...
That's how I started to learn MetaCard, which was the grandfather of Revolution and had almost NO documentation at all and that was in the days when I did not have internet access, must have been sometime in the last century
BUT with the next update it is gone again, so I would maybe create my own library stack and use it in my stacks.
I'm always around somehow
Best
Klaus
How did you discover that the revCopy command was on THAT button in THAT stack?
Well, I like to tear things apart to see how they work, although "Curiosity killed the cat"...
That's how I started to learn MetaCard, which was the grandfather of Revolution and had almost NO documentation at all and that was in the days when I did not have internet access, must have been sometime in the last century

See above, no other idea...Once I knew where to look I found it OK but if I was hunting to find a command what would I do?
As long as your solution does work, you can change it there.Also, do you know, if I want to replace this with a non-applescript version (say using a shell command) can I just replace it here or do I need to write my own version and put it in my stack?
BUT with the next update it is gone again, so I would maybe create my own library stack and use it in my stacks.
Hope you're still out there...
I'm always around somehow

Best
Klaus
-
- Posts: 2
- Joined: Mon May 05, 2008 12:29 am
Hi Klaus -
Thanks for the info. I was hoping that there was some kind of a search command that would look through all the rev stuff to find what you were looking for... javascript:emoticon(':?')
On another front... I am not understanding yet how to "reuse" code that I have created (I've only had the download for a few days). If I wanted to create TomCopy that hooked into other methods you suggest creating "my own library stack" but I'm not at all clear on how I would reference the command, where I would put the "library" code, etc. do you know of any good sources of information on this?
Thanks again
Tom
Thanks for the info. I was hoping that there was some kind of a search command that would look through all the rev stuff to find what you were looking for... javascript:emoticon(':?')
On another front... I am not understanding yet how to "reuse" code that I have created (I've only had the download for a few days). If I wanted to create TomCopy that hooked into other methods you suggest creating "my own library stack" but I'm not at all clear on how I would reference the command, where I would put the "library" code, etc. do you know of any good sources of information on this?
Thanks again
Tom
:?Klaus wrote:Hi Tom,As long as your solution does work, you can change it there.Also, do you know, if I want to replace this with a non-applescript version (say using a shell command) can I just replace it here or do I need to write my own version and put it in my stack?
BUT with the next update it is gone again, so I would maybe create my own library stack and use it in my stacks.
Best
Klaus
Hi Tom,
OK, creating and using your own libraries is pretty straightforward.
Creating:
1. Create a new stack and name it anyway you want (e.g. "my_shell_lib").
2. Put all your custom handlers and functions into the stack script.
3. Save it and that's your first library stack
Using:
1. This can be scripted, maybe in the first stack of your standalone or whenever it is necessary like:
...
start using stack "my_shell_lib"
## This can be a substack or a separate file on disk,
## in that case you will have to provide the filepath,
## just llike any other stack
...
Done!
Now all the handlers/functions in the stackscript are available to all your other (sub-)stacks/cards/objects.
Cool, isn't it?!
See "start using" in the docs.
You can remove that stack for the "message path" with:
...
stop using stack "my_shell_lib"
...
There is another nice thing that may come handy from time to time:
The engine will send a "librarystack" (see docs) message to the stack that you "start using..." when you "start using..."
This could be used for triggering some action linme initializing local/global variables etc., if necessary.
Have a nice weekend!
Best
Klaus
OK, creating and using your own libraries is pretty straightforward.
Creating:
1. Create a new stack and name it anyway you want (e.g. "my_shell_lib").
2. Put all your custom handlers and functions into the stack script.
3. Save it and that's your first library stack

Using:
1. This can be scripted, maybe in the first stack of your standalone or whenever it is necessary like:
...
start using stack "my_shell_lib"
## This can be a substack or a separate file on disk,
## in that case you will have to provide the filepath,
## just llike any other stack
...
Done!
Now all the handlers/functions in the stackscript are available to all your other (sub-)stacks/cards/objects.
Cool, isn't it?!

See "start using" in the docs.
You can remove that stack for the "message path" with:
...
stop using stack "my_shell_lib"
...
There is another nice thing that may come handy from time to time:
The engine will send a "librarystack" (see docs) message to the stack that you "start using..." when you "start using..."
This could be used for triggering some action linme initializing local/global variables etc., if necessary.
Have a nice weekend!
Best
Klaus