Sign in to follow this  
Followers 0
Queener

GetCollection require admin?

4 posts in this topic

#1 ·  Posted (edited)

 


; Open a browser with the basic example, get the collection
; of all elements and display the tagname and innerText of each

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IE_Example("basic")
Local $oElements = _IETagNameAllGetCollection($oIE)
For $oElement In $oElements
    If $oElement.id Then MsgBox($MB_SYSTEMMODAL, "Element Info", "Tagname: " & $oElement.tagname & @CRLF & "id: " & $oElement.id & @CRLF & "innerText: " & $oElement.innerText)
Next

_IEQuit($oIE)

Can someone tell me why this script requires admin? If I don't run it as admin I get the error:

==> Variable must be of type "Object".:
For $oLink In $oLinks
For $oLink In $oLinks^ ERROR
Edited by asianqueen

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites

asianqueen,

The code runs for me as a script under an admin user and as a compiled exe under a standard user (AutoIT environment not available to standard user) without using #requireadmin.

Autoit 3.3.10.2

Vista Pro

32bit processor


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I guess it's buggy for windows 8 then...  because my project for firefox doesn't run also. Kept getting errors.

i take it back, tested on win 7 32-bit os. Same result...

Edited by asianqueen

Msgbox(0, "Hate", "Just hate it when I post a question and find my own answer after a couple tries. But if I don't post the question, I can't seem to resolve it at all.")

Share this post


Link to post
Share on other sites

I've run that example on Win7 with no problem (under admin type user).  Doubt that the code is buggy...


Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0