gpt4 book ai didi

vbscript - VB脚本集语句

转载 作者:行者123 更新时间:2023-12-03 08:33:18 24 4
gpt4 key购买 nike

我需要以下代码的帮助:

Dim IE 
Dim UserName

Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.nextview.com/index.php?country=my"
Do Until IE.ReadyState <> 3
Loop

Set UserName = IE.Document.getElementById("username") <----- ERROR
IE.Document.all.UserName.Value = "TESTING"
Set Login = IE.Document.getElementById("frmlogin")
Login.submit
Do Until IE.ReadyState <> 3
Loop

创建代码是为了帮助我输入用户名。但是在上面显示的位置有错误。

任何想法如何解决这个问题?

最佳答案

我认为您等待的Do..Loop不正确。

'Syntax notes:
Do Until [expression return False]
Do While [expression return True]

'So, you can use one of the next:
Do Until IE.readyState = 4
Wscript.Sleep 100
Loop

Do While IE.readyState <> 4
Wscript.Sleep 100
Loop

关于vbscript - VB脚本集语句,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17368881/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com