Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/11/2018 in all areas

  1. Using C# from AutoIt and .Net Now that we can run C# and VB code in AutoIt it could be interesting to see, if we can run the C# code from first post in AutoIt: using AutoIt; using System; using System.Threading; public class Au3Class { public void MyMethod() { // Wow, this is C#! AutoItX.Run("notepad.exe", "", AutoItX.SW_SHOW); AutoItX.WinWaitActive("Untitled"); AutoItX.Send("I'm in notepad{Enter}{Enter}"); AutoItX.Send("From AutoItX in C{#}{Enter}{Enter}"); AutoItX.Send("From C{#} in AutoIt through .NET Framework{Enter}"); Thread.Sleep(5000); IntPtr winHandle = AutoItX.WinGetHandle("Untitled"); AutoItX.WinKill(winHandle); } } #include "DotNetAll.au3" Example() Func Example() ; Wow, this is AutoIt! Local $oComErrFunc = ObjEvent( "AutoIt.Error", "ComErrFunc" ) #forceref $oComErrFunc Local $oNetCode = DotNet_LoadCScode( FileRead( "AutoItXTest.cs" ), "System.dll | AutoItX3.Assembly.dll" ) Local $oAu3Class = DotNet_CreateObject( $oNetCode, "Au3Class" ) $oAu3Class.MyMethod() EndFunc You must copy AutoItX3.Assembly.dll, AutoItX3.dll and AutoItX3_x64.dll to @ScriptDir. And you must copy AutoItX3.Assembly.dll to AutoIt installation folder where AutoIt3.exe and AutoIt3_x64.exe are installed. The code: AutoItXTest.7z
    1 point
  2. @Bearpocalypse building on what FrancescoDiMuro stated, try something like this, should give you at least an idea that you can build off of. ;Replacement for your For Loop: For $i = 1 To UBound($aUser) - 1 $aTemp = StringSplit($aUser[$i], ",") If IsArray($aTemp) Then GUICtrlSetData($List1, StringReplace($aTemp[1], "CN=", "")) Next Now, one of our "regexperts" may come along and speed that up, but StringReplace seems to work fairly quickly against my AD account and its 200 groups
    1 point
  3. Something like this? #include <Misc.au3> While Not _IsPressed("1B") ToolTip("Mouse Pos. X: " & MouseGetPos()[0] & @CRLF & _ "Mouse Pos. Y: " & MouseGetPos()[1] & @CRLF & _ "Current Time: " & _NowDate() & " " & _NowTime()) Sleep(100) WEnd
    1 point
  4. @great77 Look closely in the Help file about _DateDiff()! Try this: Global $strFileName = @ScriptDir & "\File.txt", _ $arrFileTime, _ $strFileTime = "", _ $strNowCalc = "", _ $strDateDiff = "" ; Get the Date/Time for the Created property of the file $arrFileTime = FileGetTime($strFileName, $FT_CREATED, $FT_ARRAY) ; Format the Date/Time to calculate the difference $strFileTime = $arrFileTime[0] & "/" & $arrFileTime[1] & "/" & $arrFileTime[2] & " " & $arrFileTime[3] & ":" & $arrFileTime[4] & ":" & $arrFileTime[5] ; Get the "Now" time to calculate the difference $strNowCalc = _NowCalc() ; Calculate the difference in Days ("D") $strDateDiff = _DateDiff("D", $strFileTime, $strNowCalc) ; Display the Difference in Days ConsoleWrite("Difference between '" & $strFileTime & "' and '" & $strNowCalc & "' ( in Days ) = " & $strDateDiff & @CRLF) Cheers
    1 point
  5. Also, i think Send("{F10}{ENTER}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}") ;could be Send("{F10}{ENTER}{DOWN 5}{ENTER}") PS: maybe you can go up instead of down to exit? Send("{F10}{ENTER}{UP}{ENTER}")
    1 point
  6. @null0 if the files are all in one directory you can do something like this: Opt("WinTitleMatchMode", 2) #include <File.au3> $aFiles = _FileListToArray("C:\Convert", "*.wpa", $FLTA_FILES, True) ;_ArrayDisplay($aFiles) - uncomment only if you would like to see what the array looks like For $file In $aFiles ShellExecute ($file) $winTitle ="Act! Word Processor" WinWait($wintitle) Sleep(50) WinActivate($wintitle) Send("{F10}{ENTER}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}") WinActivate("Save As") Send("{TAB}{DOWN}{DOWN}{ENTER}{ENTER}") Send("{F10}{ENTER}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{ENTER}") Next
    1 point
  7. Zedna

    List of files

    Little speed optimization in For/Next loop: For $i = 1 To UBound($aFileList) - 1 $ext = StringLower(StringRight($aFileList[$i],4)) If ($want_txt And $ext == '.txt') Or _ ($want_pdf And $ext == '.pdf') Then GUICtrlSetData($hList, $aFileList[$i]) EndIf Next
    1 point
  8. Change this -- $sCookie = "{""name"":""" & $sName & """,""value"":""" & $svalue & """}" to this -- $sCookie = '{"cookie": {"name":"' & $sName & '","value":"' & $svalue & '"}}' and it should work correctly.
    1 point
  9. I understand, I was only pointing it out. As for the title clearly stating this, I would argue that AMD chips, at least the chips in question here, execute the Intel x86 instruction set. AMD's Zen and newer processors will support this instruction. The developer should have simply checked for the feature bit to be set and disregarded manufacturer. I don't mean to argue, I just wanted to point out that it fails to work in a case where it should work. I thank you for wrapping the library for use in AutoIt.
    1 point
  10. A ribbon can be automated with the UI Automation framework. This is an example with WordPad. Start to open WordPad. No need to open a file. Get an overview of the controls in the ribbon. Here the entire window: #include "CUIAutomation2.au3" Opt( "MustDeclareVars", 1 ) Global $oUIAutomation Example() ; List all automation elements of a window ; in a hierarchical structure like a treeview. Func Example() ; Get window handle ;Local $hWindow = 0x0006045C ; Infragistics ;Local $hWindow = WinGetHandle( "[CLASS:WindowsForms10.Window.8.app.0.bb8560_r19_ad1]" ) ; Infragistics ;Local $hWindow = WinGetHandle( "[REGEXPCLASS:WindowsForms10.Window.8.app.*]" ) ; Windows Updates Downloader ;Local $hWindow = WinGetHandle( "BCGPVisualStudioGUIDemo - Start Page" ) ; BCGSoft BCGPVisualStudioGUIDemo ;Local $hWindow = WinGetHandle( "[CLASS:CabinetWClass]" ) ; Windows Explorer, Windows 7 ;Local $hWindow = WinGetHandle( "[CLASS:ExploreWClass]" ) ; Windows Explorer, Windows XP ;Local $hWindow = WinGetHandle( "Windows Explorer right pane" ) ; Windows Explorer right pane ;Local $hWindow = WinGetHandle( "[TITLE:My GUI Checkbox; CLASS:AutoIt v3 GUI]" ) ; AutoIt GUI window ;Local $hWindow = WinGetHandle( "[CLASS:AutoIt v3 GUI]" ) ; AutoIt script ;Local $hWindow = WinGetHandle( "[CLASS:Chrome_WidgetWin_1]" ) ; Chrome ;Local $hWindow = WinGetHandle( "[CLASS:IEFrame]" ) ; Internet Explorer Local $hWindow = WinGetHandle( "[CLASS:WordPadClass]" ) ; WordPad ;Local $hWindow = WinGetHandle( "Calculator" ) ; Calculator If Not $hWindow Then Return ConsoleWrite( "$hWindow ERR" & @CRLF ) ConsoleWrite( "$hWindow OK" & @CRLF ) ; Create UI Automation object $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Get UI Automation element from window handle Local $pWindow, $oWindow $oUIAutomation.ElementFromHandle( $hWindow, $pWindow ) $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oWindow ) Then Return ConsoleWrite( "$oWindow ERR" & @CRLF ) ConsoleWrite( "$oWindow OK" & @CRLF & @CRLF ) ; List all elements of window ListDescendants( $oWindow, 0 ) EndFunc ; List all child elements of parent Func ListDescendants( $oParent, $iLevel, $iLevels = 0, $sIndent = "" ) If Not IsObj( $oParent ) Then Return If $iLevels And $iLevel = $iLevels Then Return ; Create RawViewWalker object Local $pRawViewWalker, $oRawViewWalker $oUIAutomation.RawViewWalker( $pRawViewWalker ) $oRawViewWalker = ObjCreateInterface( $pRawViewWalker, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker ) If Not IsObj( $oRawViewWalker ) Then Return ConsoleWrite( "RawViewWalker object error" & @CRLF ) ; Get first child element Local $pUIElement, $oUIElement $oRawViewWalker.GetFirstChildElement( $oParent, $pUIElement ) $oUIElement = ObjCreateInterface( $pUIElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) For $i = 0 To $iLevel - 1 $sIndent &= " " Next While IsObj( $oUIElement ) ConsoleWrite( $sIndent & "Title = " & GetCurrentPropertyValue( $oUIElement, $UIA_NamePropertyId ) & @CRLF & _ $sIndent & "Class = " & GetCurrentPropertyValue( $oUIElement, $UIA_ClassNamePropertyId ) & @CRLF & _ $sIndent & "Ctrl type = " & GetCurrentPropertyValue( $oUIElement, $UIA_ControlTypePropertyId ) & @CRLF & _ $sIndent & "Ctrl name = " & GetCurrentPropertyValue( $oUIElement, $UIA_LocalizedControlTypePropertyId ) & @CRLF & _ $sIndent & "Value = " & GetCurrentPropertyValue( $oUIElement, $UIA_LegacyIAccessibleValuePropertyId ) & @CRLF & _ $sIndent & "Handle = " & Hex( GetCurrentPropertyValue( $oUIElement, $UIA_NativeWindowHandlePropertyId ) ) & @CRLF & @CRLF ) ListDescendants( $oUIElement, $iLevel + 1, $iLevels ) $oRawViewWalker.GetNextSiblingElement( $oUIElement, $pUIElement ) $oUIElement = ObjCreateInterface( $pUIElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) WEnd EndFunc Func GetCurrentPropertyValue( $oObject, $iPropertyId ) Local $vValue, $sString $oObject.GetCurrentPropertyValue( $iPropertyId, $vValue ) If Not IsArray( $vValue ) Then Return $vValue $sString = $vValue[0] For $i = 1 To UBound( $vValue ) - 1 $sString &= "; " & $vValue[$i] Next Return $sString EndFunc The output in SciTE console should look like this: $hWindow OK $oUIAutomation OK $oWindow OK Title = UIRibbonDockTop Class = UIRibbonCommandBarDock Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103D6 Title = Ribbon Class = UIRibbonCommandBar Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103DC Title = Ribbon Class = UIRibbonWorkPane Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103E4 Title = Class = NUIPane Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103CE Title = Ribbon Class = NetUIHWND Ctrl type = 50033 Ctrl name = pane Value = Ribbon Handle = 000103D0 Title = Class = NetUICtrlNotifySink Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103DE Title = Font family Class = RICHEDIT50W Ctrl type = 50004 Ctrl name = edit Value = Calibri Handle = 00010408 Title = Class = NetUICtrlNotifySink Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103E0 Title = Font size Class = RICHEDIT50W Ctrl type = 50004 Ctrl name = edit Value = 11 Handle = 0001040A Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Quick Access Toolbar Class = Ctrl type = 50021 Ctrl name = tool bar Value = Quick Access Toolbar Handle = 00000000 Title = Save Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Undo Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Redo Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Customize Quick Access Toolbar Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Application menu Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Ribbon tabs Class = Ctrl type = 50018 Ctrl name = tab Value = Ribbon tabs list Handle = 00000000 Title = Class = Ctrl type = 50025 Ctrl name = Value = Handle = 00000000 Title = Home Class = Ctrl type = 50019 Ctrl name = tab item Value = Handle = 00000000 Title = View Class = Ctrl type = 50019 Ctrl name = tab item Value = Handle = 00000000 Title = Help Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Lower Ribbon Class = Ctrl type = 50033 Ctrl name = pane Value = Lower Ribbon Handle = 00000000 Title = Class = Ctrl type = 50025 Ctrl name = Value = Handle = 00000000 Title = Home Class = Ctrl type = 50025 Ctrl name = Value = Ribbon tab Handle = 00000000 Title = Clipboard Class = Ctrl type = 50021 Ctrl name = tool bar Value = Group Handle = 00000000 Title = Paste Class = Ctrl type = 50025 Ctrl name = Value = Handle = 00000000 Title = Paste Class = Ctrl type = 50031 Ctrl name = split button Value = Paste (Ctrl+V) Handle = 00000000 Title = Paste Class = Ctrl type = 50031 Ctrl name = split button Value = Handle = 00000000 Title = Cut Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Copy Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Font Class = Ctrl type = 50021 Ctrl name = tool bar Value = Group Handle = 00000000 Title = Font family Class = Ctrl type = 50003 Ctrl name = combo box Value = Calibri Handle = 00000000 Title = Open Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Font size Class = Ctrl type = 50003 Ctrl name = combo box Value = 11 Handle = 00000000 Title = Open Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Grow font Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Shrink font Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Bold Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Italic Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Underline Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Strikethrough Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Subscript Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Superscript Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Text color Class = Ctrl type = 50025 Ctrl name = Value = Automatic Handle = 00000000 Title = Text color Class = Ctrl type = 50031 Ctrl name = split button Value = Automatic Handle = 00000000 Title = Text color Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Text highlight color Class = Ctrl type = 50025 Ctrl name = Value = No color Handle = 00000000 Title = Text highlight color Class = Ctrl type = 50031 Ctrl name = split button Value = No color Handle = 00000000 Title = Text highlight color Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Paragraph Class = Ctrl type = 50021 Ctrl name = tool bar Value = Group Handle = 00000000 Title = Decrease indent Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Increase indent Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Lists Class = Ctrl type = 50025 Ctrl name = Value = Handle = 00000000 Title = Lists Class = Ctrl type = 50031 Ctrl name = split button Value = Handle = 00000000 Title = Lists Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Change line spacing Class = Ctrl type = 50031 Ctrl name = split button Value = Handle = 00000000 Title = Align text left Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Align text center Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Align text right Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Justify text Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Paragraph Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Insert Class = Ctrl type = 50021 Ctrl name = tool bar Value = Group Handle = 00000000 Title = Picture Class = Ctrl type = 50025 Ctrl name = Value = Handle = 00000000 Title = Picture Class = Ctrl type = 50031 Ctrl name = split button Value = Insert picture Handle = 00000000 Title = Picture Class = Ctrl type = 50031 Ctrl name = split button Value = Handle = 00000000 Title = Paint drawing Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Date and time Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Insert object Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Editing Class = Ctrl type = 50021 Ctrl name = tool bar Value = Group Handle = 00000000 Title = Find Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Replace Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Select all Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Class = Afx:00000000FF0E0000:0:0000000000010003:0000000000000010:0000000000000000 Ctrl type = 50033 Ctrl name = pane Value = Handle = 000303AE Title = Class = msctls_statusbar32 Ctrl type = 50017 Ctrl name = status bar Value = Handle = 000203B2 Title = Class = Afx:00000000FF0E0000:0 Ctrl type = 50033 Ctrl name = pane Value = Handle = 000203B0 Title = 100% Class = Static Ctrl type = 50020 Ctrl name = text Value = Handle = 000103B8 Title = - Class = Button Ctrl type = 50000 Ctrl name = button Value = Handle = 000103BA Title = Zoom Slider Class = msctls_trackbar32 Ctrl type = 50015 Ctrl name = slider Value = 50 Handle = 000103BC Title = Page left Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Position Class = Ctrl type = 50027 Ctrl name = thumb Value = Handle = 00000000 Title = Page right Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = + Class = Button Ctrl type = 50000 Ctrl name = button Value = Handle = 000103BE Title = Class = Ctrl type = 50020 Ctrl name = text Value = Handle = 00000000 Title = Class = Ctrl type = 50020 Ctrl name = text Value = Handle = 00000000 Title = Class = Ctrl type = 50020 Ctrl name = text Value = Handle = 00000000 Title = Class = Afx:00000000FF0E0000:0:0000000000010003:0000000000000010:0000000000000000 Ctrl type = 50033 Ctrl name = pane Value = Handle = 000103C8 Title = Rich Text Window Class = RICHEDIT50W Ctrl type = 50004 Ctrl name = edit Value = Handle = 000303A4 Title = Class = Ctrl type = 50037 Ctrl name = title bar Value = Document - WordPad Handle = 00000000 Title = System Class = Ctrl type = 50010 Ctrl name = menu bar Value = Handle = 00000000 Title = System Class = Ctrl type = 50011 Ctrl name = menu item Value = Handle = 00000000 Title = Minimize Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Maximize Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Title = Close Class = Ctrl type = 50000 Ctrl name = button Value = Handle = 00000000 Click the split button to create a list: #include "CUIAutomation2.au3" Opt( "MustDeclareVars", 1 ) Global $oUIAutomation Example() Func Example() Local $hWindow = WinGetHandle( "[CLASS:WordPadClass]" ) If Not $hWindow Then Return ConsoleWrite( "$hWindow ERR" & @CRLF ) ConsoleWrite( "$hWindow OK" & @CRLF ) ; Create UI Automation object $oUIAutomation = ObjCreateInterface( $sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation ) If Not IsObj( $oUIAutomation ) Then Return ConsoleWrite( "$oUIAutomation ERR" & @CRLF ) ConsoleWrite( "$oUIAutomation OK" & @CRLF ) ; Get UI Automation element from window handle Local $pWindow, $oWindow $oUIAutomation.ElementFromHandle( $hWindow, $pWindow ) $oWindow = ObjCreateInterface( $pWindow, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oWindow ) Then Return ConsoleWrite( "$oWindow ERR" & @CRLF ) ConsoleWrite( "$oWindow OK" & @CRLF ) ; Condition to find split button Local $pCondition1 $oUIAutomation.CreatePropertyCondition( $UIA_ControlTypePropertyId, $UIA_SplitButtonControlTypeId, $pCondition1 ) If Not $pCondition1 Then Return ConsoleWrite( "$pCondition1 ERR" & @CRLF ) ConsoleWrite( "$pCondition1 OK" & @CRLF ) ; Condition to find "Lists" ; "Lists" is a localized word ; Use the word in your own language Local $pCondition2 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "Lists", $pCondition2 ) If Not $pCondition2 Then Return ConsoleWrite( "$pCondition2 ERR" & @CRLF ) ConsoleWrite( "$pCondition2 OK" & @CRLF ) ; And condition ; Both conditions Local $pCondition $oUIAutomation.CreateAndCondition( $pCondition1, $pCondition2, $pCondition ) If Not $pCondition Then Return ConsoleWrite( "$pCondition ERR" & @CRLF ) ConsoleWrite( "$pCondition OK" & @CRLF ) ; Find "Lists" split button Local $pButton, $oButton $oWindow.FindFirst( $TreeScope_Descendants, $pCondition, $pButton ) $oButton = ObjCreateInterface( $pButton, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oButton ) Then Return ConsoleWrite( "$oButton ERR" & @CRLF ) ConsoleWrite( "$oButton OK" & @CRLF ) ; Click (Invoke) button Local $pInvoke, $oInvoke $oButton.GetCurrentPattern( $UIA_InvokePatternId, $pInvoke ) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Invoke() EndFunc
    1 point
  11. Use "" for both the title and text parameters to get the current active window, or you can specify: "[ACTIVE]"
    1 point
×
×
  • Create New...