Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: vbscript

  1. #1
    New Coder
    Join Date
    Nov 2002
    Location
    philippines
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    vbscript

    i go to http://www.w3schools.com/vbscript

    it can create the following in html


    <html>
    <body>

    <script type="text/vbscript">
    document.write("Scripts in the body section are executed when the page is loading")
    </script>

    </body>
    </html>


    and isee some files in window a .vbs this is


    L_Welcome_MsgBox_Message_Text = "This script will create a shortcut to Notepad on your desktop."
    L_Welcome_MsgBox_Title_Text = "Windows Scripting Host Sample"
    Call Welcome()

    ' ********************************************************************************
    ' *
    ' * Shortcut related methods.
    ' *

    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")


    Dim MyShortcut, MyDesktop, DesktopPath

    ' Read desktop path using WshSpecialFolders object
    DesktopPath = WSHShell.SpecialFolders("Desktop")

    ' Create a shortcut object on the desktop
    Set MyShortcut = WSHShell.CreateShortcut(DesktopPath & "\Shortcut to notepad.lnk")

    ' Set shortcut object properties and save it
    MyShortcut.TargetPath = WSHShell.ExpandEnvironmentStrings("%windir%\notepad.exe")
    MyShortcut.WorkingDirectory = WSHShell.ExpandEnvironmentStrings("%windir%")
    MyShortcut.WindowStyle = 4
    MyShortcut.IconLocation = WSHShell.ExpandEnvironmentStrings("%windir%\notepad.exe, 0")
    MyShortcut.Save

    WScript.Echo "A shortcut to Notepad now exists on your Desktop."

    ' ********************************************************************************
    ' *
    ' * Welcome
    ' *
    Sub Welcome()
    Dim intDoIt

    intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
    vbOKCancel + vbInformation, _
    L_Welcome_MsgBox_Title_Text )
    If intDoIt = vbCancel Then
    WScript.Quit
    End If
    End Sub

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    and what is your question now
    I am the luckiest man in the world


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •