博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
autoit3 ie.au3 函数之——_IECreate
阅读量:4052 次
发布时间:2019-05-25

本文共 2006 字,大约阅读时间需要 6 分钟。

_IECreate: Create an Internet Explorer Browser Window.

创建一个IE浏览器窗口.

格式:

#include <IE.au3>

_IECreate ( [$s_Url = "about:blank" [, $f_tryAttach = 0 [, $f_visible = 1 [, $f_wait = 1 [, $f_takeFocus = 1]]]]] )

Parameters

$s_Url [optional] specifies the Url to navigate to upon creation
$f_tryAttach [optional] specifies whether to try to attach to an existing window
0 = (Default) do not try to attach
1 = Try to attach to an existing window
$f_visible [optional] specifies whether the browser window will be visible
0 = Browser Window is hidden
1 = (Default) Browser Window is visible
$f_wait [optional] specifies whether to wait for page to load before returning
0 = Return immediately, not waiting for page to load
1 = (Default) Wait for page load to complete before returning
$f_takeFocus [optional] specifies whether to bring the attached window to focus
0 = Do not bring window into focus
1 = (Default) bring window into focus

例子: 打开一个网页

; *******************************************************

; Example 1 - Create a browser window and navigate to a website
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ("www.autoitscript.com")

例子:打开一个网页, 如果不存在就打开,如果已经存在就不用重新打开。 但是当已经存在时会有问题产生。 暂时不清楚什么原因。

; *******************************************************

; Example 2 - Create new browser windows pointing to each of 3 different URLs
;               if one does not already exist ($f_tryAttach = 1)
;               do not wait for the page loads to complete ($f_wait = 0)
; *******************************************************
;
#include <IE.au3>
_IECreate ("www.autoitscript.com", 1, 1, 0)
_IECreate ("my.yahoo.com", 1, 1, 0)
_IECreate ("www.google.com", 1, 1, 0)

例子: 打开一个空的网页, 并修改原代码。

; *******************************************************

; Example 4 - Create an empty browser window and populate it with custom HTML
; *******************************************************
;
#include <IE.au3>
$oIE = _IECreate ()
$sHTML = "<h1>Hello World!</h1>"
_IEBodyWriteHTML ($oIE, $sHTML)

转载地址:http://rgcci.baihongyu.com/

你可能感兴趣的文章
AsyncTask、View.post(Runnable)、ViewTreeObserver三种方式总结frame animation自动启动
查看>>
Android中AsyncTask的简单用法
查看>>
java反编译命令
查看>>
activemq依赖包获取
查看>>
概念区别
查看>>
final 的作用
查看>>
在Idea中使用Eclipse编译器
查看>>
Idea下安装Lombok插件
查看>>
zookeeper
查看>>
Idea导入的工程看不到src等代码
查看>>
技术栈
查看>>
Jenkins中shell-script执行报错sh: line 2: npm: command not found
查看>>
8.X版本的node打包时,gulp命令报错 require.extensions.hasownproperty
查看>>
Jenkins 启动命令
查看>>
Maven项目版本继承 – 我必须指定父版本?
查看>>
通过C++反射实现C++与任意脚本(lua、js等)的交互(二)
查看>>
利用清华镜像站解决pip超时问题
查看>>
微信小程序开发全线记录
查看>>
CCF 分蛋糕
查看>>
解决python2.7中UnicodeEncodeError
查看>>