Using ActiveX to copy and paste from a website
이전 댓글 표시
I'm trying to use the function from the this post: https://www.mathworks.com/matlabcentral/answers/92736-is-there-an-example-of-how-to-call-microsoft-internet-explorer-as-an-automation-server
function str=CopyPasteIE(url);
ha = actxserver('internetexplorer.application');
ha.Visible = 1;
Navigate(ha, url);
pause(3); % Pause to let the page load
ha.document.execCommand('selectall','','');
ha.document.execCommand('copy','','');
str=clipboard('paste');
end
When I use the function I get this Error:
No appropriate method, property, or field execCommand for class Interface.JScriptTypeInfo_JScript_Type_Info.
Error in CopyPasteIE (line 6)
ha.document.execCommand('selectall','','');
What needs to change so that this function will work? I still use MatLab R2014a if it makes any difference.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 ActiveX에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!