Jump to content

Dial Indicator (Needle Gauge)


Recommended Posts

I'm looking for a way to display wmi info as a gauge. I think I've looked everywhere there is to look, and I haven't found anyone who has used autoit to do it.

I can't be that hard, though. Even looking at the source for Analog Clock, I can see how to easily set up the dial background. Then you just have to poll the info you want at whatever interval, and draw the line on the screen. I have begun modifying the source for analog clock (below).

a: am I on the right track?

b: am I reinventing the wheel? If so, tell me where to look....

Link to comment
Share on other sites

Your probably on the right track.

Don't think anyone have done it in a AutoIt only udf before. You could probably find external libraries to do it.

Looking forward to see the finished implementation.

Have fun and happy scripting..:whistle:

Uten

Link to comment
Share on other sites

Link to comment
Share on other sites

mmm...... I feel a new project coming on! :whistle:

Here's what I've got done:

renamed all variables over to make more sense ("dial indicator" instead of "Clock"

remove min and hour hands

mapped in some sample wmi (Available ram) just to see it work.

Yet to be done:

Clean up min/hr hash marks at bottom of screen

reset needle to begin at "0" mark instead of "5" mark. (Should begin at 7 o'clock position instead of 12 o'clock position)

implement timer to refresh and redisplay needle on some time interval (4 times per second or whatever)

format/visual improvements (Background colors, fonts, etc.)

gui to select which wmi you'd like to monitor

Either manual or automatic selection of proper scale for the data that will be displayed.

Do I continue this here, or in example scripts, or what?

Thanks in advance,

Bob

Link to comment
Share on other sites

  • 10 months later...

Ok I couldn't find the topic in example scripts .

I do apologize if I missed it and it is a wrong thread to post.

Anyway I found this wonderful script and wanted to make it more useful for my application (UPS monitoring client).

So I started modifying it in all kinds of ways.

First I replaced all dll stuff with Gdiplus library calls to make the program easier to read.

Second I made the gauge half height (If you run it you will see what I mean).

This is still a work in progress while the ultimate goal for me is to make one function with all parameters (scale values , colors to draw on the scale , labels etc and the size of window) which will draw the dial and another function to update dial's value.

Then I hope others will be able to use it in their applications.

Anyway thanks to all who contributed to the original script and of course comments are welcome :)

The script is attached to the message.

dial.au3

Link to comment
Share on other sites

I don't think I have a permission to do that.

Can someone of the mods create the topic for me?

Then I will put my script there.

OK I do apologize.

Anyway I created the topic in example scripts and put my script there :)

Those interested in the script please go there.

Edited by matrix200
Link to comment
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
 Share

  • Recently Browsing   0 members

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