I have tried searching for quite some time now but couldn´t find a single working way to change the class of your GUI that doesn´t include changing it manually after its compilation.
First or "AutoIt v3 GUI" is a pretty boring name tbh and i would like to spice it up a bit, also, and more importantly, I would like to identify my windows by something other than its title as it will change depending on some factors and im using two different programs independently as multi threading isn't supported.
Any help is appreciated! Thank you!
how can I wait activate for windows with information as in the photos attached?
Class is not being recognized by the script.
thanks in advanced.
A UDF with Extended Functions for Window Management
Fixes WinGetClassList'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.
Good morning everyone
I was playing a little bit with "Screen Capture" UDF, and I was trying to make a "Window" capture, but, since I made a GUI which through I fire the event "Capture", my GUI is captured as well, and I don't want to
This is the line of code that makes the capture:
_ScreenCapture_CaptureWnd($strScreenCaptureFileName, $objActiveWindow, 0, 0, -1, -1, False) And these are the lines of code which select the "active" window:
Local $objCurrentWindow = 9999 If _IsPressed("01") Then $objCurrentWindow = WinGetHandle("[ACTIVE]") If $objCurrentWindow <> $objMyGUI Then $objActiveWindow = $objCurrentWindow EndIf EndIf Sorry If I made stupid mistakes
Thanks in advance.
Here is a function that will return a 2D array of visible windows. You will notice that windows "Start" and "Program Manager" windows will always be in the array. The array returns the title of the window, the window handle, the PID of the process associated with the window, the process name associated with the window, the window's position, and the window's dimension, Please see comments in the code about the numbers returned about the window's position.
#include <Array.au3> #include <Process.au3> ;Get a list of visable windows with titles. $aWindows = _GetVisibleWindows() _ArrayDisplay($aWindows) Func _GetVisibleWindows() ;Retrieve a list of windows. Local $aWinList = WinList() If Not IsArray($aWinList) Then Return SetError(0, 0, 0) ;Loop through the array deleting no title or invisable windows. Local $sDeleteRows = "" For $i = 1 To $aWinList If $aWinList[$i] = "" Or Not BitAND(WinGetState($aWinList[$i]), $WIN_STATE_VISIBLE) Then $sDeleteRows &= $i & ";" EndIf Next $sDeleteRows = StringTrimRight($sDeleteRows, 1) ;Remove last ";". _ArrayDelete($aWinList, $sDeleteRows) $aWinList = UBound($aWinList) - 1 ;Get Window's Processor ID (PID), and add to the array. _ArrayColInsert($aWinList, UBound($aWinList, 2)) For $i = 1 To $aWinList $aWinList[$i] = WinGetProcess($aWinList[$i]) Next ;Get Window's Process Name from PID, and add to the array. _ArrayColInsert($aWinList, UBound($aWinList, 2)) For $i = 1 To $aWinList $aWinList[$i] = _ProcessGetName($aWinList[$i]) Next ;Get Windows's Position and Size, and add it to the array. ;For Position, -3200,-3200 is minimized window, -8,-8 is maximized window on 1st display, and ;x,-8 is maximized windown on the nth display were x is the nth display width plus -8 (W + -8). _ArrayColInsert($aWinList, UBound($aWinList, 2)) ;Position (X,Y). _ArrayColInsert($aWinList, UBound($aWinList, 2)) ;Dimension (WxH). Local $aWinPosSize For $i = 1 To $aWinList $aWinPosSize = WinGetPos($aWinList[$i]) $aWinList[$i] = $aWinPosSize & "," & $aWinPosSize $aWinList[$i] = $aWinPosSize & "x" & $aWinPosSize Next Return $aWinList EndFunc ;==>_GetVisibleWindows