Jump to content

Active ActiveX in IE Control


Golabius
 Share

Recommended Posts

how can i active ActiveX in IE Control?

i want use activex in java script & then load html file in IE Control in my program but i dont know how can i do it.

(run autoit code in javascript and i just run Au3Code in IE Control in my program not in IE Windows(Not Separate Windows) )

My Au3Code:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>

$oIE = _IECreateEmbedded()
$form_main = GUICreate("AI in JS", 483, 385, 302, 218)
$ctrl_ie = GUICtrlCreateObj($oIE, 0, 0, 482, 384)
GUISetState(@SW_SHOW)
_IENavigate($oIE,@ScriptDir&"\Test.htm")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
  Case $GUI_EVENT_CLOSE
   Exit
EndSwitch
WEnd

& Test.htm Code:

<html>
<head></head>
<body>
<script language="javascript" type="text/javascript">
var oAutoIt = new ActiveXObject("AutoItX3.Control");
oAutoIt.Run("notepad.exe");
oAutoIt.MsgBox(0,"","HelloWorld!");
</script>
</body>
</html>
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

×
×
  • Create New...