加入了一个simple object加入如下方法
STDMETHODIMP CRunIt::GetUrl(LPSTR url)
{
WinExec("d:\\GetIhtml.exe /fill",SW_SHOW);
MessageBox(NULL,url,"OK",NULL);
return S_OK;
}
<script language="VBScript">Sub OnContextMenu()
On Error Resume Next Set doc=external.menuArguments.document
set objNetSamp=CreateObject("Runit class") Call objNetSamp.GetUrll(doc.TITLE)
set objNetSamp= Nothing
Call CoFreeUnusedLibraries
end Sub
call OnContextMenu()</script>为啥不好使,请指教
STDMETHODIMP CRunIt::GetUrl(LPSTR url)
{
WinExec("d:\\GetIhtml.exe /fill",SW_SHOW);
MessageBox(NULL,url,"OK",NULL);
return S_OK;
}
<script language="VBScript">Sub OnContextMenu()
On Error Resume Next Set doc=external.menuArguments.document
set objNetSamp=CreateObject("Runit class") Call objNetSamp.GetUrll(doc.TITLE)
set objNetSamp= Nothing
Call CoFreeUnusedLibraries
end Sub
call OnContextMenu()</script>为啥不好使,请指教
<script language="VBScript">
On Error Resume Next
if err<>0 then
Alert("InfoPick are not running or not installed on this PC!")
else
set InfoPick = CreateObject( "PickData.Copy" )
InfoPick.FromOut()
Set InfoPick = Nothing
Call CoFreeUnusedLibraries
end if
</script>
你用6新建工程时选MFC dll ->支持Automation-
然后给该类添加个方法就是了,