Copy self to other locations

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
carelvos
Posts: 19
Joined: Tue Jul 14, 2015 5:21 pm

Copy self to other locations

Post by carelvos » Sun Jul 26, 2015 2:10 pm

I'm trying to copy the current stack running to another location:

I've tried the following:

revCopyFile the sourceFile of this stack, "c:/test"

and

revCopyFile the sourceFile of this card, "c:/test"

but it doesn't work.

I tried it from withing Livecode and from a standalone.

Please help...

Thanks,

Carel

Klaus
Posts: 14193
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Copy self to other locations

Post by Klaus » Sun Jul 26, 2015 2:15 pm

Hi Carel,

do this:
...
put the filename of this stack into tSourceFile
revcopyfile tSourceFile, "c:/test"
...
Use "effective filename" if it is a substack!


Best

Klaus

carelvos
Posts: 19
Joined: Tue Jul 14, 2015 5:21 pm

Re: Copy self to other locations

Post by carelvos » Sun Jul 26, 2015 2:19 pm

Never mind, I figured it out:

get the effective fileName of this stack
put it into FileToCopy
revCopyFile FileToCopy, "c:/test"

Watch out Bill Gates, I'm becoming an expert at programming :lol: :lol:

Klaus
Posts: 14193
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Copy self to other locations

Post by Klaus » Sun Jul 26, 2015 2:21 pm

Use my script and SAVE a complete line! :D

Post Reply