Jump to content
Sign in to follow this  
Erik.

Get info about internet and cpu

Recommended Posts

Erik.

Hello,

I needed to make something and i was thinking about this:

I have wireless internet, the mpb i have is not always the same, sometimes high and some low.

Now do i want to make a script when you press a key you will get an popup whit the information from my wireless internet like, the signal i have, the time i am on internet.

Also do i want to make a popup if my cpu high like above the 40 or something like that.

At my taskbar i have a icon whit my wireless internet, i already take a look whit autoit window info but when i stay on it i can not get the info i want.

How to get what i want?

How to get my cpu whitout opening taskbar or dos?

Could someone please help me a bit?

greatzz Erik


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites
Erik.

Think i need to explain it a bit..

I have found a script that shows your cpu activity:

; ============================================================================
; Program Name: CPU Meter
; Version: V0.1
; AutoIt Version : v3.2.2.0
; Author : Polyphem
; Description:
;
; Usage Monitor for a Multi-Core CPUs, using the WMI Service to retrieve the actual workload / utilization (similar to the Windows TaskManager)
; Should work on any system, just showing the actual  processors / cores (hyperthreading?) present
;
; Currently it supports 4 processors... now guess which processor I have smile.gif....
;
; ============================================================================

; ============================================================================
; Declare includes, opts and local/global variables
; ============================================================================

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1)

Local $CenterWidth = (@DesktopWidth - 200) / 2
Local $CenterHeight = (@DesktopHeight - 300) / 2

$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")

; ============================================================================
; GUI Definition
; ============================================================================

$gui = GUICreate("CPU Meter",100,300,$CenterWidth, $CenterHeight,-1,$WS_EX_TOPMOST)
GUISetOnEvent(-3, "_Exit_Event", $gui)
GUISetIcon (@SystemDir & "\shell32.dll",12)

GUICtrlCreateLabel ("CPU1",5,3,40,20,$SS_CENTER)
$progressbar_core1 = GUICtrlCreateProgress (10,20,30,250,$PBS_VERTICAL)
$label_core1 = GUICtrlCreateLabel ("",10,275,30,20,$SS_CENTER)


GUISetState ()

; ============================================================================
; Main Loop
; ============================================================================

While 1
    $colItems = $objWMIService.ExecQuery("SELECT LoadPercentage FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
        $i = 0
        For $objItem In $colItems
            if $i = 0 Then
                GUICtrlSetData ($progressbar_core1,$objItem.LoadPercentage)
                GUICtrlSetData ($label_core1,$objItem.LoadPercentage & "%")
            EndIf
            $i += 1
        Next
    Else
        MsgBox(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_Processor")
    EndIf
    sleep(500)
WEnd

; ============================================================================
; Functions
; ============================================================================

Func _Exit_Event()
    Exit
EndFunc

Now am i also looking for a script that shows me all info avout wireless internet, like sginal, how fast, whit what network i am connected etc..

Could someone help me whit it?


I little problem, hard to find and fix

Share this post


Link to post
Share on other sites
John117

Good script . . . Im gonna add this to a tool bar some one wrote. I'll get back to ya with the results

Share this post


Link to post
Share on other sites
Greenhorn

Hi,

it shows me just one core on the window, but I have an AMD Athlon64 X2 !

All drivers are installed ...

Greetz

Greenhorn

Share this post


Link to post
Share on other sites
John117

Something I started working on after seeing this. The origional toolbar was from someone in the shell competition. *I will have to find them later to add them to the contribution list.

; Major Contributor: Polyphem
#include <GUIConstants.au3>
HotKeySet("{esc}", "_Exit")
Opt("GUIOnEventMode", 1)
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$colItems = ""
$strComputer = "localhost"
$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$progressBar_X = ((@DesktopWidth/10)*7.5)
$progressBar_Length = (@DesktopWidth/8)
$label_core1_X = ($progressBar_X + $progressBar_Length + 5)
$GUICtrlCreateLabel_X = ($progressBar_X - 40)
; ============================================================================
; GUI Definition
; ============================================================================
$gui = GUICreate("",@DesktopWidth,40,"", "", $WS_POPUPWINDOW)
GUICtrlCreateLabel ("Core1",$GUICtrlCreateLabel_X,0,40,20,$SS_CENTER)
$progressbar_core1 = GUICtrlCreateProgress ($progressBar_X,0,$progressBar_Length,20)
$label_core1 = GUICtrlCreateLabel ("",$label_core1_X,0,20,20,$SS_CENTER)
$startmenu = GUICtrlCreateMenu ("&Start")
; Define Start Menu Items
$cmditem = GUICtrlCreateMenuitem ("CMD",$startmenu)
$Exititem = GUICtrlCreateMenuItem("Exit", $startmenu)
GUISetState ()
; ============================================================================
; Main Loop
; ============================================================================
While 1
        $msg = GUIGetMsg()
    $colItems = $objWMIService.ExecQuery("SELECT LoadPercentage FROM Win32_Processor", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
    If IsObj($colItems) Then
        $i = 0
        For $objItem In $colItems
            if $i = 0 Then
                GUICtrlSetData ($progressbar_core1,$objItem.LoadPercentage)
                GUICtrlSetData ($label_core1,$objItem.LoadPercentage & "%")
            EndIf
            $i += 1
        Next
    Else
        MsgBox(0, "WMI Output", "No WMI Objects Found for class: " & "Win32_Processor")
    EndIf
    If $msg = $GUI_EVENT_CLOSE OR $msg = $Exititem Then _exit()
    If $msg = $cmditem Then _RunCMD()
    sleep(500)
WEnd
; ============================================================================
; Functions
; ============================================================================
func _Exit()
    Exit
EndFunc ;==> _exit()
; Run CMD Function
func _RunCMD()
    Run("cmd.exe")
EndFunc ;==> _RunCMD()

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.