SysMetrics plugin v1.11 by Bikonja
SysMetrics is a free plugin made in Borland C++ Builder 6, using Dgilmour's
awesome small SDK!
It started out as a learning project for me. I didn't know what C++ was all
about, but then came
Dgilmour and he helped me to learn everything needed for this plugin, and helped
me a lot with it!
On to the important stuff...
SysMetrics has 4 categorys of functions, click the links
to see them
Date Picker - Mouse
& Keyboard functions - Windows settings - Window
& Screen manipulation
Date Picker functions:
- DatePicker
- DPSetPos
- DPSetColors
- DPSetRange
- DPSetFirstDay
- GetSelDate
- SetSelDate
- HideDatePicker
Mouse & keyboard functions:
- Get mouse double click time
- Set mouse double click time
- Block Mouse and Keyboard input
- Unblock Mouse and Keyboard input
- Get Mouse Position (in screen coordinates)
- Set Mouse Position (in screen coordinates)
- Get Mouse Position (in client coordinates)
- Set Mouse Position (in client coordinates)
- Get Key state
Windows settings:
- Get SysMetrics
- Get Drive type
- Get environment paths
Window & Screen manipulation:
- Set Window transparency (opacity)
- Set Window transparency (opacity) for other windows
- Set Color Transparency (make holes)
- Get Window title
- Set Window title
- Get Pixel Color
- Set Pixel Color
| DatePicker: |
|
format$='dd/mm/yyyy' -> this function creates the date picker (calendar) and it's return
value is the size of the date picker |
| DPSetPos: |
|
pos$='15,20,230,200' -> this function sets the position and size of your date picker |
| DPSetColors: |
|
colors$='255,0,0|0,255,0|0,0,255|255,0,255|0,255,255|255,255,0' -> this function changes the colors of your date picker |
| DPSetRange: |
|
range=3 -> this function sets how much dates in a range can the user select
at once |
| DPSetFirstDay: |
|
day=6 -> this function sets the first day of the week |
| GetSelDate: |
|
PluginRun("PlugIn","GetSelDate") -> this function gets the selected range of dates in an array in format startdate|enddate |
| SetSelDate: |
|
date$='13/12/2007|15/12/2007' -> this function selects the set range of dates |
| HideDatePicker: |
|
PluginRun("PlugIn","HideDatePicker") -> this function closes the date picker |
| Get mouse double click time: |
|
PluginRun("PlugIn","GetDblClickTime") -> double click time in miliseconds is stored in val |
| Set mouse double click time: |
|
PluginSet("PlugIn","500") -> 500 is your wanted double click time in miliseconds |
| Block Mouse and Keyboard input: |
|
PluginRun("PlugIn","DisableInput") -> Blocked input can be unblocked with CTRL-ALT-DEL, or by sudden program exit |
| UnBlock Mouse and Keyboard input: |
| PluginRun("PlugIn","EnableInput") |
|
KeyState: |
|
PluginSet("PlugIn","val") -> val is the ASCII value of an alphanumerical character, check MMB help for an ASCII chart. Use uppercase letters for code input, it does not matter in detection if you press upper or lower case letters; state$ is an array showing which buttons are pressed. item1 is ctrl, item2 is alt, item3 is shift and item4 is the specified key. The seperator is |. If an item is a nonzero value, the key was pressed at the time the function was executed. Check the sample for sample on how to use this stuff in real life. |
|
Get SysMetrics (check Values.htm for a list of what you can do with this): |
|
PluginSet("PlugIn","ID") -> ID is ID of the item you want to get; return value is stored in
val |
|
Set window transparency for other windows: |
|
PluginSet("PlugIn","opacity") -> opacity is wanted opacity for window from 0 (transparent) to 255
(opaque) |
|
Get window title: |
|
PluginRun("PlugIn","GetTitle") -> title$ now holds the title |
|
Set window title: |
|
title$='Your title' -> title$ holds your desired title |
|
Get drive type: |
|
drive$='C:\\' -> drive$ holds your desired drive letter with :\\ following it (MMB
can not use a single \ at end of string) |
|
Get environment paths: |
|
var$='USERPROFILE' -> var$ holds your desired environment variable (for a full list of
variables, look here - sample doesn't
show all) |
|
Get Mouse Position (screen): |
|
PluginRun("PlugIn","MousePos") -> pos$ now holds the current mouse cursor coordinates (0,0 is at the top-left corner of your screen) |
|
Set Mouse Position (screen): |
|
pix$='200,200' -> pix$ holds the wanted mouse cursor coordinates on your screen (0,0 is at the top-left corner of your screen) |
|
Get Mouse Position (client): |
|
PluginRun("PlugIn","ClientMousePos") -> pos$ now holds the current mouse cursor coordinates (0,0 is at the top-left corner of your project window) |
|
Set Mouse Position (client): |
|
pix$='200,200' -> pix$ holds the wanted mouse cursor coordinates on your project (0,0 is at the top-left corner of your project window) |
|
Get Pixel Color: |
|
pix$='200,200' -> pix$ holds your desired pixel coordinates |
|
Set Pixel Color: |
|
param$='200,200,0,0,0' -> param$ holds your desired parameters which in form x,y,r,g,b; |