what to do after a Get URL?
Dan Friedman
dan at clearvisiontech.com
Thu Aug 18 16:30:17 EDT 2005
Jon,
When you use the statement:
get url "ftp://a.b.c/d.txt"
The url is placed into the local variable "it". Therefore you can access
the contents by simply getting "it" (put it into tUrlData). Or, just put
the url into your own variable. For example:
put url "ftp://a.b.c/d.txt" into urlData.
To put the data into your local computer as a file, try this:
on getURLText
put url "ftp://a.b.c/d.txt" into tUrlData
ask file "Save As:"
put it into fPath
if fPath = "" then
exit getURLText
end if
put tUrlData into url ("file:" & fPath)
end getURLText
Hope that helps...
-Dan
> I understand how to write the statement
>
> get url "ftp://a.b.c/d.txt"
>
> or some such. OK, so now the file is somehow "in" the computer, with
> the Get.
>
> What I don't "get" (so to speak) is how to put that data into my local
> computer as a file. I assume it is something like
>
> put url "file://something"
>
> but I'm not sure about the "something". "file://c:/dir/filename.txt"?
> "file://c/dir/filename.txt"? And I'm not sure how to specify the data
> to "put" in the Put statement: is it implicit (one of those magic words
> like "it" or "this" or something)?
>
> I'm sure this is simple/obvious, but only if you know it...
>
> :)
>
> Jon
More information about the use-livecode
mailing list