我不是程序员,我需要帮助。 如何将这两个脚本合二为一? 然后我将它转换为EXE并在坦克风格pendrive上提供礼物:)。
pass=inputbox("Password?")
if pass="fish" then msgbox("Correct Password!") else msgbox("Incorrect Password!")
和
Set objExplorer = CreateObject("InternetExplorer.Application")
With objExplorer "
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Left = 200
.Top = 200
.Width = 650
.Height = 440
.Visible = 1
.Document.Title = "Kocham cie Maciek!"
.Document.Body.InnerHTML = _
"<center>Kocham cie Maciek <3<br><br><img src='http://www.crystalclearsports.net/file/2016/07/use_love_quotes_for_him_and_inspire_romantic_vitality.jpg' height=336 width=600></center>"
"
End With
当有人输入好的密码时,它会显示Picture1,如果显示错误的Picture2。
答案 0 :(得分:-1)
试试这个!
Dim MyPassword, objExplorer
MyPassword = InputBox("Enter the Password and Press 'OK' ", "Password")
MyPassword = Trim(MyPassword)
If MyPassword = "" Then
Msgbox "No Password is entered"
Else
Set objExplorer = CreateObject("InternetExplorer.Application")
With objExplorer
.Navigate "about:blank"
.ToolBar = 0
.StatusBar = 0
.Left = 200
.Top = 200
.Width = 650
.Height = 440
.Visible = 1
.Document.Title = "Kocham cie Maciek!"
End With
If StrComp(MyPassword, "FISH", 1) = 0 Then
' Correct Password
Msgbox "The Password is Correct"
objExplorer.Document.Body.InnerHTML = "<center>Kocham cie Maciek <3<br><br><img src='http://www.crystalclearsports.net/file/2016/07/use_love_quotes_for_him_and_inspire_romantic_vitality.jpg' height=336 width=600></center>'"
Else
Msgbox "Incorrect Password"
objExplorer.Document.Body.InnerHTML = "<center>Kocham cie Maciek <3<br><br><img src='XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' height=336 width=600></center>'"
End If
End if
您错过了第二张图片,请使用您想要显示的第二张图片的位置更新XXXX!