crashes with:
Code: Select all
---------------------------
ComObjConnect - Example.ahk
---------------------------
Error: Expected a String but got a VarRef.
Line#
011: s := ""
012: If (ie != ieEventParam)
013: s .= "First parameter is a new wrapper object."
014: If (ie == ieFinalParam)
015: s .= "Final parameter is the original wrapper object."
016: If (ComObjValue(ieEventParam) == ComObjValue(ieFinalParam))
017: s .= "Both wrapper objects refer to the same IDispatch instance."
---> 018: MsgBox(s . "Finished loading " ie.Document.title " @ " url)
019: ie.Quit()
020: ExitApp()
021: }
022: Exit
The current thread will exit.
---------------------------
OK
---------------------------
Windows 11 21H2 (Build 22000.675)
OT:
If I run this example as nested function, the PrefixEventName functions will not be called (without any hint). Is this desired?
Spoiler