AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script to automate internet connection refresh?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
justs



Joined: 12 Jan 2010
Posts: 2

PostPosted: Tue Jan 12, 2010 8:28 pm    Post subject: Script to automate internet connection refresh? Reply with quote

Newbie here. I searched for hours on the web and wasn't able to find exactly what I am looking for. I am wondering if there is an easy way to create an AHK that will refresh my laptop's wireless connection?

Basically after about 20-30 minutes of browsing, my internet slows down quite a bit (regardless of the browser) and the fastest way to boost it back up is to hit the refresh icon on the "Connect to a network" window (Vista Home Prem. SP2). Which seems to work 9 times out of 10.

I realize that there is probably some root cause, but I have run every diagnostic tool there is and posted on all the usual forums (hijack this, malwarebytes, etc.) There are no apparent viruses or spyware, it just seems my lot to have this issue (until I switch to Windows 7 or Linux I suppose.)

In any case does anyone have any tips on creating an AHK so that I don't need to go through the process of right clicking my wireless connection icon, selecting "connect to a network" and then hitting the refresh icon? I tried creating a macro, but that doesn't really make it much easier what with the window having to be located in exactly the same spot each time for the mouse strokes and clicks.

Appreciate any feedback, tips, ideas, help or even sarcasm. Shocked
Back to top
View user's profile Send private message
tank



Joined: 21 Dec 2007
Posts: 3700
Location: Louisville KY USA

PostPosted: Wed Jan 13, 2010 5:04 am    Post subject: Reply with quote

more than likely its your router not your PC
i wont resolve this for you but ill offer this perhaps you can figure the rest out
Code:
ipconfig /release
ipconfig /renew
arp -d *
nbtstat -R
nbtstat -RR
ipconfig /flushdns
ipconfig /registerdns

_________________

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Back to top
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Wed Jan 13, 2010 9:23 am    Post subject: Reply with quote

Did you search in the forum on e.g. Wireless Network? E.g.: Repair a wireless connection automatically? (But maybe there's maybe more useful in search results)
justs wrote:
the window having to be located in exactly the same spot each time for the mouse strokes and clicks
Normally not when using ControlClick.
Back to top
View user's profile Send private message
justs



Joined: 12 Jan 2010
Posts: 2

PostPosted: Thu Jan 14, 2010 1:05 am    Post subject: Thank you gentlemen Reply with quote

Thanks Tank. I had already set up a .bat file to automate the ipconfig\release and renew, but I added the other commands that you show. Was that what you intended, a .bat file with an AHK assigned? It does work, but still not exactly what I am looking for. I am probably not explaining myself very well or I am just out of my mind (very likely).

I also looked at that link, Peter, but not quite what I am seeking. I had searched endlessly through these forums and the web at large, but it seems that I am alone in my quest or I am not up to speed on the proper terminology.

Basically, when I am surfing the web, everything slows down. Usually I right click my network connection icon in the tray, select "connect to a network" and then hit the refresh arrows a couple of times and I get a little speed back, but I sometimes have to do this 10 times in an hour. It happens both using my network at home and away. For instance I am roughly 400 miles away in Los Angeles tonight, using my Sprint wireless card and I have some of the same issues. Which is why I suspected my laptop setup rather than my router.

In any case, I have begun uninstalling all manner of programs on my rig that I have used in the past but may not rely on right now in hopes of finding a "culprit". I initially suspected Firefox was too loaded with add-ons, but Chrome gets just as laggy.

If I don't find the root, I may have to do a clean install and be very selective with my apps. (I would hate to lose my favs: Rocketdock, MouseExtender, Everything, DirectFolders, SuperFastShutdown, Google Desktop, ProcessExplorer, AuslogicsBoost Speed, UltraExplorer and OpenDNS, but I suppose one of those may be the issue.) I am also running both Clam Win and MSE, wonder if that could be an issue.

In any case, had I found a way to automate the whole refresh process, I would have lived with it until I changed my OS later in the year.

Thanks for you comments, I'll keep searching.
Confused
Back to top
View user's profile Send private message
Carcophan



Joined: 24 Dec 2008
Posts: 1308
Location: :noitacoL

PostPosted: Thu Jan 14, 2010 2:33 am    Post subject: Reply with quote

Quote:
Usually I right click my network connection icon in the tray, select "connect to a network" and then hit the refresh arrows a couple of times and I get a little speed back, but I sometimes have to do this 10 times in an hour

This in itself CAN be automated with AHK, conditionally. You can set mouse clicks and coords and the other 'basics' to manually complete these steps for you.

But as tank and others have said, it is probably not your IP/Connection causing the issue.




Also, have you tried 'Safemode w/Networking', to diable all but the core OS bits? A dumb step i know, but if you DO experience the same slow issue in safe mode, it 'should' rule out any software specific issues.



Quote:
using my Sprint wireless card

which AT BEST is 6mb/sec, depending on tower load. 6mb is more than enough to fullfil your surfing and/or gaming needs, but the sprint cards typically default to 3G and not 4G, as you are so far from LA (raw assumtion, may be wrong)

Quote:
I have begun uninstalling all manner of programs

It is not what is installed, but what is running. obviosuly, if it isnt installed it isnt running, but you don't need to clear your HDD in search for a better connection.

What are your computer specs? You haven't mentioned yet, it could just be your laptop honestly. Just because it hasn't been a 24/7 issue, doesn't mean something cant just go wrong.


Do you have anti-virus? Is your AV scanning or downloading, by deafault they update themselves, as do a NUMBER of other apps.




just a few simple points. not much help, sorry.
Back to top
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Jan 14, 2010 4:30 am    Post subject: Reply with quote

justs wrote:
In any case, had I found a way to automate the whole refresh process, I would have lived with it until I changed my OS later in the year.
See my previous post:
1. search at forum to find a shortcut for wireless network window. (Maybe keep it open and move it out of sight with WinMove command)
2. Use ControlClick to click the desired controls.

It should be possible to do this repeatedly without the window hindering you with your work.
But not sure whether it's worth all the effort for making the script, because it's just a makeshift solution after all, not tackling the real problem.
Or you can consider it as a challenge, and also a victory on your stubborn wireless adapter / laptop Smile .
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group