DonationCoder.com Forum

DonationCoder.com Software => Coding Snacks => Unfinished Requests => Topic started by: Maestr0 on February 10, 2010, 08:39 AM

Title: IDEA: network detection
Post by: Maestr0 on February 10, 2010, 08:39 AM
I'm looking for something that detects when network connection is achieved with a certain network.
That can be handy to do certain things, like sync, make/unmake networkmappings, etcetera.

For now I've been doing something like below in a settimer:

RunWait , %comspec% /c ipconfig > %A_Temp%\ipconfig.txt, , Hide UseErrorLevel
FileRead , ipcnfg , %A_Temp%\ipconfig.txt
FileDelete %A_Temp%\ipconfig.txt
if ipcnfg contains %DNS_suffix%
network = 1
else
network = 0

Any thoughts?
Title: Re: IDEA: network detection
Post by: DougalS on January 02, 2012, 08:06 PM
Does what you have above not work? Or did you want it to do something else?
Title: Re: IDEA: network detection
Post by: jgpaiva on January 03, 2012, 06:11 PM
... Not sure if you noticed, but this post is close to two years old :)
Title: Re: IDEA: network detection
Post by: DougalS on January 04, 2012, 02:00 AM
I saw it was old, but wasn't sure if was still an outstanding request, or dead. I have a tool we use at work that does something similiar (automatically connects specific shares based on what the best available server is), and thought I may adapt it if there was still any need. And still getting my head around 2012, thought it was only a year old, will be signing 2011 date for while yet.  :-[
BTW, is there any way to seperate the active but unanswered requests from the answered and no longer required?
Cheers
Title: Re: IDEA: network detection
Post by: jgpaiva on January 04, 2012, 05:51 AM
Well, I'm not sure how to classify something as "not active" :)
If Maestr0 still has a need for this, then I guess this would be active. My intention was only to warn you so that you don't get your hopes high of receiving a reply ;)
Title: Re: IDEA: network detection
Post by: DougalS on January 04, 2012, 06:11 AM
Thanks, but I assume he has gone elsewhere as there were no other followup requests. But I have posted in a few topics, I can't find many current requests that haven't already been answered several times, and which I have some chance of helping with. So just posted in a few of the toopics that didn't have answered/completed/or some such in the topic and selected notify so if they do answer I will get a heads up.
So I'm off to the search page to see if I can get a list of topics that aren't quite as old and which don't appear to be answered already. Eventually I'll find something I can help with.  :)
Cheers
Title: Re: IDEA: network detection
Post by: jgpaiva on January 04, 2012, 07:26 AM
:) That's the spirit :P
I think your problem may be related with skwire doing all the recent coding snacks requests, eheh. But I'm sure you'll find something around here, ideas are always flowing around DC!