Can someone demonstrate the
NewWindow2 event? I'm fiddling around with Xulrunner, and it doesn't have the
NewWindow3 event, only the NewWindow2 event.
I found the example by Sean to redirect calls for a new window to the same control. I want to be able to do the same in Xulrunner (redirect to same control or new control)
Code:
Navigate:
COM_Invoke(pweb, "Navigate2", _URL_)
Return
Web_NewWindow3(prms)
{
Global _URL_:= COM_DispGetParam(prms,4)
COM_DispSetParam(-1,prms,1,11)
SetTimer, Navigate, -10
}
Also, in Xulrunner, I cannot get elements from the page like expected.
This works fine:
Code:
COM_Invoke(pwb, "Navigate2", "javascript:alert(document.images.length)")
But this doesn't:
Code:
MsgBox % COM_Invoke(pwb, "document.images.length")
It works with IE. I cannot seem to get handles in Xulrunner to all page elements.
Anybody willing to test this?
You'll need
Xulrunner. Then you need to register the ActiveX
Code:
MozAxDir = %A_ScriptDir%\bin\xulrunner ; path to your xulrunner folder
RunWait, regsvr32.exe /s mozctlx.dll, %MozAxDir%, UseErrorLevel
If ErrorLevel
msgbox error registering ActiveX
After that, you can use any IE COM example. All you need to do is replace "Shell.Explorer" with "Mozilla.Browser" when you add the control with COM_AtlAxCreateContainer