Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

LeonJames17

macrumors newbie
Original poster
Mar 28, 2008
3
0
Hi there,

I have recently changed to a wireless vodafone service, which 'idles' your connection if you haven't loaded a webpage after a couple of seconds.. This idle can take a minute or so to get out of and is very frustrating...

Does anyone know of a program or way to get Mac OS X Leopard to ping an address at 1 second intervals?

I read this keeps the connection open on a Vodafone forum, but the person was using a Vista computer... I can't find a similar software for Mac!

Any help would be appreciated!
 

mackindergarten

macrumors 6502
Feb 21, 2008
381
2
Hi,

save this script as application and it'll do the job for you.

Code:
try
	repeat
		do shell script "ping -c 1 www.google.com"
		delay 1
	end repeat
end try
Adjust the delay (in seconds) if you need to.

Hope this works for you.
/Rupert
 

LeonJames17

macrumors newbie
Original poster
Mar 28, 2008
3
0
Thanks Rupert!

Sorry to sound stupid... I've used a macs for only a year.... How would I save that as a application?

Thanks for your help!
 

mackindergarten

macrumors 6502
Feb 21, 2008
381
2
Hi,

no worries.

You need to open Script Editor (/Applications/AppleScript/Script Editor.app) and paste this code.

In Script Editor go to File > Save As and choose Application as File Format.
Be sure to uncheck Startup Screen, as it would give you a "nag-screen" every time you launch it.

Save it to any folder you like.

Another hint: You can use this post over at Mac Kindergarten - on launching multiple items - to launch your browser and this application together.

/Rupert
 

LeonJames17

macrumors newbie
Original poster
Mar 28, 2008
3
0
Wow that was surprisingly easy..

However when launched I see my modem light up for about 5 seconds, and I notice my cursor turns into a circle divided into quarters (black and white, similar to a bmw logo), and if I press on the application in my dock it has in a grey lettering 'Application Not Responding'.

Any suggestions?
 

mackindergarten

macrumors 6502
Feb 21, 2008
381
2
Hi,

it's because this quick application (read: hack) is running in an endless loop.
This will do better:
Code:
on idle
	do shell script "ping -c 1 www.google.com"
	return 1
end idle

EDIT: Save it as application with Stay Open checked.

/Rupert
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.