Sign in to follow this  
Followers 0
SweatyOgre

Wait for an icon?

4 posts in this topic

Is there a command that will wait for the internet connection icon to appear on the taskbar? Or maybe return whether or not it appeared?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Tray icons are annoying. If you are waiting for a dialup connection to be established, you could try the following:

While 1
   sleep(1000)
   If @IPAddress1 <> "0.0.0.0" And @IPAddress1 <> "127.0.0.1" Then ExitLoop
   If @IPAddress2 <> "0.0.0.0" And @IPAddress2 <> "127.0.0.1" Then ExitLoop
WEnd
MsgBox(4096,"Info", "Internet Connection detected!")

Note: you probably only need one of the two IF-tests. See "@IPAddress1

" in the help file.... Some computers have multiple adapters; and some computer configurations always return the 127.0.0.1 localhost/loopback IP address. As long as an IP Address is neither localhost nor 0.0.0.0, then you probably are connected to the internet.

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Thanks, I think that'll do the trick.

Share this post


Link to post
Share on other sites

Tray icons are annoying.  If you are waiting for a dialup connection to be established, you could try the following:

While 1
   sleep(1000)
   If @IPAddress1 <> "0.0.0.0" And @IPAddress1 <> "127.0.0.1" Then ExitLoop
   If @IPAddress2 <> "0.0.0.0" And @IPAddress2 <> "127.0.0.1" Then ExitLoop
WEnd
MsgBox(4096,"Info", "Internet Connection detected!")

Note:  you probably only need one of the two IF-tests.  See "@IPAddress1

" in the help file....  Some computers have multiple adapters; and some computer configurations always return the 127.0.0.1 localhost/loopback IP address.  As long as an IP Address is neither localhost nor 0.0.0.0, then you probably are connected to the internet.

That might help me with my advertising in my autoit based software and feed the family better.

Thank you

Rick


Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0