Jump to content

Au3Info Change


Jon
 Share

Recommended Posts

  • Administrators

As part of my control code rewrite I noticed that Au3Info couldn't see the titles/classname of certain windows because when you activated them they then changed. (For example the Start button).

I've changed it so that instead of using the active window data it just tries to work out the window that is under the mouse cursor. Those inclined please test the new version at http://www.autoitscript.com/autoit3/files/...oit/Au3Info.exe (In the middle of lots of changes so don't want to do a full beta release).

Link to comment
Share on other sites

Hi,

yes seems to work ( XP SP2).

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

  • Administrators

I think I'm going to rewrite Au3Info - it's looking a bit long in the tooth now and it's pretty cramped. I'm going to do it as a dialog based app (see screenshot for the idea).

Before I get stuck in does anyone want to suggest a layout. The simpler the better really as I'll be doing it in Win32 :whistle: Just tabs and listview type stuff. Feel free to do some piccy mockups or some GUI in AutoIt to make suggestions.

Link to comment
Share on other sites

This isn't so much a suggestion for layout, more on function, but could you consider:

Rather than Ctrl-Alt-F to 'freeze' use it to 'lock-in' that window/control and create a (copyable)$variable representing that 'locked-in' window/control, perhaps in a multiline edit control embedded in one of the tabs. Perhaps a popup dialog prompting for a useful $var name would help. A 'locked-in' window/control would remain highlighted, but in an alternate user defined color.

If directly selecting a control, then automatically generate a $var representing its parent window as well as one for the control. Both the window and the control would then be 'locked-in' and remain highlighted in the alternate color.

This would allow us to use au3info much faster and more thoroughly by insuring we didn't miss anything, since each window/control would remain highlighted, and we could then do a bulk copy/paste of the generated $var list.

If at all possible, make it work using a left or right mouse-click to 'lock-in' or 'unlock'

EDIT: Perhaps have options to autogenerate Style/Exstyle lists for each $var, maybe as a block comment, for reference.

Edited by quaizywabbit
[u]Do more with pre-existing apps![/u]ANYGUIv2.8
Link to comment
Share on other sites

  • Administrators

Initial layout

Top Area (always visible)

Basic Window Info
 Title
 Class

Basic Control Info
 ID
 Class

Tabs: Window, Visible Text, Hidden Text, Control, Mouse


Window
 (ListView style)
 Title
 Class
 Size
 Style
 ExStyle

 Statusbar Parts

Visible Text
 (Disabled Multiline Edit control) 
 Text
 
Hidden Text
 (Disabled Multiline Edit control)
 Text

Control
 (ListView style)
 Class
 Instance
 Text
 Size
 Style
 ExStyle

Mouse
 (ListView style)
 Position
 Cursor ID
 Colour under mouse

Link to comment
Share on other sites

Ideas:

- make some confortable way for copy all/selected info to clipboard/file (Export)

- make some buttons for generating AU3 code

Here is my GUI quickly maded in Koda based on Jon's ideas.

You can use it to easy make modified GUI prototype :whistle:

Au3Info.kxf: (sorry for that big KXF text, I have full attachments space)

<?xml version="1.0" encoding="windows-1251"?>
<object type="TAForm" name="AForm1">
    <properties>
        <property name="Left" vt="Int16">192</property>
        <property name="Top" vt="Int8">114</property>
        <property name="Width" vt="Int16">491</property>
        <property name="Height" vt="Int16">583</property>
        <property name="Caption" vt="String">Au3Info</property>
        <property name="Color" vt="Ident">clBtnFace</property>
        <property name="Font.Charset" vt="Ident">DEFAULT_CHARSET</property>
        <property name="Font.Color" vt="Ident">clWindowText</property>
        <property name="Font.Height" vt="Int8">-11</property>
        <property name="Font.Name" vt="String">MS Sans Serif</property>
        <property name="Font.Style" vt="Set"/>
        <property name="OldCreateOrder" vt="False">False</property>
        <property name="Visible" vt="True">True</property>
        <property name="Style" vt="Int32">-1798701056</property>
        <property name="ExStyle" vt="Int16">256</property>
        <property name="Version" vt="String">1.02</property>
        <property name="PixelsPerInch" vt="Int8">96</property>
        <property name="TextHeight" vt="Int8">13</property>
    </properties>
    <components>
        <object type="TAGroup" name="AGroup1">
            <properties>
                <property name="Left" vt="Int8">8</property>
                <property name="Top" vt="Int8">4</property>
                <property name="Width" vt="Int16">401</property>
                <property name="Height" vt="Int8">81</property>
                <property name="CtrlStyle" vt="Int32">1342308359</property>
                <property name="CtrlExStyle" vt="Int8">0</property>
                <property name="Caption" vt="String"> Basic window info </property>
                <property name="TabOrder" vt="Int8">0</property>
            </properties>
            <components>
                <object type="TALabel" name="ALabel1">
                    <properties>
                        <property name="Left" vt="Int8">24</property>
                        <property name="Top" vt="Int8">24</property>
                        <property name="Width" vt="Int8">27</property>
                        <property name="Height" vt="Int8">17</property>
                        <property name="Caption" vt="String">Title:</property>
                        <property name="TabOrder" vt="Int8">0</property>
                        <property name="HaveVariable" vt="False">False</property>
                        <property name="CtrlStyle" vt="Int32">1342177536</property>
                        <property name="CtrlExStyle" vt="Int8">0</property>
                    </properties>
                    <components/>
                </object>
                <object type="TALabel" name="ALabel2">
                    <properties>
                        <property name="Left" vt="Int8">24</property>
                        <property name="Top" vt="Int8">48</property>
                        <property name="Width" vt="Int8">32</property>
                        <property name="Height" vt="Int8">17</property>
                        <property name="Caption" vt="String">Class:</property>
                        <property name="TabOrder" vt="Int8">1</property>
                        <property name="HaveVariable" vt="False">False</property>
                        <property name="CtrlStyle" vt="Int32">1342177536</property>
                        <property name="CtrlExStyle" vt="Int8">0</property>
                    </properties>
                    <components/>
                </object>
                <object type="TAInput" name="AInput1">
                    <properties>
                        <property name="Left" vt="Int8">72</property>
                        <property name="Top" vt="Int8">24</property>
                        <property name="Width" vt="Int16">233</property>
                        <property name="Height" vt="Int8">21</property>
                        <property name="TabOrder" vt="Int8">2</property>
                        <property name="CtrlStyle" vt="Int32">1342242944</property>
                        <property name="CtrlExStyle" vt="Int16">512</property>
                    </properties>
                    <components/>
                </object>
                <object type="TAInput" name="AInput2">
                    <properties>
                        <property name="Left" vt="Int8">72</property>
                        <property name="Top" vt="Int8">48</property>
                        <property name="Width" vt="Int16">233</property>
                        <property name="Height" vt="Int8">21</property>
                        <property name="TabOrder" vt="Int8">3</property>
                        <property name="CtrlStyle" vt="Int32">1342242944</property>
                        <property name="CtrlExStyle" vt="Int16">512</property>
                    </properties>
                    <components/>
                </object>
            </components>
        </object>
        <object type="TATab" name="ATab1">
            <properties>
                <property name="Left" vt="Int8">0</property>
                <property name="Top" vt="Int16">184</property>
                <property name="Width" vt="Int16">481</property>
                <property name="Height" vt="Int16">369</property>
                <property name="ActivePage" vt="Ident">TabSheet1</property>
                <property name="TabOrder" vt="Int8">1</property>
                <property name="CtrlStyle" vt="Int32">1409351680</property>
                <property name="CtrlExStyle" vt="Int8">0</property>
            </properties>
            <components>
                <object type="TTabSheet" name="TabSheet1">
                    <properties>
                        <property name="Caption" vt="String">Window</property>
                    </properties>
                    <components>
                        <object type="TAListView" name="AListView1">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">24</property>
                                <property name="Width" vt="Int16">466</property>
                                <property name="Height" vt="Int16">158</property>
                                <property name="Columns" vt="Collection">
                                    <collection>
                                        <item>
                                            <property name="Caption" vt="String">Title</property>
                                            <property name="Width" vt="Int16">130</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Class</property>
                                            <property name="Width" vt="Int8">110</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Size</property>
                                            <property name="Width" vt="Int8">70</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Style</property>
                                            <property name="Width" vt="Int8">70</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">ExStyle</property>
                                            <property name="Width" vt="Int8">70</property>
                                        </item>
                                    </collection>
                                </property>
                                <property name="TabOrder" vt="Int8">0</property>
                                <property name="CtrlStyle" vt="Int32">1342242829</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                        <object type="TALabel" name="ALabel5">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">8</property>
                                <property name="Width" vt="Int8">46</property>
                                <property name="Height" vt="Int8">17</property>
                                <property name="Caption" vt="String">Window:</property>
                                <property name="TabOrder" vt="Int8">1</property>
                                <property name="HaveVariable" vt="False">False</property>
                                <property name="CtrlStyle" vt="Int32">1342177536</property>
                                <property name="CtrlExStyle" vt="Int8">0</property>
                            </properties>
                            <components/>
                        </object>
                        <object type="TALabel" name="ALabel6">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int16">192</property>
                                <property name="Width" vt="Int8">79</property>
                                <property name="Height" vt="Int8">17</property>
                                <property name="Caption" vt="String">Statusbar Parts:</property>
                                <property name="TabOrder" vt="Int8">2</property>
                                <property name="HaveVariable" vt="False">False</property>
                                <property name="CtrlStyle" vt="Int32">1342177536</property>
                                <property name="CtrlExStyle" vt="Int8">0</property>
                            </properties>
                            <components/>
                        </object>
                        <object type="TAListView" name="AListView2">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int16">208</property>
                                <property name="Width" vt="Int16">466</property>
                                <property name="Height" vt="Int16">134</property>
                                <property name="Columns" vt="Collection">
                                    <collection>
                                        <item>
                                            <property name="Caption" vt="String">Part</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Text</property>
                                            <property name="Width" vt="Int16">300</property>
                                        </item>
                                    </collection>
                                </property>
                                <property name="TabOrder" vt="Int8">3</property>
                                <property name="CtrlStyle" vt="Int32">1342242829</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                    </components>
                </object>
                <object type="TTabSheet" name="TabSheet2">
                    <properties>
                        <property name="Caption" vt="String">Visible Text</property>
                    </properties>
                    <components>
                        <object type="TAEdit" name="AEdit1">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">8</property>
                                <property name="Width" vt="Int16">465</property>
                                <property name="Height" vt="Int16">329</property>
                                <property name="Enabled" vt="False">False</property>
                                <property name="TabOrder" vt="Int8">0</property>
                                <property name="CtrlStyle" vt="Int32">1345392836</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                    </components>
                </object>
                <object type="TTabSheet" name="TabSheet3">
                    <properties>
                        <property name="Caption" vt="String">Hidden Text</property>
                    </properties>
                    <components>
                        <object type="TAEdit" name="AEdit2">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">8</property>
                                <property name="Width" vt="Int16">465</property>
                                <property name="Height" vt="Int16">329</property>
                                <property name="Enabled" vt="False">False</property>
                                <property name="TabOrder" vt="Int8">0</property>
                                <property name="CtrlStyle" vt="Int32">1345392836</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                    </components>
                </object>
                <object type="TTabSheet" name="TabSheet4">
                    <properties>
                        <property name="Caption" vt="String">Control</property>
                    </properties>
                    <components>
                        <object type="TAListView" name="AListView3">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">8</property>
                                <property name="Width" vt="Int16">466</property>
                                <property name="Height" vt="Int16">334</property>
                                <property name="Columns" vt="Collection">
                                    <collection>
                                        <item>
                                            <property name="Caption" vt="String">Class</property>
                                            <property name="Width" vt="Int8">90</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Instance</property>
                                            <property name="Width" vt="Int8">65</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Text</property>
                                            <property name="Width" vt="Int16">150</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Size</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Style</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">ExStyle</property>
                                        </item>
                                    </collection>
                                </property>
                                <property name="TabOrder" vt="Int8">0</property>
                                <property name="CtrlStyle" vt="Int32">1342242829</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                    </components>
                </object>
                <object type="TTabSheet" name="TabSheet5">
                    <properties>
                        <property name="Caption" vt="String">Mouse</property>
                    </properties>
                    <components>
                        <object type="TAListView" name="AListView4">
                            <properties>
                                <property name="Left" vt="Int8">4</property>
                                <property name="Top" vt="Int8">8</property>
                                <property name="Width" vt="Int16">466</property>
                                <property name="Height" vt="Int16">334</property>
                                <property name="Columns" vt="Collection">
                                    <collection>
                                        <item>
                                            <property name="Caption" vt="String">Position</property>
                                            <property name="Width" vt="Int8">70</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Cursor ID</property>
                                            <property name="Width" vt="Int8">65</property>
                                        </item>
                                        <item>
                                            <property name="Caption" vt="String">Color under mouse</property>
                                            <property name="Width" vt="Int8">110</property>
                                        </item>
                                    </collection>
                                </property>
                                <property name="TabOrder" vt="Int8">0</property>
                                <property name="CtrlStyle" vt="Int32">1342242829</property>
                                <property name="CtrlExStyle" vt="Int16">512</property>
                            </properties>
                            <components/>
                        </object>
                    </components>
                </object>
            </components>
        </object>
        <object type="TAGroup" name="AGroup2">
            <properties>
                <property name="Left" vt="Int8">8</property>
                <property name="Top" vt="Int8">91</property>
                <property name="Width" vt="Int16">401</property>
                <property name="Height" vt="Int8">81</property>
                <property name="CtrlStyle" vt="Int32">1342308359</property>
                <property name="CtrlExStyle" vt="Int8">0</property>
                <property name="Caption" vt="String"> Basic control info </property>
                <property name="TabOrder" vt="Int8">2</property>
            </properties>
            <components>
                <object type="TALabel" name="ALabel3">
                    <properties>
                        <property name="Left" vt="Int8">24</property>
                        <property name="Top" vt="Int8">24</property>
                        <property name="Width" vt="Int8">18</property>
                        <property name="Height" vt="Int8">17</property>
                        <property name="Caption" vt="String">ID:</property>
                        <property name="TabOrder" vt="Int8">0</property>
                        <property name="HaveVariable" vt="False">False</property>
                        <property name="CtrlStyle" vt="Int32">1342177536</property>
                        <property name="CtrlExStyle" vt="Int8">0</property>
                    </properties>
                    <components/>
                </object>
                <object type="TALabel" name="ALabel4">
                    <properties>
                        <property name="Left" vt="Int8">24</property>
                        <property name="Top" vt="Int8">48</property>
                        <property name="Width" vt="Int8">32</property>
                        <property name="Height" vt="Int8">17</property>
                        <property name="Caption" vt="String">Class:</property>
                        <property name="TabOrder" vt="Int8">1</property>
                        <property name="HaveVariable" vt="False">False</property>
                        <property name="CtrlStyle" vt="Int32">1342177536</property>
                        <property name="CtrlExStyle" vt="Int8">0</property>
                    </properties>
                    <components/>
                </object>
                <object type="TAInput" name="AInput3">
                    <properties>
                        <property name="Left" vt="Int8">72</property>
                        <property name="Top" vt="Int8">24</property>
                        <property name="Width" vt="Int16">233</property>
                        <property name="Height" vt="Int8">21</property>
                        <property name="TabOrder" vt="Int8">2</property>
                        <property name="CtrlStyle" vt="Int32">1342242944</property>
                        <property name="CtrlExStyle" vt="Int16">512</property>
                    </properties>
                    <components/>
                </object>
                <object type="TAInput" name="AInput4">
                    <properties>
                        <property name="Left" vt="Int8">72</property>
                        <property name="Top" vt="Int8">48</property>
                        <property name="Width" vt="Int16">233</property>
                        <property name="Height" vt="Int8">21</property>
                        <property name="TabOrder" vt="Int8">3</property>
                        <property name="CtrlStyle" vt="Int32">1342242944</property>
                        <property name="CtrlExStyle" vt="Int16">512</property>
                    </properties>
                    <components/>
                </object>
            </components>
        </object>
    </components>
</object>

Au3Info.au3:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Program Files\AutoIt3\SciTE\Koda\Forms\Au3Info.kxf
$Form1 = GUICreate("Au3Info", 484, 556, 193, 115)
$Group1 = GUICtrlCreateGroup(" Basic window info ", 8, 4, 401, 81)
$Label1 = GUICtrlCreateLabel("Title:", 32, 28, 27, 17)
$Label2 = GUICtrlCreateLabel("Class:", 32, 52, 32, 17)
$Input1 = GUICtrlCreateInput("", 80, 28, 233, 21)
$Input2 = GUICtrlCreateInput("", 80, 52, 233, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Tab1 = GUICtrlCreateTab(0, 184, 481, 369)
$TabSheet1 = GUICtrlCreateTabItem("Window")
$ListView1 = GUICtrlCreateListView("Title|Class|Size|Style|ExStyle", 8, 232, 466, 158)
$Label5 = GUICtrlCreateLabel("Window:", 8, 216, 46, 17)
$Label6 = GUICtrlCreateLabel("Statusbar Parts:", 8, 400, 79, 17)
$ListView2 = GUICtrlCreateListView("Part|Text", 8, 416, 466, 134)
$TabSheet2 = GUICtrlCreateTabItem("Visible Text")
$Edit1 = GUICtrlCreateEdit("", 8, 216, 465, 329)
GUICtrlSetState(-1, $GUI_DISABLE)
$TabSheet3 = GUICtrlCreateTabItem("Hidden Text")
$Edit2 = GUICtrlCreateEdit("", 8, 216, 465, 329)
GUICtrlSetState(-1, $GUI_DISABLE)
$TabSheet4 = GUICtrlCreateTabItem("Control")
$ListView3 = GUICtrlCreateListView("Class|Instance|Text|Size|Style|ExStyle", 8, 216, 466, 334)
$TabSheet5 = GUICtrlCreateTabItem("Mouse")
$ListView4 = GUICtrlCreateListView("Position|Cursor ID|Color under mouse", 8, 216, 466, 334)
GUICtrlCreateTabItem("")
$Group2 = GUICtrlCreateGroup(" Basic control info ", 8, 91, 401, 81)
$Label3 = GUICtrlCreateLabel("ID:", 32, 115, 18, 17)
$Label4 = GUICtrlCreateLabel("Class:", 32, 139, 32, 17)
$Input3 = GUICtrlCreateInput("", 80, 115, 233, 21)
$Input4 = GUICtrlCreateInput("", 80, 139, 233, 21)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by Zedna
Link to comment
Share on other sites

  • Administrators

Updated. I think next i'll add one of those window finder widgets that you drag.

Also not sure how to display the Instance number of a window. Class and instance like the control or title and instance...bearing in mind if you specify title AND class the instance number is different to title+instance or class+instance.

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