Jump to content

ActiveX Control popup


gseller
 Share

Recommended Posts

For security purposes at work we have the activeX turned off. I am trying to catch the popup and click yes to allow the activeX to run. I am looking for window title "Internet Explorer" and ClassName "#32770" I want to after being able to catch seeing the popup to click yes to allow it but for now just have the MsgBox until I can make the script see the popup. Anyone got any ideas on a good/better way to do this?

#Include <WinAPI.au3>

Dim $sClassName = "#32770"
Dim $sWindowName = "Internet Explorer"

_WinAPI_FindWindow($sClassName, $sWindowName)
MsgBox(64,"SUCCESS!","WE ARE SEEING THE POPUP!")
;NEED TO ADD A FIND AND SELECT &YES AND HAVE DONE WHEN CLASS AND TITLE FOUND.
While 1
    Sleep(10)
Wend

Thank You In Advance...

Edited by gesller
Link to comment
Share on other sites

Try it this way:

Opt("WinTitleMatchMode", 4)
$hPopup = WinGetHandle("[CLASS:#32770, TITLE:Internet Explorer]")

$sTitle = WinGetTitle($hPopup)
$sText = WinGetText($hPopup)
MsgBox(64,"SUCCESS!","Title = " & $sTitle & "  Text = " & $sText)

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

For security purposes at work we have the activeX turned off. I am trying to catch the popup and click yes to allow the activeX to run. I am looking for window title "Internet Explorer" and ClassName "#32770" I want to after being able to catch seeing the popup to click yes to allow it but for now just have the MsgBox until I can make the script see the popup. Anyone got any ideas on a good/better way to do this?

#Include <WinAPI.au3>

Dim $sClassName = "#32770"
Dim $sWindowName = "Internet Explorer"

_WinAPI_FindWindow($sClassName, $sWindowName)
MsgBox(64,"SUCCESS!","WE ARE SEEING THE POPUP!")
;NEED TO ADD A FIND AND SELECT &YES AND HAVE DONE WHEN CLASS AND TITLE FOUND.
While 1
    Sleep(10)
Wend

Thank You In Advance...

Embed IE in a gui and navigate you your local file?...only alerts generated are if click on a link that opens a popup window.
Link to comment
Share on other sites

Will66 - Not sure what you mean.. Please elaborate?

My assumption is you wish to run a local file, eg.html with javascript or media player, that contains activex scripting?

If so running embedded browser will not produce security alert except for popup windows or working across network drives

If its a http:// protocol it won't help.

cheers

Link to comment
Share on other sites

Will66.. Sorry no. This occurs when any web oriented content is opened with any sort of activeX not media. After testing the above doesn't work either. What is happening is this: ActiveX is turned off on our corporate image and locked down. I just want to create a script to monitor for this windows popup shown above and have it click yes.Hope this better explains... :D Clear as mud? LOL Thanks for the suggestions...

Link to comment
Share on other sites

Will66.. Sorry no. This occurs when any web oriented content is opened with any sort of activeX not media. After testing the above doesn't work either. What is happening is this: ActiveX is turned off on our corporate image and locked down. I just want to create a script to monitor for this windows popup shown above and have it click yes.Hope this better explains... :D Clear as mud? LOL Thanks for the suggestions...

May i ask...where are you navigating that requires granting active-x access if its not a local file?

Minimum security should be at least "prompt"

Link to comment
Share on other sites

Any site like www.msn.com or anything with google adsense, these types of sites will cause this popup. I thought I had it narrowed down to window title and class then I want to add a controlclick to click on the second instance of a button.

Opt("WinTitleMatchMode", 4)
$hPopup = WinGetHandle("[CLASS:#32770, TITLE:Internet Explorer]")

$sTitle = WinGetTitle($hPopup)
$sText = WinGetText($hPopup)
MsgBox(64,"SUCCESS!","Title = " & $sTitle & "  Text = " & $sText)

ControlClick($hPopup, "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]")

    While
        Sleep(10)
    WEnd

My goal is for this to be active running in the backgroud and monitor for this popup then control click the yes button. All this does at this time is popup the msgbox with the titles of everything running.. LOL

Link to comment
Share on other sites

My goal is for this to be active running in the backgroud and monitor for this popup then control click the yes button. All this does at this time is popup the msgbox with the titles of everything running.. LOL

Everything running? Do you mean there is more than one #32770 window with that title, so you are getting multiple matches?

:D

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Yep...

Opt("WinTitleMatchMode", 4)
$hPopup = WinGetHandle("[CLASS:#32770, TITLE:Internet Explorer]")

$sTitle = WinGetTitle($hPopup)
$sText = WinGetText($hPopup)
MsgBox(64,"SUCCESS!","Title = " & $sTitle & "  Text = " & $sText)

ControlClick($hPopup, "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]")

    While
        Sleep(10)
    WEnd
gives me:

Posted Image

This is all active appz in my systray.. Any ideas?

Link to comment
Share on other sites

Yep...

Opt("WinTitleMatchMode", 4)
$hPopup = WinGetHandle("[CLASS:#32770, TITLE:Internet Explorer]")

$sTitle = WinGetTitle($hPopup)
$sText = WinGetText($hPopup)
MsgBox(64,"SUCCESS!","Title = " & $sTitle & "  Text = " & $sText)

ControlClick($hPopup, "", "[CLASS:Button; TEXT:Finish; INSTANCE:2]")

    While
        Sleep(10)
    WEndoÝ÷ Ú¯zÉh!¶Úÿ0Ç¥êÜ¢oßW¬ÿ]c¦âáȬjYZrدyªiÎ)æÊ̬¶¶²|¢uæ¬þ«¨µäáË!¢é]+-jYfj×!x0whÂƧvÊ&z)ߢ¹¶*'¢wr§r[x"}©ò«Þ¶­nëm¢v®¶­sd÷BgV÷CµvåFFÆTÖF6ÖöFRgV÷C²ÂB¢b33c·5÷WÒgV÷Cµ´4Ä53¢33#ssÂDDÄS¤çFW&æWBWÆ÷&W%ÒgV÷C°¢b33c¶eväÆ7BÒväÆ7Bb33c·5÷W¤6öç6öÆUw&FRgV÷C´FV'Vs¢FW&R&RgV÷C²fײb33c¶eväÆ7E³Õ³ÒfײgV÷C²ÖF6ærvæF÷w3¢gV÷C²fײÄb¤f÷"b33c¶âÒFòb33c¶eväÆ7E³Õ³Ð b33c·5FFÆRÒb33c¶eväÆ7E²b33c¶åÕ³Ò²²b33c¶åÕ³ÒÒFFÆP b33c·5FWBÒvävWEFWBb33c¶eväÆ7E²b33c¶åÕ³Ò²²b33c¶åÕ³ÒÒtä@ b33c¶'WGFöâÒ6öçG&öÄvWDæFÆRb33c¶eväÆ7E²b33c¶åÕ³ÒÂgV÷C²gV÷C²ÂgV÷Cµ´4Ä53¤'WGFöã²DUC¤fæ6²å5Dä4S£%ÒgV÷C² 6öç6öÆUw&FRgV÷C´FV'Vs¢gV÷C²fײb33c¶âfײgV÷C³¢FFÆRÒgV÷C²fײb33c·5FFÆRfײÄb 6öç6öÆUw&FRgV÷C´FV'Vs¢gV÷C²fײb33c¶âfײgV÷C³¢b33c¶'WGFöâÒgV÷C²fײb33c¶'WGFöâfײÄb 6öç6öÆUw&FRgV÷C´FV'Vs¢gV÷C²fײb33c¶âfײgV÷C³¢FWBÒgV÷C²fײb33c·5FWBfײÄbfײÄb¤æW

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

To simulate what is happening, if you go into your browser Tools/Internet Options/Security/Custom Level/Run ActieX Controls and plugins and choose prompt on this you will get the same popup. This is locked down on these pc's and I want to just either change this somehow or have a script monitor for this popup and choose yes.

OK, I am down to these tree lines...

Opt("WinTitleMatchMode", 4)
WinWaitActive("[TITLE:Internet Explorer; CLASS:Button; INSTANCE:2]", "")

ControlClick ( "Internet Explorer", "", 1 , "", 2 , "", "" )

This will see the popup and close it if the script is ran twice i.e. Double click on the file and then double click to run again. I really apreciate all of your help and suggestions..

Jim

Link to comment
Share on other sites

Hi All, I have made some headway with my script.

Opt("WinTitleMatchMode", 4)
WinKill("Internet Explorer", "A script is accessing some software (an ActiveX control) on this page which has been marked safe for scripting. Do you want to allow this?")
While 1
    Sleep(100)
WEnd

Anyone know how I can make this WinTitleMatchMode or something whatch for this popup and then close it? this happens on every page load so the script needs to run in the background and monitor anytime it sees this title and text close it.

I thought I was going to be able to go into the registyry and change my zone settings but they change right back. The registry is locked.. Anyone have any ideas?

Link to comment
Share on other sites

Hi All, I have made some headway with my script.

Opt("WinTitleMatchMode", 4)
WinKill("Internet Explorer", "A script is accessing some software (an ActiveX control) on this page which has been marked safe for scripting. Do you want to allow this?")
While 1
    Sleep(100)
WEndoÝ÷ Ø    ò¢w¤!£jyëaÅ¢8­ãµÈL¡×¨®Ê&zØb!j×!~í+)¢©jwméÜÛaÈZ¦§²Þ½êò¥¨²azÇ+gyçl¶î)íæÚrH+¢éÝjwf¢x­¢¶§Êئz+lyë-+-Ù^jwm{Ò- Ò0jÈ(x-¡·nW­¢
"Ú-êÞ+-ʼ×!jx,èë¶Ø§Æî¶Ø^ÉÈZ«mm§$N«z¬¶¼¢²Zç@*'z¯y©ò׳ú®¢×¢ç(ºWiºÛaz׬µú+¶°whÁ©Ý¶ºÛhÉbrH§²'^¶)^ýa'vZ(¥»­ü¨»§¶Ø^±Êâ¦Ûhmæëhv-êí)à³bìµÈbè®ØZ¶)ºazzn¶+bK±'i¹^jëh×6Opt("WinTitleMatchMode", 4)
Global $sPopup = "[CLASS:#32770; TITLE:Internet Explorer; TEXT:ActiveX control]"
Global $sButton = "[CLASSNN:Button2; TEXT:Finish]"

AdlibEnable("_ActiveXOK", 500)

While 1
    Sleep(20)
WEnd

Func _ActiveXOK()
    If WinExists($sPopup) Then ControlClick($sPopup, "", $sButton)
EndFunc

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

PsaltyDS... That is so awesome!!! I hade ran upon this post last night before hitting the bed. I was digging in the helpfile and found AdLibEnable was the way to have it look on a time interval. You ROCK Thanks for all your help, not only here but in the past. It is really great having wonderful folks to help when stuck on something or maybe to get an idea where to get started on a project.

Thanks Again!

Jim :)

Oh, this works great also. For anyone else having this issue...

Link to comment
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
 Share

  • Recently Browsing   0 members

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