Jump to content

Recommended Posts

Posted (edited)

; Script By DaProgrammer, for use as an autoit programming assistant
#include <GUIConstants.au3>
#include <Constants.au3>
Opt("TrayMenuMode",1)
;
$i=1
#region - Tray
Opt("TrayOnEventMode", 1)
TraySetOnEvent($TRAY_EVENT_PRIMARYDOWN, "Tray")
TraySetOnEvent($TRAY_EVENT_SECONDARYDOWN, "Tray2")
Func Tray()
    If $i=1 Then
        GUISetState(@SW_HIDE)
        $i=0
        Return
    EndIf
    If $i=0 Then
        GUISetState(@SW_SHOW)
        $i=1
        Return
    EndIf   
EndFunc
Func Tray2()
    Exit
EndFunc
#endregion
;
$Prog=GUICreate("", 68, 155, -1, -1, "", BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
$b1 = GUICtrlCreateRadio("Absolute", 00, 00, 60, 15)
$b2 = GUICtrlCreateRadio("Relative", 00, 15, 60, 15)
$Label_mouse = GUICtrlCreateLabel("Mouse", 00, 30, 60, 15, BitOR($SS_CENTER, $SS_SUNKEN))
$Label_cords = GUICtrlCreateLabel("", 00, 45, 60, 15, $SS_CENTER)
$Label_ID = GUICtrlCreateLabel("Control ID", 00, 60, 60, 15, BitOR($SS_CENTER, $SS_SUNKEN))
$Label_ID2 = GUICtrlCreateLabel("", 00, 75, 60, 15, $SS_CENTER)
$Label_H = GUICtrlCreateLabel("Control Handle", 00, 90, 60, 30, BitOR($SS_CENTER, $SS_SUNKEN))
$Label_H2 = GUICtrlCreateLabel("", 00, 120, 60, 15, $SS_CENTER)
GUISetState()
While 1
    $x = MouseGetPos(0)
    $y = MouseGetPos(1)
    GUICtrlSetData($Label_cords, $x & "/" & $y)
    $point = MouseGetPos()
    $hwnd = DllCall("user32.dll", "hwnd", "WindowFromPoint", "int", $point[0], "int", $point[1])
    $hWIN = $hwnd[0]
    $ID = DllCall('User32.dll', 'int', 'GetDlgCtrlID', 'hwnd', $hWIN)
    GUICtrlSetData($Label_ID2, $ID[0])
    GUICtrlSetData($Label_H2, $hWIN)
    $msg = GUIGetMsg()
    If $msg = $b1 Then Opt("MouseCoordMode", 1)
    If $msg = $b2 Then Opt("MouseCoordMode", 0)
WEnd

been using autoit for a while now and made this tool for myself, so why not share :whistle:

tell me how u like it and is there anything i should add ?

P.S. left click to Hide/Show the tool, and right click to close it.

Edited by DaProgrammer
Posted

yes it is :whistle: but its smaller (doesnt take half the screen) and more conviniet to my sence.

Yes, smaller is an advantage.

Needs a slightly taller form for XP because the Control ID is not shown fully. (Another 5 pixels maybe?)

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Posted

Yes, smaller is an advantage.

Needs a slightly taller form for XP because the Control ID is not shown fully. (Another 5 pixels maybe?)

i think u can manage to add 5 pixel's :whistle: im not using any theme so it looks ok here.

Posted

Maybe if you had said in the first post what the heck it's supposed to do, you would have had more people trying it, and more responses.

My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!

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...