Jump to content

Koda helper - Design your dialogs faster


E1M1
 Share

Recommended Posts

Since I have to do lots of forms in Koda I decided to write little helper that saves my time. I hope it also saves someone else's time.

Idea is that you press one of 4 key combinations and then my script auto clicks on button chat creates new control, places that control on From1 at location of your muse and then clicks on caption/name to save your time.

How does it save time?

1) by auto placing control on GUI - You cont have to manually click on most common controls and then place them manually.

2) By auto clicking on Object Inspector to edit it's name/caption.

Keycombinations:

Alt + L = Add label at your mouse post and start editing it's caption

Alt + I = Add input at your mouse post and start editing it's name

Alt + C = Add combobox at your mouse post and start editing it's name

Alt + B = Add button at your mouse post and start editing it's name

#include <Misc.au3>
Opt("MouseCoordMode", 2) ;1=absolute, 0=relative, 2=client

$dll = DllOpen("user32.dll")
$Alt = "12"
$L = "4C"
$I = "49"
$C = "43"
$B = "42"

While 1
    If ProcessExists("Fd.exe") Then
        If WinActive("[CLASS:TAForm]") Then
            If _IsPressed($Alt, $dll) Then
                If _IsPressed($L, $dll) Then
                    ConsoleWrite("Click on Label" & @CRLF)
                    Opt("MouseCoordMode", 1)
                    $xy = MouseGetPos()
                    Opt("MouseCoordMode", 2)
                    WinActivate("oda FormDesigner")
                    Sleep(50)
                    MouseClick("", 225, 65, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseClick("", $xy[0], $xy[1], 1, 0)
                    Opt("MouseCoordMode", 2)
                    WinActivate("Object Inspector")
                    MouseClick("", 100, 70, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseMove($xy[0], $xy[1],0)
                    Opt("MouseCoordMode", 2)
                EndIf
            EndIf
            If _IsPressed($Alt, $dll) Then
                If _IsPressed($C, $dll) Then
                    ConsoleWrite("Click on Label" & @CRLF)
                    Opt("MouseCoordMode", 1)
                    $xy = MouseGetPos()
                    Opt("MouseCoordMode", 2)
                    WinActivate("oda FormDesigner")
                    Sleep(50)
                    MouseClick("", 450, 65, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseClick("", $xy[0], $xy[1], 1, 0)
                    Opt("MouseCoordMode", 2)
                    WinActivate("Object Inspector")
                    MouseClick("", 100, 200, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseMove($xy[0], $xy[1],0)
                    Opt("MouseCoordMode", 2)
                EndIf
            EndIf
            If _IsPressed($Alt, $dll) Then
                If _IsPressed($I, $dll) Then
                    ConsoleWrite("Click on Label" & @CRLF)
                    Opt("MouseCoordMode", 1)
                    $xy = MouseGetPos()
                    Opt("MouseCoordMode", 2)
                    WinActivate("oda FormDesigner")
                    Sleep(50)
                    MouseClick("", 250, 65, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseClick("", $xy[0], $xy[1], 1, 0)
                    Opt("MouseCoordMode", 2)
                    WinActivate("Object Inspector")
                    MouseClick("", 100, 160, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseMove($xy[0], $xy[1],0)
                    Opt("MouseCoordMode", 2)
                EndIf
            EndIf
            If _IsPressed($Alt, $dll) Then
                If _IsPressed($B, $dll) Then
                    ConsoleWrite("Click on Label" & @CRLF)
                    Opt("MouseCoordMode", 1)
                    $xy = MouseGetPos()
                    Opt("MouseCoordMode", 2)
                    WinActivate("oda FormDesigner")
                    Sleep(50)
                    MouseClick("", 320, 65, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseClick("", $xy[0], $xy[1], 1, 0)
                    Opt("MouseCoordMode", 2)
                    WinActivate("Object Inspector")
                    MouseClick("", 100, 190, 1, 0)
                    Opt("MouseCoordMode", 1)
                    MouseMove($xy[0], $xy[1],0)
                    Opt("MouseCoordMode", 2)
                EndIf
            EndIf
        EndIf
    EndIf
WEnd
Edited by E1M1

edited

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