Having trouble with http & ftp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 10
- Joined: Fri Nov 16, 2018 2:01 am
Having trouble with http & ftp
Newbie, coming from Director 12 to LC9. Some of the constructs are very similar, some are not. For example, http & ftp are quite different. I’m using the following code in LC9 and nothing happens: (dummy url) set the text of field “capture” to URL “(url)/test.txt” I have a field named “capture.” So I guess I’m missing something. I’ve tested the url in a browser and it works fine. Is there a sample script online I can examine?
As for ftp, I’m in the dark. I’ve tried the samples in the dictionary, but nothing happens. Where to turn?
As for ftp, I’m in the dark. I’ve tried the samples in the dictionary, but nothing happens. Where to turn?
-
- Livecode Opensource Backer
- Posts: 9285
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having trouble with http & ftp
Well . . .
You can do this:
although ALL you end up with is RAW HTML.
This does rather better:
You can do this:
Code: Select all
on mouseUp
get URL "https://forums.livecode.com/viewtopic.php?f=7&t=31774"
put it into fld "ff"
end mouseUp
This does rather better:
Code: Select all
on mouseUp
get URL "https://forums.livecode.com/viewtopic.php?f=7&t=31774"
set the HTMLText of fld "ff" to it
end mouseUp
Re: Having trouble with http & ftp
Hi TooManyNotes (I do not believe in this! ),
welcome to the forum!
I would like to see your script! In principle it is OK, but maybe the syntax is not correct.
Do you get any error?
Anyway, try this:
@Richmond
TooManyNotes wants to put a file named "test.txt" into his field, so HTMLTEXT is NOT the right choice! Shall I call you Richard? That was mean, I know...
Best
Klaus
welcome to the forum!
I would like to see your script! In principle it is OK, but maybe the syntax is not correct.
Do you get any error?
Anyway, try this:
Code: Select all
...
put url("http:// your /url/here/test.txt") into fld "capture"
## Now check for possible errors:
## THE RESULT is usually EMPTY on success and may give a hint if not
if the result <> EMPTY then
answer "Problem:" && the result
end if
...
TooManyNotes wants to put a file named "test.txt" into his field, so HTMLTEXT is NOT the right choice! Shall I call you Richard? That was mean, I know...
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9285
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Having trouble with http & ftp
@Claus
I was writing that while giving 4 kids a dictation in an English class.
Best, Richard
P.S. I'd always favour
I was writing that while giving 4 kids a dictation in an English class.
Best, Richard
P.S. I'd always favour
Code: Select all
set the text of fld "f1" to
Re: Having trouble with http & ftp
So what?richmond62 wrote: ↑Fri Nov 16, 2018 12:13 pmI was writing that while giving 4 kids a dictation in an English class.
-
- Posts: 10
- Joined: Fri Nov 16, 2018 2:01 am
Re: Having trouble with http & ftp
All the scripts worked! Thanks to all for the guidance. Now, onto more issues in another post.
—TooManyNotes
—TooManyNotes