Run Ping on program load

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ChrisM
Posts: 24
Joined: Sat Mar 29, 2014 3:11 pm

Run Ping on program load

Post by ChrisM » Sat Apr 05, 2014 12:36 pm

Hi All,

I need some help, im trying to have a box on the screen thats pinging google every 1 minute and the box is red if there is no response and green if there is a reply, I want this to load at start up without pressing any buttons, basically trying to monitor if the internet goes down.

Any ideas appreciated

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Run Ping on program load

Post by Dixie » Sat Apr 05, 2014 1:25 pm

maybe, something like

Code: Select all

on openStack
   checkGoogle
end openStack

on checkGoogle
   put "http://www.google.com" into theURL
   put URL theURL into temp
   
   if temp is empty then
      put "Oops... no connection !"
   else
      put "It's here !"
   end if
   
   send "checkGoogle" to me in 60 seconds
end checkGoogle

Post Reply