Using ActiveX to copy and paste from a website
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur ActiveX dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!