Jump to content

Recommended Posts

Posted

This is really turning out very nicely for something done with no outside DLL calls. I mean, AutoIt uses GDI32 calls internally obviously to do the drawing, but who knew all this could be done with basic built-in AutoIt functions (I sure didn't). Great work andy and taietel ;)

My contributions:

  Reveal hidden contents

Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFsProcess CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen)Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery

Wrappers/Modifications of others' contributions:

_DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity)

UDF's added support/programming to:

_ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne)

(All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)

Posted

Ye i made kinda different UDF not the type of statistic his using i made a wave graph monitor.

#include <GDIPlus.au3>
Func _Stat_Newpoint($x, $y)
if $point[2][0] < $y Then $point[2][0] = $y
if $point[2][1] > $y Then $point[2][1] = $y
$y = ($stat[5]-$y)
$point[0][$point[0][0]+1] = $x
$point[1][$point[0][0]+1] = $y
$point[0][0] = $point[0][0] + 1
_GDIPlus_GraphicsDrawLine ($stat[2], $x, 0, $x, $stat[5], $stat[3])
_GDIPlus_GraphicsDrawLine ($stat[2], $x, 0, $x, $y, $stat[1])
EndFunc
Func _Stat_Init($gui, $x = 300, $y = 300, $size = 1)
Global $stat[9999]
Global $point[3][99999]
$point[2][1] = 9999999 
_GDIPlus_Startup ()
$stat[1] = _GDIPlus_PenCreate()
$stat[2] = _GDIPlus_GraphicsCreateFromHWND($gui)
$stat[3] = _GDIPlus_PenCreate(0xFF00FF00)
$stat[4] = $x/$size
$stat[5] = $y/$size
$stat[6] = $size
EndFunc
Func _Stat_Update($max = "", $min = "", $click = "")
if $max <> "" Then GUICtrlSetData($max, "Max: " & $point[2][0])
if $min <> "" Then GUICtrlSetData($min, "Min: " & $point[2][1])
if $click <> "" Then GUICtrlSetData($click, "Done: " & $point[0][0])
EndFunc

example:

#include <Stat.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
    $gui = GUICreate("Monitor", 300, 100)
    GUISetState(@SW_SHOW)
    GUISetBkColor(0x000000)
    _Stat_Init($gui, 300, 100, 1.0)
    $max = GUICtrlCreateLabel("Max: ", 0, 80, 50, 20)
    GUICtrlSetBkColor(-1, 0x00FF00)
    GUICtrlSetFont(-1, 7, 1000)
    $min = GUICtrlCreateLabel("Min: ", 50, 80, 50, 20)
    GUICtrlSetBkColor(-1, 0x00FF00)
    GUICtrlSetFont(-1, 7, 1000)
    $cl = GUICtrlCreateLabel("Click: ", 100, 80, 50, 20)
    GUICtrlSetBkColor(-1, 0x00FF00)
    GUICtrlSetFont(-1, 7, 1000)
    $i = 0
    While 1
        $i = $i + 1
        $msg = GUIGetMsg()
        $ping = Ping("178.162.148.142", 100)
        ;$ping = Random(15, 100)
        _Stat_Newpoint($i, $ping)
        _Stat_Update($max, $min, $cl)
        if $i = 300 Then $i = 0
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...