6 posts in this topic
WindowEx - Additional Window Statistics - Release: V0.4 - 10/04/2016
A UDF with Extended Functions for Window Management
This UDF is still in Alpha phase. All code works and should be generally bug free, however function names and parameters are subject to change.
Fixes _WindowGetClassList's barbaric returning of a @LF separated string instead of an array.
Automating applications that change their controls' handles/classes on each launch (e.g. half of Cisco's programs)
10/04/2016 (v0.4): _WinGetClassNNList Fixed : Not Returning an Index when using $2D_ARRAY _WinGetClassNNList Fixed : Not Properly returning $aArray[x] on Classes with instances > 9 when using $2D_ARRAY 10/03/2016 (v0.3): _WinGetClassList Added : Exactly the same as WinGetClassList but returns a more civilized Array _WinGetClassNNList Added : Returns Classes and their instances in either a 1D or 2D array depending on Flags _WindowGetHandleList Renamed: _WinGetHandleList SCRIPT BREAKING! _WindowGetHandleListFromPos Renamed: _WinGetHandleListFromPos SCRIPT BREAKING! 10/01/2016 (v0.2): WindowsExConstants.au3 Added : Flags in _WindowGetHandleListFromPos _WindowGetHandleListFromPos Removed: ConsoleWrite left in during debug _WindowGetHandleListFromPos Added : Flag for if part of a Control is at $X, $Y return it as well. 10/01/2016 (v0.1): _WindowGetHandleList Added : Retrieves the handles of classes from a window. _WindowGetHandleListFromPos Added : Retrieves the handles of classes at a specific position from a window. Known and Reported Bugs:
None reported To Do:
To Be Decided. Opinions welcome! Upcoming Changes:
To Be Decided.
Winmove GUI moves buttons
Below is a code whish i made for this problem i've. (code 1)
The problem is that iff i try Winmove to to show the hidden button it's not working as i tought.
What i try to do is just simple expand the GUI to make the hidden button visible. (code 2)
I've already looked into GUICoordMode but don't think that's the problem.(or I don't understand it properly)
Also tried to look into the forum but din't find anything around this subject but could't find anything around this subject.
Does somebody knows what I'm doing wrong?
Code 1 (winmove prblem) :
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 134, 103, 192, 124) $Button1 = GUICtrlCreateButton("1", 8, 8, 75, 25) $Button2 = GUICtrlCreateButton("2", 8, 40, 75, 25) $Button3 = GUICtrlCreateButton("3", 8, 72, 75, 25) $expand_button = GUICtrlCreateButton("EXP", 96, 40, 27, 25) $hidden_button = GUICtrlCreateButton("Hidden", 160, 40, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $expand_button WinMove($Form1, "From1", 192, 124, 300, 103) EndSwitch WEnd
Code 2 What I'm trying to expand to :
#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 265, 114, 192, 124) $Button1 = GUICtrlCreateButton("1", 8, 8, 75, 25) $Button2 = GUICtrlCreateButton("2", 8, 40, 75, 25) $Button3 = GUICtrlCreateButton("3", 8, 72, 75, 25) $expand_button = GUICtrlCreateButton("EXP", 96, 40, 27, 25) $hidden_button = GUICtrlCreateButton("Hidden", 160, 40, 75, 25) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
[SOLVED] Reverse state of button
I remember a script where i had seen an user inverse state of a button ( $GUI_ENABLE (64) / $GUI_DISABLE (128) ) in one line only
I remember it use Bit operation but i cannot reproduce it, can someone help ?
In fact if the button is enable i want to disable it and if he is disable , want to enable it, something like that :
GuiCtrlSetState ( $button , BitOr ( GuiCtrlGetSate ( $button ) ) ; i know this is NOT working, for explanation only
Click on Toolbar icon
This is the info of the interface:
Title: Password Safe
Advanced (Class): [CLASS:ToolbarWindow32; INSTANCE:2]
1: 32003 Make New Database
2: 32002 Open Another Database
3: 32004 Close Database
4: 32005 Save Database
6: 32066 Copy Password to Clipboard
7: 32068 Copy Username to Clipboard
8: 32069 Copy Notes to Clipboard
9: 32065 Clear the clipboard contents
I wanted to click on 1: 32003 Make New Database. But unfortunately, I'm unable to click on that. Any help is much appreciated. Below are the code I tried:
$Title = "Password Safe" $Class = "[CLASS:ToolbarWindow32; INSTANCE:2]" WinWaitActive($Title) Sleep(500) Dim $hWnd = WinGetHandle($Title,"") Dim $hToolBar = ControlGetHandle($hWnd, '', $Class) ConsoleWrite($hWnd & @TAB & $hToolBar & @LF) _GUICtrlToolbar_ClickIndex($hToolBar, 32003)
Get .Net WinForm Application ToolTip Control
I turned to Autoit from AHK just because it support WinForm Application so well. The problem often haunts me that all the application in my job is WinForm. And it indeed help my work so much. Great thanks in advance.
However, I can't get the ToolTip text in the application of my company. Specifically，now I want to get the information about some data, however the information is all displayed in the tooltip on the scatter diagram which is made of those data.
Is there any advice ? Relative topics I have searched can't get any information about the winform tooltip...