DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: IDEA: network detection  (Read 16,061 times)

Maestr0

  • Participant
  • Joined in 2010
  • *
  • Posts: 30
    • Participated in NANY Challenge Once
IDEA: network detection
« on: February 10, 2010, 02:39 PM »
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:

Code
	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?

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: IDEA: network detection
« Reply #1 on: January 03, 2012, 02:06 AM »
Does what you have above not work? Or did you want it to do something else?

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: network detection
« Reply #2 on: January 04, 2012, 12:11 AM »
... Not sure if you noticed, but this post is close to two years old :)

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: IDEA: network detection
« Reply #3 on: January 04, 2012, 08: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

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: network detection
« Reply #4 on: January 04, 2012, 11: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 ;)

DougalS

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 23
Re: IDEA: network detection
« Reply #5 on: January 04, 2012, 12:11 PM »
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

jgpaiva

  • Artificial Idiocy
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 4,727
    • Cody Award
    • Participated in NANY Challenge Once
    • Coding Snacks
    • Portugal Inhabitant
    • Linux User
Re: IDEA: network detection
« Reply #6 on: January 04, 2012, 01:26 PM »
:) 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!

Original address: https://www.donationcoder.com/forum/index.php?topic=21692.0