oMBRa Posted August 31, 2008 Share Posted August 31, 2008 how to see what is the currently connex and the bytes sended and received? Link to comment Share on other sites More sharing options...
oMBRa Posted September 1, 2008 Author Share Posted September 1, 2008 bump Link to comment Share on other sites More sharing options...
picaxe Posted September 1, 2008 Share Posted September 1, 2008 A WMI example generated from ScriptOmatic (can be downloaded from the Examples forum) by SvenP $objWMIService = ObjGet("winmgmts:\\.\root\cimv2") $objClass = $objWMIService.ExecQuery("Select * from Win32_PerfRawData_Tcpip_NetworkInterface") For $obj In $objClass msgbox(1,"","Interface: " & $obj.Name & @CRLF & _ "Bytes Received/sec: " & $obj.BytesReceivedPerSec & @CRLF & _ "Bytes Sent/sec: " & $obj.BytesSentPerSec & @CRLF & _ "Bytes Total/sec: " & $obj.BytesTotalPerSec & @CRLF & _ "Network rate: " & $obj.CurrentBandwidth) Next Link to comment Share on other sites More sharing options...
oMBRa Posted September 2, 2008 Author Share Posted September 2, 2008 doesnt work for me. No MsgBox are displayed Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 2, 2008 Share Posted September 2, 2008 Taken from XenoBiologist (hope I spelled that right) $INTERNET_CONNECTION_MODEM = 0x1 $INTERNET_CONNECTION_LAN = 0x2 $INTERNET_CONNECTION_PROXY = 0x4 $INTERNET_CONNECTION_MODEM_BUSY = 0x8 $INTERNET_RAS_INSTALLED = 0x10 $INTERNET_CONNECTION_OFFLINE = 0x20 $INTERNET_CONNECTION_CONFIGURED = 0x40 $ret = DllCall("WinInet.dll", "int", "InternetGetConnectedState", "int_ptr", 0, "int", 0) If $ret[0] Then ;check type of connection $sX = "Connected !" & @LF & "------------------" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_MODEM) Then $sX &= "MODEM" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_LAN) Then $sX &= "LAN" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_PROXY) Then $sX &= "PROXY" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_MODEM_BUSY) Then $sX &= "MODEM_BUSY" & @LF If BitAND($ret[1], $INTERNET_RAS_INSTALLED) Then $sX &= "RAS_INSTALLED" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_OFFLINE) Then $sX &= "OFFLINE" & @LF If BitAND($ret[1], $INTERNET_CONNECTION_CONFIGURED) Then $sX &= "CONFIGURED" & @LF Else $sX = "Not Connected" EndIf MsgBox(4096, $ret[0] & ":" & $ret[1], $sX) Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
oMBRa Posted September 2, 2008 Author Share Posted September 2, 2008 I have to know bytes sent and received not if Im connecteb... thoug thx Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 2, 2008 Share Posted September 2, 2008 That tells if you're connected and what's connected. You can probably use WMI to get the sent/recieved data. You should use that script as a base and work from there. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
oMBRa Posted September 2, 2008 Author Share Posted September 2, 2008 I dont much know about Dll Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 2, 2008 Share Posted September 2, 2008 I dont much know about DllNeither do I but it's a great way to learn. Just look at the parameters on MSDN when you find the function you need (google is your friend) then use DllCall to use it. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
picaxe Posted September 2, 2008 Share Posted September 2, 2008 (edited) WMI is preinstalled on all but WinNT4 and win95/98 Edited September 2, 2008 by picaxe Link to comment Share on other sites More sharing options...
oMBRa Posted September 2, 2008 Author Share Posted September 2, 2008 Seems I cant found WMI parameters on MSDN Link to comment Share on other sites More sharing options...
oMBRa Posted September 3, 2008 Author Share Posted September 3, 2008 bump Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 3, 2008 Share Posted September 3, 2008 bumpYou're getting kind of annoying, as you seem to have no effort into this at all. Post the last code you tried and exactly what results you got. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
oMBRa Posted September 4, 2008 Author Share Posted September 4, 2008 Picaxe code's showed nothing,dbzfanatic's code says only if im connected... So I have no code and I cant found any parameter of WMI on msdn, with my last post I meant if anyone could give me any link Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 4, 2008 Share Posted September 4, 2008 Picaxe code's showed nothing,dbzfanatic's code says only if im connected... So I have no code and I cant found any parameter of WMI on msdn, with my last post I meant if anyone could give me any linkGoogle: +WMI +MSDNOver 400K results... AutoIt forum search: WMIMost recent 1000 results... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now