AutoHotkey Community

It is currently May 25th, 2012, 2:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: April 27th, 2007, 9:11 am 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
Sean wrote:
after discussing with Skan about the discrepancy between the script and netstat.exe, in this very thread, I realized that the loopback (24, in your first interface 1 : 24 : 5, indicates it's a loopback interface) may not be a particular target of netstat.exe. It may simply try to sum up the data of all the interfaces.

So, I may also do it here.
What I'm concerned atm is, however, whether we have to include the loopback interface too or not.
I'd like to hear about the opinion of yours and other users on it.


Sean, try LanSpeed2 when you have time: http://httpd.chello.nl/~m.vanosta/orcasoft/ . It allows you to select an adaptor, and you can run multiple instances by renameing the exe. The setback is that it has too much fancy things that one does not need.

We may run in to compare the results.

My existing setup is :
NIC attached to a ADSL2 / 256Kbps / Data Limit: Day Usage: 1GB Data per month / Night usage: Unlimited.

The existing script helps me to keep a check on Sent/Recvd so that I do not exceed my day usage bandwidth limits. My previous attempt was to ControlGetText from LAN dialog and show the bandwidth on the start button. But I could never automate the opening of the dialog :(. ( See: How to start the "Local Area Connection Status" )

Now I have decided to sign for an additional ISP for better browsing speed. ( I will be retaining the current for my downloading needs ). I will be adding another NIC and modem and will be simulataneously using both the connections from different browsers. ( I am yet to find if it possible :roll: )

The additional setup would be:
Additional NIC attached to a ADSL2 / 2Mbps / Data Limit: A meagre 350MB per month.

So my future script will have to monitor and display data for two adaptors with a single script in a compact GUI. :roll:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2007, 1:23 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Skan wrote:
Sean, try LanSpeed2 when you have time: http://httpd.chello.nl/~m.vanosta/orcasoft/ . It allows you to select an adaptor, and you can run multiple instances by renameing the exe. The setback is that it has too much fancy things that one does not need.

Thanks for the link. I'll try it later as I have to update a few other scripts first.

Quote:
My previous attempt was to ControlGetText from LAN dialog and show the bandwidth on the start button. But I could never automate the opening of the dialog :(. ( See: How to start the "Local Area Connection Status" )

It turned out difficult to do it than I thought.
I'm controlling, i.e., enable/disable a network adapter, using FolderItem Verb COM. As the status verb is just the second verb, I expected it to work with VerbItem to 1 (it's 0-based) but nothing happened!

It didn't work even with explorer.exe (:file-manager, not the shell) if setting to use separate (explorer.exe) processes for the shell and for the file-manager.

I presume atm that some neccessary modules are not loaded into the file-manager explorer.exe.

So, unless you configured to show networt connection tray icon, it would be very hard to find a solution.
If the tray icon is shown, then it's easy to pop up the status dialog.

Quote:
Now I have decided to sign for an additional ISP for better browsing speed. ( I will be retaining the current for my downloading needs ). I will be adding another NIC and modem and will be simulataneously using both the connections from different browsers. ( I am yet to find if it possible :roll: )

Is that possible?
Anyway, I think I have to wait a while to hear opinions of other users before updating the script.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2007, 1:42 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Hi Chris,

Chris wrote:
This is no big deal because my config isn't typical: Neither the topmost script nor Skan's works on my system, probably because I have a NIC for LAN and another for Internet (so perhaps the script is monitoring the LAN one).
Code:
1 : 24 : 5
65539 : 6 : 5
65540 : 6 : 5


I uploaded a second script at the top post, which tries to add up the data of all available interfaces.
You may use it temporarily until final version is completed.
If there is still a problem, please let me know.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 28th, 2007, 9:09 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Yes, it seems to work great. Thanks!


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 9th, 2007, 8:02 pm 
Offline

Joined: December 9th, 2007, 4:24 pm
Posts: 20
I grabbed both of these scripts (Sean's on page 1 and Skan's on page 2) and wanted to modify them both in different ways. A pointer in the right direction would be useful ( and if you've the patience, the reasoning for it! helps me learn!)

Network Download/Upload Meter:

Removed the /1024 part in order to show my very variable network card connection. I am mobile 5 days a week... but that is only effective when I am on an "RTT" connection. When i get to an "EVDO" area my speed can go all the way to 2Mb/s+. What I am looking for is a way to make the bar graph logarithmic...

And for Skan's "Netmeter" script I was hoping to find a way to tell the script to look for the bitmap in a local, non-temporary directory so that it doesn't have to dl it every time... (again with explanations so I can learn instead of "mooching" all the time... I need all the help I can get... :? )

Thanks
Jim


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 9th, 2007, 9:23 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8775
ai4fu wrote:
And for Skan's "Netmeter" script I was hoping to find a way to tell the script to look for the bitmap in a local, non-temporary directory so that it doesn't have to dl it every time...


That bitmap is just 2 pixel with a size of mere 62 bytes :shock:
Looks like a dirt particle when opened in a browser.
http://www.autohotkey.net/~goyyah/samples/grad001.bmp

BTW, I wrote it in W2K and icons numbers are inconsistent when run in XP.

:)


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 10th, 2007, 6:41 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ai4fu wrote:
What I am looking for is a way to make the bar graph logarithmic...

AHK has a built-in logarithmic functions: Log()/Ln(). You may use it.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 10th, 2007, 1:45 pm 
Offline

Joined: December 9th, 2007, 4:24 pm
Posts: 20
Skan wrote:
That bitmap is just 2 pixel with a size of mere 62 bytes :shock:
Looks like a dirt particle when opened in a browser.
http://www.autohotkey.net/~goyyah/samples/grad001.bmp

You are absolutely correct, it IS minute... however I just wanted help on how to make it find the file locally, if it exists, THEN dl it if not, and save it where it could be found next time, not in the temp dir, that gets dumped too frequently...
Sean wrote:
AHK has a built-in logarithmic functions: Log()/Ln(). You may use it.

Yep, found that, but I tried to use it as a log of the divisor:
Code:
dnRate := Round((dnNew - dnOld) / log(1024))
upRate := Round((upNew - upOld) / log(1024))

...but that did not quite produce the desired result. I was thinking of trying this instead:
Code:
log(dnRate) := Round((dnNew - dnOld) / 1024)
log(upRate) := Round((upNew - upOld) / 1024)

...but I doubt it will work. :?
Thank you both for the pointers... :)

Nope...it didn't work :oops:


Report this post
Top
 Profile  
Reply with quote  
PostPosted: December 10th, 2007, 2:42 pm 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ai4fu wrote:
Code:
dnRate := Round((dnNew - dnOld) / log(1024))
upRate := Round((upNew - upOld) / log(1024))

You may use this:
Code:
dnRate := Round(ln(dnNew - dnOld + 1) * 8)
upRate := Round(ln(upNew - upOld + 1) * 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2007, 3:27 am 
Offline

Joined: December 9th, 2007, 4:24 pm
Posts: 20
Thanks Sean!

The first one did the trick nicely. It is now speed proportionate from just a bare few kb/s out in the rural areas to nearly full graph at 850 kb/s.

I must admit that I could not find a "progress control" as you put it but I guessed at it...let me know if I got it right

Code:
Gui, -Caption +Border +AlwaysOnTop +ToolWindow
Gui, Color, 00FF00
Gui, +LastFound
WinSet, TransColor, EEAA99
Gui, Add, Progress,      w100 h10 cGreen -0x1 vDn Range0-12
Gui, Add, Progress, x+10 w100 h10 cRed   -0x1 vUp Range0-12
Gui, Show, x780 y20 , NetMeter                  ; Adjust X & Y to suit your screen res

If GetIfTable(tb)
   ExitApp


Jim


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2007, 4:52 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
ai4fu wrote:
I must admit that I could not find a "progress control" as you put it but I guessed at it...let me know if I got it right

I realized that as you're new to AHK, and I think you got it right.
BTW, I updated the code so as to need not put Range. It may be better one as its range is fine-grained between 0-100, which is the default one, than 0-12. I multiplied 8 as you said the rate was 2Mbps. If it's 850Kbps, may use 8.6 instead. Or you may use log instead of ln with multiplying one between 19 and 20.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 11th, 2007, 9:47 am 
Offline

Joined: December 9th, 2007, 4:24 pm
Posts: 20
I should have qualified the 850... that was just the best speed it has gone to since I have made those changes you suggested. I do see 2Mb/s occasionally, but only in major metro areas, and then usually only when downloading torrents. Most of the time my speed ranges from 5kb/s to 500Kb/s, with the best ever at 2.86Mb/s The changes you have suggested make it work great now, exactly what I had wanted.

And yes, I am very new to AHK, indeed, I am new to scripting at all. Trust me, if there was a web page for "AHK for dummies" that's where I would be. :lol:

Most of what I do with AHK is cutting and pasting existing scripts and making changes to suit my particular needs. I have a hard time making new scripts. Just don't know enough...which is why I ask so many questions.

Thanks for your help. Seriously.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 12th, 2007, 10:30 am 
Offline

Joined: July 12th, 2005, 1:21 pm
Posts: 633
Didn't see this topic before, but it works nicely here.
I might take it as a baseground to build "Netmeter" in AHK out of it :)

Thalon

_________________
AHK-Icon-Changer
AHK-IRC
deutsches Forum


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2007, 4:45 am 
Offline

Joined: February 12th, 2007, 7:54 am
Posts: 2462
Thalon wrote:
I might take it as a baseground to build "Netmeter" in AHK out of it :)

Good to hear it. Of course you'll share it?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 17th, 2008, 3:54 pm 
Upload meter


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 59 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group