Search found 155 matches

by Zax
Fri Apr 03, 2020 12:12 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Thanks for these clarifications, bogs.
bogs wrote:
Fri Apr 03, 2020 10:15 am
Curious no terminating 'end if' on that if then
Hum, yes, you're right. It is a (bad) habit that I took from the time of Hypercard. :wink:
by Zax
Fri Apr 03, 2020 8:35 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Well, it appears my previous script doesn't work on Windows 10. This one was successfully tested on MacOS, Windows 7 and Windows 10: function isConnected // return boolean put "google.com" into tUrl if (the platform <> "MacOS") then put "ping -n 1 " & tUrl & " > NUL && echo 1 || echo 0" into cmd set...
by Zax
Wed Apr 01, 2020 1:10 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Considering the results I received outside of 'ping', again, I'm not really sure this site is a good example site even for the 2nd part of the thread. Despite the fact that this website seems to have trouble, as far as I know, all shared websites hosted at OVH don't respond to pings. But you're rig...
by Zax
Wed Apr 01, 2020 8:16 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

No, but all websites that are reachable return 'something', and you can test for that I found this: The responses to pings have been disabled by OVH on shared hosting. It can be tested with "durandexpertises.com" on mouseUp get "durandexpertises.com" put shell("ping " & it &" -c1") into fld "respon...
by Zax
Tue Mar 31, 2020 2:56 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Please copy/paste field 2's result, or give me an example address, cause without anything to go on, I can't possibly improve the solution for you :P Well, it was in fact a friend's website in development, so maybe he has made some kind of special Apache settings. Sorry. I will post URL here if I fi...
by Zax
Tue Mar 31, 2020 1:06 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Unfortunately, some websites don't answer pings. No, but all websites that are reachable return 'something', and you can test for that, the test doesn't have to be what I wrote up there, that was just a q&d example :P Well, I tested some websites with your shell script, and for some of them I had s...
by Zax
Tue Mar 31, 2020 11:59 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Interesting solution, bogs. MacOS version of your script: on mouseUp put shell("ping " & field 1 &" -c1") into field 2 if matchText( field 2,"1 packets received") is false then answer "No Connection" else answer "You are connected." end mouseUp Unfortunately, some websites don't answer pings. So you...
by Zax
Tue Mar 31, 2020 10:27 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

This script works fine, but I have to wait about 15 seconds to have an answer if I'm disconnected.
by Zax
Tue Mar 31, 2020 10:04 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

Very interesting links, thanks :) Meanwhile, I tried to play with tsNetSetTimeouts command, without great success. The only way to have a quick answer from server (OK, you're connected, or can't resolve DNS) would be to insert tsNetClose tsNetInit before sending tsNetHeadSync command. This is quite ...
by Zax
Tue Mar 31, 2020 9:14 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Re: Check available connection with tsNet?

mrcoollion wrote:
Tue Mar 31, 2020 9:05 am
Maybe this will help.
Thank you for your reply Paul, but I read these documentations from two days, and it doesn't really help me... Unless I miss an important info.
by Zax
Tue Mar 31, 2020 8:24 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Check available connection with tsNet?
Replies: 29
Views: 1896

Check available connection with tsNet?

Hello, Using LC Indy 9.04, I would like to test if an internet connection is available from a stack. What is the best way to perform such a test with tsNet? I tried the following test with an ethernet cable and without wifi: 1 - ethernet cable connected: recovery of headers from google.com with tsNe...
by Zax
Tue Mar 31, 2020 8:15 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: properties?
Replies: 3
Views: 372

Re: properties?

Using the built-in Dictionary (available from the main tool bar), you can filter LC vocabulary with these keywords:

command
library
constant
message
control structure
object
function
operator
glossary
property
handler
widget
keyword
by Zax
Tue Mar 31, 2020 7:12 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: [SOLVED] Start using stack vs insert script into back?
Replies: 3
Views: 376

Re: Start using stack vs insert script into back?

Thank you for your answers.
"librarystack" message can be very convenient indeed.
by Zax
Mon Mar 30, 2020 2:17 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: [SOLVED] Start using stack vs insert script into back?
Replies: 3
Views: 376

[SOLVED] Start using stack vs insert script into back?

Hello, After reading the Dictionary, I can't see significant differences between: start using stack and insert the script of stack "myStack" into back Message libraryStack doesn't seem to be sent with the insert the script command. Is there other differences, and what is the best solution to use a s...
by Zax
Thu Mar 12, 2020 3:44 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Display distant image in a graphic object?
Replies: 5
Views: 823

[SOLVED] Re: Display distant image in a graphic object?

Thank you for your answers. This works fine :) put "https://livecode.com/wp-content/uploads/2018/04/multiplatform-2-1018x1024.jpg" into tUrl set the filename of image "ImgTemp" to tUrl -- hidden "Image" object set the backgroundPattern of graphic "GraphicTest" to (the id of image "ImgTemp") As the f...

Go to advanced search