找回密码
 注册
搜索
[新手上路]批处理新手入门导读[视频教程]批处理基础视频教程[视频教程]VBS基础视频教程[批处理精品]批处理版照片整理器
[批处理精品]纯批处理备份&还原驱动[批处理精品]CMD命令50条不能说的秘密[在线下载]第三方命令行工具[在线帮助]VBScript / JScript 在线参考
查看: 12339|回复: 4

VBS或批处理同时打开两个网站如何指定大小?

[复制链接]
发表于 2010-11-4 14:39:43 | 显示全部楼层 |阅读模式
VBS或批处理同时打开两个网站如何指定大小?
用 VBS 或批处理同时打开两个网站 能能定大小
指定IE
我已经做到了 就是控制不了大小
高手们帮下
Set oShell = WScript.CreateObject ("WSCript.shell")

oShell.run("iexplore.exe http://baidu.com")
oShell.run("iexplore.exe http://zhidao.baidu.com")

在我的基础上 帮我做个能控制打开窗口大小
如果可以能做到一打开就两个窗口拼排 最好
 楼主| 发表于 2010-11-5 15:06:45 | 显示全部楼层
高手们帮下啦 ,谢谢 !
发表于 2010-11-5 22:54:32 | 显示全部楼层
这样吗?
  1. dim ie1,ie2,avW,avH
  2. set ie1 = wscript.createobject("internetexplorer.application")
  3. set ie2 = wscript.createobject("internetexplorer.application")
  4. avW = createobject("htmlfile").parentWindow.screen.availWidth
  5. avH = createobject("htmlfile").parentWindow.screen.availHeight
  6. with ie1
  7. .visible = true
  8. .navigate("http://www.baidu.com")
  9. .width = avw/2
  10. .height = avh
  11. .left = 0
  12. .top = 0
  13. end with
  14. wscript.sleep 1000
  15. with ie2
  16. .visible = true
  17. .navigate(http://zhidao.baidu.com)
  18. .width = avw/2
  19. .height = avh
  20. .left = avw/2
  21. .top = 0
  22. end with
  23. set ie1 = nothing
  24. set ie2 = nothing
复制代码
 楼主| 发表于 2010-11-7 13:46:09 | 显示全部楼层
原帖由 broly 于 2010-11-5 22:54 发表
这样吗?
dim ie1,ie2,avW,avH
set ie1 = wscript.createobject("internetexplorer.application")
set ie2 = wscript.createobject("internetexplorer.application")
avW = createobject("htmlfile").parentWind ...


运行不了啊朋友
发表于 2010-12-14 00:42:20 | 显示全部楼层
学习了,原来WITH是这么用的啊,看来方便不少啊。不过.navigate(http://zhidao.baidu.com)
少了两个引号。呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|批处理之家 ( 渝ICP备10000708号 )

GMT+8, 2026-3-17 02:48 , Processed in 0.009248 second(s), 8 queries , File On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表