Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/26/2019 in all areas

  1. Thank you my friend
    1 point
  2. Melba23

    I don't understand nothing

    zoel, Which AutoIt book did you read? I would recommend this one: Other than that, what would you like to do with AutoIt? If you have a specific goal in mind it is much easier to understand the limited number steps you need to do it, rather then facing the entire AutoIt function list and being completely bewildered. Over to you. M23
    1 point
  3. use the UNC path instead of the mapping ( https://forums.virtualbox.org/viewtopic.php?f=7&t=40036 )
    1 point
  4. @TheDcoder Did you try to disable UAC (temporarily)? Your issue seems something (but could not) related to UAC, as stated here
    1 point
  5. PyAutoGUI looks like a neat piece of library for python, it has functions for MsgBox and Screenshots too But I believe it is not relevant in this topic as it is not about having a cross-platform automation toolkit... maybe I should change the name of the topic to mention the AutoIt language specifically? Edit: Done!
    1 point
  6. Update. After more troubleshooting i found a combo-box items only generate it's list after it has been opened. A workaround for this is the code below which opens / closes the combo but doesn't take focus. ; --- Find window/control --- ConsoleWrite( "--- Find window/control ---" & @CRLF ) Local $pCondition0 $oUIAutomation.CreatePropertyCondition( $UIA_AutomationIdPropertyId, "cmbAddressType", $pCondition0 ) If Not $pCondition0 Then Return ConsoleWrite( "$pCondition0 ERR" & @CRLF ) ConsoleWrite( "$pCondition0 OK" & @CRLF ) Local $pComboBox1, $oComboBox1 $oWindow1.FindFirst( $TreeScope_Descendants, $pCondition0, $pComboBox1 ) $oComboBox1 = ObjCreateInterface( $pComboBox1, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oComboBox1 ) Then Return ConsoleWrite( "$oComboBox1 ERR" & @CRLF ) ConsoleWrite( "$oComboBox1 OK" & @CRLF ) Local $pInvoke, $oInvoke $oComboBox1.GetCurrentPattern( $UIA_LegacyIAccessiblePatternId, $pInvoke) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtagIUIAutomationLegacyIAccessiblePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.DoDefaultAction() $oInvoke.DoDefaultAction() I also found using the Legacy Select lets me select my item without taking focus. I don't know why it needed the number 3 but without it didn't work ^^. ;Find List Item Local $pCondition4 $oUIAutomation.CreatePropertyCondition( $UIA_NamePropertyId, "Do it later", $pCondition4 ) If Not $pCondition4 Then Return ConsoleWrite( "$pCondition4 ERR" & @CRLF ) ConsoleWrite( "$pCondition4 OK" & @CRLF ) Local $pListItem1, $oListItem1 $oComboBox1.FindFirst( $TreeScope_Children, $pCondition4, $pListItem1 ) $oListItem1 = ObjCreateInterface( $pListItem1, $sIID_IUIAutomationElement, $dtagIUIAutomationElement ) If Not IsObj( $oListItem1 ) Then Return ConsoleWrite( "$oListItem1 ERR" & @CRLF ) ConsoleWrite( "$oListItem1 OK" & @CRLF ) Local $pInvoke, $oInvoke $oListItem1.GetCurrentPattern( $UIA_LegacyIAccessiblePatternId, $pInvoke) $oInvoke = ObjCreateInterface( $pInvoke, $sIID_IUIAutomationLegacyIAccessiblePattern, $dtagIUIAutomationLegacyIAccessiblePattern ) If Not IsObj( $oInvoke ) Then Return ConsoleWrite( "$oInvoke ERR" & @CRLF ) ConsoleWrite( "$oInvoke OK" & @CRLF ) $oInvoke.Select(3) One random question! Can IUI enable/disable controls similar to ControlEnable/ControlDisable?
    1 point
×
×
  • Create New...