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.
I am capturing data from a web page as soon as it opens. The problem is I am running a dual screen setup and the script don't capture the data when the window is opened up in the non default monitor. On the default monitor it works fine.
Func Monitor() Local $hTimer = TimerInit() Do $fDiff = TimerDiff($hTimer) Until WinActive("ActivityDetail - Internet Explorer") Or $fDiff >= 5000 ; Only sees window on default monitor. If WinActive("ActivityDetail - Internet Explorer") Then ; Only sees window on default monitor. Local $hWnd = WinGetHandle("ActivityDetail - Internet Explorer", "") Local $oIE = _IEAttach($hWnd, "hwnd") If @error Then $oIE.Quit() Else Local $oForm = _IEGetObjByName($oIE, "lblHeaderActRefValue") Local $Ref = _IEPropertyGet($oForm, "innertext") Local $oForm = _IEGetObjByName($oIE, "lblCompileDate") Local $Compile = _IEPropertyGet($oForm, "innertext") Local $oForm = _IEGetObjByName($oIE, "Table2") Local $Description = _IEPropertyGet($oForm, "innertext") $Description = StringTrimLeft($Description, 49) Local $iLength = StringLen($Description) Local $iPosition = StringInStr($Description, "Network Tag") Local $sString = StringTrimRight($Description, ($iLength - ($iPosition - 1))) Local $sString1 = StringStripWS($sString, $STR_STRIPLEADING + $STR_STRIPTRAILING + $STR_STRIPSPACES) Local $sString = $sString1 Local $oForm = _IEGetObjByName($oIE, "lblDisruption") Local $Disruption = _IEPropertyGet($oForm, "innertext") If $flag <> $Ref And $Ref <> 0 and $Compile <> 0 Then $ICount = _GUICtrlListView_GetItemCount($ListView1) _GUICtrlListView_AddItem($ListView1, $Compile, $ICount) _GUICtrlListView_AddSubItem($ListView1, $ICount, $Ref, 1) _GUICtrlListView_AddSubItem($ListView1, $ICount, $Disruption, 2) _GUICtrlListView_AddSubItem($ListView1, $ICount, $sString, 3) _FileWriteLog(@ScriptDir & "\" & @YEAR & @MON & ".txt", $Ref & " " & $Disruption & " " & $sString & @CRLF) $flag = $Ref EndIf EndIf EndIf EndFunc ;==>Monitor
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.
I'm having some trouble restoring a program which uses a normal AutoIT-GUI and is used as a ToolKit for our customers to open different (external) tools, check their network connections or ping different destinations. Almost all customers are running this script on Win7 x64.
What do I want to do?
When the program is already running and the user tries to start it for a second time, it should exit the second instance after activating/restoring the first instance.
What did I do to integrate this?
I used a little piece of script found on the forums to prevent opening a second instance and modified it as follows:
$g_szVersion = "VSOL ToolKit" If WinExists($g_szVersion) Then Local $gState = WinGetState($g_szVersion) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinSetState($g_szVersion,"",@SW_SHOW) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinSetState($g_szVersion,"",@SW_RESTORE) MsgBox(0,"","gState = " & $gState) ;For debugging purposes WinActivate($g_szVersion) Exit EndIf AutoItWinSetTitle($g_szVersion) I have tried it with only the @SW_SHOW, only the @SW_RESTORE, both of them in a different order, same difference, it doesn't work.
What does happen then?
It detects the current state (when it's minimized) as '5', which means enabled and hidden. After setting the state to show, the state changes to 7. Restoring doesn't change the state. But what is really odd, is that the window doesn't appear but AutoIt seems to create a néw window with the same title as the existing one.
It doesn't matter if the window was originally minimized by clicking the minimize button in the GUI or by a line of code in my script. For example, when users open a software package from within my script, a similar function to this one will be called:
Func VSOL_FFTOOLS_SHOW_DOWNLOADS() GUISetState(@SW_MINIMIZE,$VSOL_BACKEND) ShellExecute(@UserProfileDir & "\Downloads") EndFunc The only thing that does work, is when the window is running in a non-minimized state (somewhere behind the current window), it gets activated and receives the focus when trying to start the second instance.
If anyone could help me out with this one, I'd be forever thankful :-)
Thanks in advance!