Search found 157 matches

by Zax
Fri Aug 07, 2020 5:20 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Count occurences, case sensitive?
Replies: 2
Views: 340

Re: Count occurences, case sensitive?

Thierry wrote:
Fri Aug 07, 2020 4:36 pm
Check caseSensitive in the dictionary
Great! Merci Thierry :)
by Zax
Fri Aug 07, 2020 3:33 pm
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Count occurences, case sensitive?
Replies: 2
Views: 340

Count occurences, case sensitive?

Hello, I'm using replaceText() function to replace some string with another in a text, case sensitive, and I would like to inform the user about how many replacements have been done. Or, at least, how many occurences will be found (and replaced). All ...offset() functions I found are case insensitiv...
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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 3018

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: 550

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: 548

Re: Start using stack vs insert script into back?

Thank you for your answers.
"librarystack" message can be very convenient indeed.

Go to advanced search