Jump to content

Try it out... :)


Recommended Posts

; 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
Link to comment
Share on other sites

  • Developers

wrong forum. Can a Mod please move it?

OP can't post in the Examples yet since the post count is less than 10 ...

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

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