2016-12-23 13 views
-2

私はプログラマーではなく、私は助けが必要です。 この2つのスクリプトを1つに結合するにはどうすればよいですか? それから私はこれをEXEに変換し、タンクスタイルのpendrive :)としてプレゼントします。VBSパスワードで保護された画像

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 

誰かが悪い写真2場合には、Picture1のを示して適切なパスワードを入力するとき。

答えて

-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 

2番目の画像が欠落していた場合は、表示する2番目の画像の位置をXXXXに変更してください。

+0

ありがとうございました!それはまさに私が欲しいものでした。それは彼のガールフレンドからの私の親友のクリスマスプレゼントの一部です:)。メリークリスマスとお誕生日おめでとう:) – kaju666

+0

PS。なぜこの質問が投票していますか? – kaju666

関連する問題