使用多个标签打开IE [英] Open IE with multiple tabs
问题描述
我正在尝试创建一个可以添加到启动"文件夹中的AutoHotkey脚本,以使用多个预定选项卡打开IE.我有几个经常在工作的网站,&我希望在首次登录加载这些页面时自动打开IE.我搜索了&找到了一些我尝试根据需要进行更改的AHK,但是我收到了与它们有关的错误.这是我要使用的代码:
I'm trying to create an AutoHotkey script that can be added to the Startup folder, to open IE with multiple predetermined tabs. I have several websites at work that I use regularly, & I want to have IE automatically open when I first login with these pages loaded. I've searched & found a few AHKs which I've tried to alter for my needs, but I receive errors with them. Here is the code I'm trying to use:
Pwb := COM_CreateObject ("InternetExplorer.Application")
Pwb.Visible:=True
Pwb.Navigate("https://*****.org/***/")
Pwb.Navigate2("https://*****", 2048)
Pwb.Navigate3("http://*****", 2048)
Pwb.Navigate4("http://*****", 2048)
Pwb.Navigate5("*****", 2048)
Pwb.Navigate6("*****", 2048)
Return
启动此程序时,我收到错误消息以下变量名称包含非法字符:"Pwb.Visible".程序将退出. 如果我尝试仅删除部分代码,则会在我的网站上看到错误:错误:调用了不存在的函数.特别是:Pwb.Navigate("https:// . org/ **/)该程序将退出."
When I launch this I receive error "The following variable name contains an illegal character: "Pwb.Visible" The program will exit." If I try to just delete that part of the code, I then get errors on my websites: "Error: Call to nonexistent function. Specifically: Pwb.Navigate("https://.org/**/") The program will exit."
推荐答案
尝试一下.确保您具有最新版本的AutoHotkey(v1.1 +). COM_CreateObject()
应该为ComObjCreate()
,并且该对象中没有可用的Navigate3,Navigate4或Navigate5 ...方法.
Try this. Make sure you have the latest version of AutoHotkey (v1.1+). COM_CreateObject()
should be ComObjCreate()
and there are no Navigate3, Navigate4, or Navigate5... methods available in that object.
Pwb := ComObjCreate("InternetExplorer.Application")
Pwb.Visible:=True
Pwb.Navigate("http://www.google.com")
Pwb.Navigate("http://stackoverflow.com", 2048)
Pwb.Navigate("http://news.google.com", 2048)
Pwb.Navigate("https://www.quora.com/", 2048)
Return
这篇关于使用多个标签打开IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!