nanobox1471 Posted February 20, 2018 Share Posted February 20, 2018 I'm new to AutoIt and programming/scripting in general and have been having some trouble getting scripts I create on my personal machine to run the same on my work computer. I'm running windows 10 enterprise on both machines and Functions like _IENavigate and _IETagNameGetCollection don't seem to read the DOM when executed on my work computer, unless I run it with Administrative permissions I haven't been able to get around this. I've been unsuccessful searching the forum and google for this particular issue. Any Suggestions? #include <IE.au3> #include <Array.au3> #include <String.au3> $asset = InputBox("PC Search", "Search by AM", "", "", 100, 120) If @error = 0 Then $oIE = _IECreate("http://mypc.org/PeekabooApi/peek/assets/assettags/" & $asset & "?Min=2&", 0, 0) $h4 = _IETagNameGetCollection($oIE, "h4") For $title In $h4 If IsObj($title) Then Local $arr = StringSplit($title.innerhtml, "", 2) $string = _ArrayToString($arr, "", 11, 24, "", 11, 24) InputBox("Search Results", "Found String", $string, "", 100, 120) EndIf Next Else EndIf Link to comment Share on other sites More sharing options...
Danp2 Posted February 20, 2018 Share Posted February 20, 2018 You could add some error checking after each call to one of the _IE functions. You'll need to provide a better description of the issue if you want further input. Which lines are failing? Post the contents of the Scite output window for us to review. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
nanobox1471 Posted February 20, 2018 Author Share Posted February 20, 2018 On the machine without administrative permissions the console outputs the following errors: >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "F:\Scripts\Servicedesk\pc_lookup.au3" --> IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.) --> IE.au3 T3.0-2 Error from function _IETagNameGetCollection, $_IESTATUS_InvalidObjectType "F:\Scripts\Servicedesk\pc_lookup.au3" (31) : ==> Variable must be of type "Object".: For $title In $h4 For $title In $h4^ ERROR >Exit code: 1 Time: 9.469 It seems that after the _IECreate Object is created, the rest of the script is unable to detect that object, but again only happens when executed as a standard user. Link to comment Share on other sites More sharing options...
Danp2 Posted February 20, 2018 Share Posted February 20, 2018 Is there a change in security zones, such as from the original http to https? If so, that could be the issue. Try reattaching to the browser with _IEAttach before continuing your script. If you search the forum for this error ($_IESTATUS_ClientDisconnected) you will likely find other discussions on this issue. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
nanobox1471 Posted February 20, 2018 Author Share Posted February 20, 2018 4 hours ago, Danp2 said: Is there a change in security zones, such as from the original http to https? If so, that could be the issue. With more tinkering this seems to be the issue. These errors aren't present on external sites. Thank You. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now