Jump to content

Recommended Posts

Posted

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
Posted

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.

Posted
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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...