Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'How to perform an action on change of network' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to perform an action on change of network
Authored by: sapporo on May 18, '07 08:53:07AM

I'd rather not touch anything in /System .

There's a nice Cocoa class called IXSCNotificationManager, which makes it trivial to get notified about stuff like location changes. Someone should probably write a utility based on that and make it available via Fink or DarwinPorts.



[ Reply to This | # ]
Or an Applescript that launches on login or runs in the background
Authored by: designr on May 18, '07 10:05:24AM
property last_ip : ""
set my_IP to (do shell script "/sbin/ifconfig en0 | head -3 | grep 'inet ' | cut -d' ' -f 2") as string
if my_IP ≠ last_ip then
	set last_ip to my_IP
	if my_IP contains "192.168.0." then
		beep
		delay 2
		beep
	end if
else
	beep
end if


[ Reply to This | # ]