excel - 为非 Office 应用程序设置窗口参数的困难
问题描述
我有一个 Excel 应用程序 (PC W10),它启动 InternetExplorer 和各种网站,然后根据需要设置窗口大小。以下代码适用于 InternetExplorer –</p>
myLink = “some website url”
Set myInt = CreateObject("InternetExplorer.Application") 'launch IE
With myInt
.Height = hig
'etc. for other parameters
End With
myInt.Navigate2 myLink 'go to website
Do While myInt.Busy 'wait until all is done before doing anything else
Loop
但现在很多网站不再支持 IE,我需要换个浏览器(例如 FireFox、Chrome 或 Edge)——</p>
myLink = “some website url”
myInt = “FireFox”
appName = “firefox.exe"
appPath = "C:\Program Files\Mozilla Firefox\"
myApp = Shell(appPath & appName & " -url " & myLink)
'Up to here all is well
'The intended code below obviously does not work
With myInt
.Height = hig
'etc. for other parameters
End With
Do While myInt.Busy
Loop
上面可以启动浏览器和网站,但我找不到如何控制窗口的尺寸并创建等待循环。
我将不胜感激任何人可以给我的任何方向。
最好的问候
解决方案
推荐阅读
- opam - opam init 无法验证证书
- python - 存储 DataFrame 行中的值并在另一个操作中使用它们
- r - 如何根据列中的两个值过滤行?
- python - 如何将 NumPy (k,n,m)-size ndarray 转换为 (k)-size dttype=object ndarray of (n,m)-size ndarrays?
- java - java/Android中包含的含义
- typescript - 如何将道具或状态甚至参数传递给打字稿反应中的组件
- python - 如何通过 Tkinter 中的 Button 命令将值传递给全局变量?
- node.js - 有什么方法可以重命名工作表而不丢失任何元数据
- c - LeetCode-1382. 平衡二叉搜索树
- angular - 在 Angular 中将表单拆分为组件