VBS密码保护的图像

kaju666

我不是程序员,需要帮助。如何将这两个脚本合而为一?然后,我将其转换为EXE并提供给Tank Tank 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,如果输入的密码不正确,则会显示Picture1。

普雷格斯·萨拉瓦南(Prageeth Saravanan)

试试这个!

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 !!

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章