Leaderboard
Popular Content
Showing content with the highest reputation on 02/01/2020 in all areas
-
Version 2021.8.30.2
10,235 downloads
Use MouseClick() need: #RequireAdmin Dll is already integrated in UDF ! ; #INDEX# =============================================================== ; Title .........: ImageSearch ; AutoIt Version : 3.x ; Language ......: English ; Description ...: Check image Appears or Not and Return the position of an image on the desktop ; Author(s) .....: Dao Van Trong - TRONG.LIVE ; ======================================================================= ; #CURRENT# ============================================================= ; _ImageSearch ; _ImageSearch_Area ; _ImageSearch_Wait ; _ImageSearch_WaitArea ; ======================================================================== ;========================================================================= ; ; Author:...........: AutoIT VietNam : Dao Van Trong - TRONG.LIVE ; Description:......: Check image Appears or Not ; Find and return the position of an image on the desktop ; Syntax:........... _ImageSearch_Area, _ImageSearch ; Parameter(s):..... $_ImagePath: The image to locate on the desktop ; May be a list of image by delimited by "|" ; i.e: $_ImagePath = "image1.bmp|image2.bmp|image3.bmp" ; $P_x1 $P_y1: Position of 1st point ; $P_x2 $P_y2: Position of 2nd point - Default is last botton right of desktop ; $_Tolerance: 0 for no tolerance (0-255). Needed when colors of image differ from desktop. e.g GIF ; $_CenterPos: boolen. True will return $array[1] x $array[2] is center of image found. ; False will return top-left position ; Return Value(s):.. Return an array has 3 item ; On Success: $array[0] 1 ; On Failure: $array[0] 0 ; DLL not found or other error: $array[0] -1 ; $array[1] x $array[2]: position of image what found on desktop ; ; Note:............. Use _ImageSearch to search the entire desktop ; _ImageSearch_Area to specify a desktop region to search ; $_ImagePath with more item need more time appear on screen before function can detect. ; Decrease sleep time in the loop to detect faster. But less performance. I.e CPULoad increased ; ;======================================================================== EG 1: ;~ Opt("MustDeclareVars", 1) ;~ #AutoIt3Wrapper_UseX64=y ;~ #AutoIt3Wrapper_Change2CUI=y #RequireAdmin #include "_ImageSearch_UDF.au3" HotKeySet("{Esc}", "_Exit") ; Press ESC for exit Func _Exit() Exit 0 EndFunc ;==>_Exit Global Const $Ask_On_Found = 0 Global Const $Mouse_Move_On_Found = 1 Global Const $Mouse_Click_On_Found = 0 Global Const $iSleep_Time=500 Global $sCount = 0, $_Image_1 = @ScriptDir & "\example.bmp" ; First, use this function to create a file bmp, maybe a desktop icon for example') MsgBox(64 + 262144, 'ImageSearch', 'At first, create a file bmp,' & @CRLF & 'photos that will search on the screen!') _ImageSearch_Create_BMP($_Image_1) ConsoleWrite("! Search for images: " & $_Image_1 & @CRLF & '! Searching on the screen ...' & @CRLF) While 1 ToolTip('(Press ESC for EXIT) Searching ...', 1, 1) Sleep($iSleep_Time) $sCount += 1 Local $return = _ImageSearch($_Image_1) If $return[0] = 1 Then ConsoleWrite('- [' & $sCount & '] Image found:' & " X=" & $return[1] & " Y=" & $return[2] & @CRLF) If $Mouse_Move_On_Found Then MouseMove($return[1], $return[2]) Sleep($iSleep_Time) EndIf If $Mouse_Click_On_Found Then MouseClick("left", $return[1], $return[2]) ToolTip('(Press ESC for EXIT) - [' & $sCount & "] Image found:" & " X=" & $return[1] & " Y=" & $return[2], 1, 1) If $Ask_On_Found Then Local $ask = MsgBox(6 + 262144, 'Success [' & $sCount & ']', 'Image found:' & " X=" & $return[1] & " Y=" & $return[2]) If $ask = 2 Or $ask = 3 Or $ask = 5 Or $ask = 7 Then Exit ;No, Abort, Cancel, and Ignore If $ask = 10 Then _ImageSearch_Create_BMP($_Image_1) ; Continue ;Try Again EndIf EndIf Sleep(200) WEnd Video demo: [+] When any problem or error occurs, please make sure that:- Downloaded and used the latest version.- Set screen Screen Scale and layout = 100%- Installed display driver.- Tried turning off the antivirus- Full installation: Microsoft Visual C++ Redistributable 2005->2022 [+] You can download the AIO version of the Visual C++ Redistributable here: -> https://www.mediafire.com/file/0ak8dcj9mdn7nyq/VisualCppRedist_AIO_2005-2022_x86_x64_%5Btrong.live%5D.zip/file -> FOR Windows XP: https://www.mediafire.com/file/5m5lnr1kfg73tc9/VisualCppRedist_AIO_2005-2019_x86_XP_%5Btrong.live%5D.zip/file <!> Password for Extract: trong.live [+] The last full version of SCITE4AutoIT supports windows XP: https://www.autoitscript.com/autoit3/scite/download/archive/v19.1127.1402.0-SciTE4AutoIt3.exe1 point -
Is there an equivalent of "Match" function in Excel?
MathieuLap reacted to iamtheky for a topic
The loop is probably most effective and it does not "take a lot of line of code" (it probably takes less lines than my example). That aside, pulling this off without a loop sounded like fun this assumes you have read your excel file to an array that looks like the one in the OP: #include<array.au3> local $a[3][4] = [["1" , "First name" , "Last name" , "date of birth"],["2", "Mathieu" , "Laplante" , "may, 4th 1980"],["3" , "Ginette" , "Pare" , "oct, 10th, 1974"]] _ArrayTranspose($a) msgbox(0 , '' , _ArraySearch($a , "Last name")) edit: wait wth, you only need the column that appears in (or do you need need row and column like a jeopardy board)? How did you know it was in row 1 to search a1-c1?1 point -
It is because there is a ; at the end of your environment PATH ? Mine's fine...1 point
-
Chrome Driver (WebDriver) is just another means to interact with a browser. So what is the need to work without a browser? At least IE comes with the OS.1 point
-
Windows 8, Windows 8.1 and Windows 10 updates In Windows 8 and later, new event handlers have been added and new events and property changes have been added to existing event handlers. This is an update to be able to take advantage of these new event handlers, events and property changes. Four new event handlers have been added: IUIAutomationTextEditTextChangedEventHandler ; Windows 8.1 IUIAutomationChangesEventHandler ; Windows 10-1703 IUIAutomationNotificationEventHandler ; Windows 10-1709 IUIAutomationActiveTextPositionChangedEventHandler ; Windows 10-1809 The corresponding four new EventIds that can be used in the existing AutomationEventHandler are: Global Const $UIA_TextEdit_TextChangedEventId = 20032 ; Windows 8.1 Global Const $UIA_ChangesEventId = 20034 ; Windows 10 Global Const $UIA_NotificationEventId = 20035 ; Windows 10 Global Const $UIA_ActiveTextPositionChangedEventId = 20036 ; Windows 10 In addition to the listed EventIds, there are 10 more EventIds that can be used in the existing AutomationEventHandler. And there are more than 60 new PropertyIds that can be used in the existing PropertyChangedEventHandler. By detecting events for the four new EventIds listed above in UI Automation Event Monitor (UIAEHEvents.au3, see description of updates below) I've tried to find applications that actually generates some of these new events. I've found that the Windows 10 Calculator and Microsoft Edge browser generates Notification events. With the new NotificationEventHandler it's possible to obtain further information about these events. I've not found any applications that generates the other three events. And thus I've not found any applications where it's possible to test the new TextEditTextChangedEventHandler, ChangesEventHandler and ActiveTextPositionChangedEventHandler. Therefore, the only new event handler implemented in this update is the NotificationEventHandler. NotificationEventHandler NotificationEventHandler exposes a method to handle Microsoft UI Automation notification events. The UDF is implemented in Includes\UIAEH_NotificationEventHandler.au3: #include-once #include "UIA_Constants.au3" #include "UIA_ConstNames.au3" #include "UIA_Functions.au3" #include "ObjectFromTag.au3" NotificationKindSetNames() NotificationProcessingSetNames() Global $oUIAEH_NotificationEventHandler, $tUIAEH_NotificationEventHandler Func UIAEH_NotificationEventHandlerCreate() $oUIAEH_NotificationEventHandler = ObjectFromTag( "UIAEH_NotificationEventHandler_", $dtag_IUIAutomationNotificationEventHandler, $tUIAEH_NotificationEventHandler, True ) EndFunc Func UIAEH_NotificationEventHandlerDelete() $oUIAEH_NotificationEventHandler = 0 DeleteObjectFromTag( $tUIAEH_NotificationEventHandler ) EndFunc #cs ; Insert the two functions here in user code ; This is the function that receives events Func UIAEH_NotificationEventHandler_HandleNotificationEvent( $pSelf, $pSender, $iKind, $iProcessing, $pDisplayStr, $pActivityId ) ; Ret: long Par: ptr;long;long;ptr;ptr ConsoleWrite( @CRLF & "UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = " & $aNotificationKindNames[$iKind] & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = " & $aNotificationProcessingNames[$iProcessing] & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = " & UIA_String( $pDisplayStr ) & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = " & UIA_String( $pActivityId ) & @CRLF ) Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement9, $dtag_IUIAutomationElement9 ) ; Windows 10 Last $oSender.AddRef() ConsoleWrite( "Title = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_NamePropertyId ) & @CRLF & _ "Class = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ClassNamePropertyId ) & @CRLF & _ "Ctrl type = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ControlTypePropertyId ) & @CRLF & _ "Ctrl name = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_LocalizedControlTypePropertyId ) & @CRLF & _ "Handle = " & "0x" & Hex( UIAEH_GetCurrentPropertyValue( $oSender, $UIA_NativeWindowHandlePropertyId ) ) & @CRLF & _ "Value = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ValueValuePropertyId ) & @CRLF ) Return 0x00000000 ; $S_OK #forceref $pSelf EndFunc ; Auxiliary function (for simple properties only) ; There must be only one instance of this function Func UIAEH_GetCurrentPropertyValue( $oSender, $iPropertyId ) Local $vPropertyValue $oSender.GetCurrentPropertyValue( $iPropertyId, $vPropertyValue ) Return $vPropertyValue EndFunc #ce Func UIAEH_NotificationEventHandler_QueryInterface( $pSelf, $pRIID, $pObj ) ; Ret: long Par: ptr;ptr* Switch DllCall( "ole32.dll", "int", "StringFromGUID2", "struct*", $pRIID, "wstr", "", "int", 40 )[2] Case "{00000000-0000-0000-C000-000000000046}" ; $sIID_IUnknown DllStructSetData( DllStructCreate( "ptr", $pObj ), 1, $pSelf ) UIAEH_NotificationEventHandler_AddRef( $pSelf ) Return 0x00000000 ; $S_OK Case $sIID_IUIAutomationNotificationEventHandler ConsoleWrite( "IID_IUIAutomationNotificationEventHandler" & @CRLF ) DllStructSetData( DllStructCreate( "ptr", $pObj ), 1, $pSelf ) UIAEH_NotificationEventHandler_AddRef( $pSelf ) Return 0x00000000 ; $S_OK Case Else Return 0x80004002 ; $E_NOINTERFACE EndSwitch EndFunc Func UIAEH_NotificationEventHandler_AddRef( $pSelf ) ; Ret: ulong Return 1 #forceref $pSelf EndFunc Func UIAEH_NotificationEventHandler_Release( $pSelf ) ; Ret: ulong Return 1 #forceref $pSelf EndFunc An example is shown in Examples\NotificationEventHandlerEx.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=y Opt( "MustDeclareVars", 1 ) #include "..\Includes\UIAEH_NotificationEventHandler.au3" Example() Func Example() UIAEH_NotificationEventHandlerCreate() If Not IsObj( $oUIAEH_NotificationEventHandler ) Then Return ConsoleWrite( "$oUIAEH_NotificationEventHandler ERR" & @CRLF ) ConsoleWrite( "$oUIAEH_NotificationEventHandler OK" & @CRLF ) Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation8, $sIID_IUIAutomation6, $dtag_IUIAutomation6 ) ; Windows 10 Last If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) Local $pDesktop $oUIAutomation.GetRootElement( $pDesktop ) If Not $pDesktop Then Return ConsoleWrite( "$pDesktop ERR" & @CRLF ) ConsoleWrite( "$pDesktop OK" & @CRLF ) Local $iError = $oUIAutomation.AddNotificationEventHandler( $pDesktop, $TreeScope_Subtree, 0, $oUIAEH_NotificationEventHandler ) If $iError Then Return ConsoleWrite( "AddNotificationEventHandler() ERR" & @CRLF ) ConsoleWrite( "AddNotificationEventHandler() OK" & @CRLF ) HotKeySet( "{ESC}", "Quit" ) While Sleep(10) WEnd EndFunc Func Quit() UIAEH_NotificationEventHandlerDelete() Exit EndFunc ; This is the function that receives events Func UIAEH_NotificationEventHandler_HandleNotificationEvent( $pSelf, $pSender, $iKind, $iProcessing, $pDisplayStr, $pActivityId ) ; Ret: long Par: ptr;long;long;ptr;ptr ConsoleWrite( @CRLF & "UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = " & $aNotificationKindNames[$iKind] & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = " & $aNotificationProcessingNames[$iProcessing] & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = " & UIA_String( $pDisplayStr ) & @CRLF ) ConsoleWrite( "UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = " & UIA_String( $pActivityId ) & @CRLF ) Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement9, $dtag_IUIAutomationElement9 ) ; Windows 10 Last $oSender.AddRef() ConsoleWrite( "Title = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_NamePropertyId ) & @CRLF & _ "Class = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ClassNamePropertyId ) & @CRLF & _ "Ctrl type = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ControlTypePropertyId ) & @CRLF & _ "Ctrl name = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_LocalizedControlTypePropertyId ) & @CRLF & _ "Handle = " & "0x" & Hex( UIAEH_GetCurrentPropertyValue( $oSender, $UIA_NativeWindowHandlePropertyId ) ) & @CRLF & _ "Value = " & UIAEH_GetCurrentPropertyValue( $oSender, $UIA_ValueValuePropertyId ) & @CRLF ) Return 0x00000000 ; $S_OK #forceref $pSelf EndFunc ; Auxiliary function (for simple properties only) ; There must be only one instance of this function Func UIAEH_GetCurrentPropertyValue( $oSender, $iPropertyId ) Local $vPropertyValue $oSender.GetCurrentPropertyValue( $iPropertyId, $vPropertyValue ) Return $vPropertyValue EndFunc Because $pDisplayStr and $pActivityId are Microsoft BSTRs, a new function UIA_String( $pBSTR ) has been added in UIA_Functions.au3 to convert BSTRs to AutoIt strings. Output in SciTE console (creation): Func UIAEH_NotificationEventHandler_QueryInterface( $pSelf ) ; Ret: long Par: ptr;ptr EndFunc 0 Func UIAEH_NotificationEventHandler_AddRef( $pSelf ) ; Ret: dword EndFunc 0 Func UIAEH_NotificationEventHandler_Release( $pSelf ) ; Ret: dword EndFunc 0 Func UIAEH_NotificationEventHandler_HandleNotificationEvent( $pSelf ) ; Ret: long Par: ptr;long;long;ptr;ptr EndFunc 0 $oUIAEH_NotificationEventHandler OK $oUIAutomation OK $pDesktop OK IID_IUIAutomationNotificationEventHandler AddNotificationEventHandler() OK Output in SciTE console (Windows 10 Calculator): UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Standard Lommeregnertilstand UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = CategoryNameChanged Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 7 UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 78 UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 789 UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 789 gange UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 2 UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_Other UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Skærm er 1.578 UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayUpdated Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Den viste værdi er kopieret til udklipsholder UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = DisplayCopied Title = Class = TextBlock Ctrl type = 50020 Ctrl name = sende sms Handle = 0x00000000 Value = Output in SciTE console (Microsoft Edge): UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Going back UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = GoingBackActivityId Title = Back Class = Button Ctrl type = 50000 Ctrl name = button Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Going back UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = GoingBackActivityId Title = Back Class = Button Ctrl type = 50000 Ctrl name = button Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading page UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageBeginsActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Loading complete UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = LoadingPageCompleteActivityId Title = Class = ScrollViewer Ctrl type = 50033 Ctrl name = pane Handle = 0x00000000 Value = UIAEH_NotificationEventHandler_HandleNotificationEvent: $iKind = $NotificationKind_ActionCompleted UIAEH_NotificationEventHandler_HandleNotificationEvent: $iProcessing = $NotificationProcessing_ImportantMostRecent UIAEH_NotificationEventHandler_HandleNotificationEvent: $sDisplayStr = Closing tab UIAEH_NotificationEventHandler_HandleNotificationEvent: $sActivityId = ClosingTabActivityId Title = AutoIt Example Scripts - AutoIt Forums tab Class = GridViewItem Ctrl type = 50025 Ctrl name = Handle = 0x00000000 Value = AutomationEventHandler For the existing AutomationEventHandler and for the other existing event handlers, comment lines have been added in both the UDF and the example about which version of the UIA objects to use. Comment lines are added like this: Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtag_IUIAutomation ) ; Windows 7 ;Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation8, $sIID_IUIAutomation2, $dtag_IUIAutomation2 ) ; Windows 8 ;Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation8, $sIID_IUIAutomation3, $dtag_IUIAutomation3 ) ; Windows 8.1 ;Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation8, $sIID_IUIAutomation3, $dtag_IUIAutomation3 ) ; Windows 10 First ;Local $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation8, $sIID_IUIAutomation6, $dtag_IUIAutomation6 ) ; Windows 10 Last Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement, $dtag_IUIAutomationElement ) ; Windows 7 ;Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement2, $dtag_IUIAutomationElement2 ) ; Windows 8 ;Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement3, $dtag_IUIAutomationElement3 ) ; Windows 8.1 ;Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement4, $dtag_IUIAutomationElement4 ) ; Windows 10 First ;Local $oSender = ObjCreateInterface( $pSender, $sIID_IUIAutomationElement9, $dtag_IUIAutomationElement9 ) ; Windows 10 Last UIAEHEvents.au3 updates In order for UI Automation Event Monitor to be able to detect new events and property changes, the code has been updated to handle different Windows versions and thus different versions of the UIA objects. Handling multiple versions of Windows and multiple versions of the UIA objects is the same as in UIASpy. Through a new Options menu you can execute code that fits a particular Windows version. Note that under Windows 7 and earlier versions, only the original four event handlers (AutomationEventHandler, FocusChangedEventHandler, PropertyChangedEventHandler, StructureChangedEventHandler) introduced in Windows 7 can be used. In addition, some minor errors have been fixed and some of the code has been tightened up. New zip-file at bottom of first post.1 point
-
I have recompiled the dll and updated the source code. Tried in VMW and it worked fine. Please download the updated version.1 point
-
I think the problem is that you have given the focus to "Enter initial" and never got fully back. Maybe because the password is not sent correctly, (btw you should have a sleep between mouseclick and send). Anyway it is hard to say without a runable script that replicates your issue. Nevertheless, I was able to try something with notepad. It is not exactly your situation, but it is close and I lost control of the GUI, so I solved my problem this way : Local $hGUI = GUICreate ("Test") Local $idButton = GUICtrlCreateButton ("OK", 20,50,100,25) GUISetState () Local $c, $aPos, $bAttempted = False While 1 If Not $bAttempted And WinExists("[CLASS:Notepad]") Then Local $c = WinActivate("[CLASS:Notepad]") WinWaitActive($c) Sleep(200) If $c = 0 Then Exit MsgBox(0, 0, "error") Local $aPos = WinGetPos($c) If @error Then Exit MsgBox(0, 0, 0) ConsoleWrite(@CRLF & $aPos[0] & " " & $aPos[1] & " " & $aPos[2] & " " & @CRLF) MouseClick("Primary", $aPos[0] + 125, $aPos[1] + 125, 1, 1) Sleep (800) Send("password") Send("{Enter}") Sleep (2000) If WinExists ($c) Then ConsoleWrite ("Wrong password" & @CRLF) $bAttempted = True EndIf Switch GUIGetMsg() Case $idButton Exit EndSwitch WEnd ps. this is the way to debug a program. Make a smaller replicate of the problem and then it is easier to find solution.1 point
-
Not sure if the Compress-Archive method will collect the stream data and embed it in an archive, then put it back in place when the file is extracted. You might have to do a custom script to extract the stream data and add it to the archive, then a archive extraction process to "rebuild" the streams. I saw an article that says the RAR file format supports NTFS ADS, but haven't looked into it.1 point