Alex, I added your idea of varying the URL each time, but still not able to get the script to work correctly. See below.
For instance, on my mac, when I disable wifi I shouldn't be able to connect, when I enable my wifi I should be able to connect. What's wrong with my script? *on* mouseUp *add* 1 to tCount *put* URL ("www.google.com?count=" & tCount) into pURL *get* URL pURL *put* the result into tResult *if* tResult is not empty *then* *put* "disconnected" && tResult into field "fldStatus" *show* image "imageRed" *hide* image "imageGreen" *return* false *else* *put* "connected" into field "fldStatus" *show* image "imageGreen" *hide* image "imageRed" *end* *if* *end* mouseUp On Sun, May 19, 2013 at 9:06 AM, Alex Tweedly <a...@tweedly.net> wrote: > > unload URL tURL > > or if you prefer make the URL vary each time > > add 1 to tCount > put > ("http://mydomain.com/**theurlname.lc?count=<http://mydomain.com/theurlname.lc?count=>" > & tCount) into tURL > and use that URL. > > -- Alex. > > > > On 19/05/2013 12:59, Shawn Blc wrote: > >> I have a little script to check for an internet connection. Problem is >> that if I take this little script out of the preOpenCard and put it into a >> button the results are the same. It keeps the last state, regardless if I >> disconnect my wifi or not. I'm thinking that the URL that I'm connecting >> to to check for an internet connection is still in cache. >> >> How would I clear this cache? These don't work. >> clear URL >> clear cache >> >> Any help is appreciated or at least point me in the right direction. >> >> Dank. >> ______________________________**_________________ >> 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<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<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