Jump to content

rusdady

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by rusdady

  1. Does anyone know how to get elements of the html page? Whatever I try now nothing is working...
  2. Unfortunatelly, this part ;~loop until button is loaded     local $oClock =_UIA_getFirstObjectOfElement($oDocument,"id:=TodaysActivities_btnClock", $treescope_subtree)     While not IsObj($oClock)         Sleep(500)         $oClock =_UIA_getFirstObjectOfElement($oDocument,"id:=TodaysActivities_btnClock", $treescope_subtree)     WEnd has stopped working. Script cannot find button by id. And it happend, i believe, after windows 10 update...
  3. Finally, I ended up with following approach: $oDocument=_UIA_getFirstObjectOfElement($oIE,$cDocumentWindow, $treescope_subtree) If not isobj($oDocument) Then _UIA_DumpThemAll($oIE,$treescope_subtree) Else $t=stringsplit(_UIA_getPropertyValue($oDocument, $UIA_BoundingRectanglePropertyId),";") _UIA_DrawRect($t[1],$t[3]+$t[1],$t[2],$t[4]+$t[2]) ;~loop until button is loaded local $oClock =_UIA_getFirstObjectOfElement($oDocument,"id:=TodaysActivities_btnClock", $treescope_subtree) While not IsObj($oClock) Sleep(500) $oClock =_UIA_getFirstObjectOfElement($oDocument,"id:=TodaysActivities_btnClock", $treescope_subtree) WEnd _UIA_action($oClock,"leftclick") Sleep(2000) _UIA_action($oIE,"close") EndIf I put "while" cycle to check if needed button is loaded. It seems like it is working... If anyone has better ideas - please welcome to share it... :-)
  4. Thank you! You pointed me to the right direction. The only problem is that when I load page it popups the "Windows Security" window asking for credentials and until credentials entered page is not loading... but I'll give it a try. Thanks anyway!
  5. Hi. Is there a way in autoit script to wait while browser's html document fully loaded, instead of putting script in Sleep? I have this code: Sleep(8000) $oDocument=_UIA_getFirstObjectOfElement($oIE,$cDocumentWindow, $treescope_subtree) Sleep(8000) If not isobj($oDocument) Then _UIA_DumpThemAll($oIE,$treescope_subtree) Else ...... EndIf I do not like this - Sleep(8000). Sometimes it takes 2 seconds to load, sometimes it takes over 8 seconds... I would like to have something that would wait when html document is ready/loaded. Thank you.
  6. Ok, finally... I have downloaded ALL examples and UIA... files and checked all they content and finally found missing libraries... and it seems like I was able to pass this error. I will proceed with my task... Thank you.
  7. I am trying to open web browser, let it be IE, enter website in address line and click button on the page. This is for start. I tried ex8_ie.au3 and others and this particular script stops at ;~ Find the IE window $oIE=_UIA_getFirstObjectOfElement($UIA_oDesktop, $cBrowser, $treescope_children) <---- this line if not isobj($oIE) Then _UIA_DumpThemAll($UIA_oDesktop,$treescope_children) EndIf yes, I read it. But found no explanation why these #include "CUIAutomation2.au3" #include "UIAWrappers.au3" two files where missing from the set and still included in the examples... I appreciate your help guys. Thank you.
  8. Hi there! I am trying to automate any browser. I tried few scripts from examples and most of them stopped at some lines with "unknown function name" and functions like _UIA_getFirstObjectOfElement or this one consolewrite("*** " & _UIA_getVersionInfoString() )... There were missing couple of files - "CUIAutomation2.au3" and "UIAWrappers.au3". I looked for them in installed examples , in downloaded examples, finally, I've got them from github, but... still no luck. What am I missing here? Thank you.
×
×
  • Create New...