Re: copy a stack from dropbox to temp-folder (script)

2016-09-22 Thread Roger Eller
on mouseUp

put “myStack v1.0.0.livecode” into myRemoteFileName

put myRemoteFileName into myLocalFileName -- same name

put URL ("https://dl.dropboxusercontent.com/u/14355803/PVT/"&;
myRemoteFileName)
into URL ("binfile://" & specialfolderpath("temporary")&slash&
myLocalFileName )

go to stack URL ("binfile://" & specialfolderpath("temporary")&slash&
myLocalFileName )

end mouseUp
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: copy a stack from dropbox to temp-folder (script)

2016-09-22 Thread Klaus major-k
Hi John,

> Am 22.09.2016 um 12:46 schrieb John Allijn :
> 
> Hi,
> 
> I’m trying to copy a file from my dropbox’s public folder to my local
> temp-folder.
> I get the filename, create a destination path and put the remote file in
> the local folder. This seems to work (there is a file by that name in my
> temp folder), but when I go to this copied stack I get an “this file is not
> a stack”-error.
> 
> What am I doing wrong?
> 
> here’s my script:
> 
> on mouseUp
> put “myStack v1.0.0.livecode” into myRemoteFileName
> 
> put "https://dl.dropboxusercontent.com/u/14355803/PVT/"&; myRemoteFileName
> into myRemoteStackName
> 
> put "file:"&specialfolderpath("temporary")&slash into targetFile
> revCopyFile myRemoteStackName, targetFile
> 
> put specialfolderpath("temporary")&slash& myRemoteFileName into
> stackInTempFolder
> go to stack stackInTempFolder
> 
> put the result
> 
> end mouseUp

"revCopyFile" needs the "naked" pathname as parameter!
Try this:
...
## put "file:"&specialfolderpath("temporary")&slash into targetFile
put specialfolderpath("temporary")&slash into targetFile
revCopyFile myRemoteStackName, targetFile
...


Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: copy a stack from dropbox to temp-folder (script)

2016-09-22 Thread Tore Nilsen

My guess is that you need to use binfile instead of file, as a stack is binary.
Vennlig hilsen
Tore Nilsen

Den 21. sep 2016 kl. 23.47 skrev John Allijn  
følgende:

Hi,

I’m trying to copy a file from my dropbox’s public folder to my local
temp-folder.
I get the filename, create a destination path and put the remote file in
the local folder. This seems to work (there is a file by that name in my
temp folder), but when I go to this copied stack I get an “this file is not
a stack”-error.

What am I doing wrong?



here’s my script:

on mouseUp
put “myStack v1.0.0.livecode” into myRemoteFileName

put "https://dl.dropboxusercontent.com/u/14355803/PVT/"&; myRemoteFileName
into myRemoteStackName

put "file:"&specialfolderpath("temporary")&slash into targetFile
revCopyFile myRemoteStackName, targetFile

put specialfolderpath("temporary")&slash& myRemoteFileName into
stackInTempFolder
go to stack stackInTempFolder

put the result

end mouseUp
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode