Guide to VBScripting with Notepad (Make Pop-ups, etc)

Discussion in 'Archives' started by Nyx, Dec 22, 2010.

Guide to VBScripting with Notepad (Make Pop-ups, etc)
  1. Unread #1 - Dec 22, 2010 at 5:16 AM
  2. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Guide to VBScripting with Notepad

    Table of content
    • A brief introduction
    • Getting started
    • The icons
    • Questions
    • Funny codes
    • Afterword

    A brief introduction

    I'm sure you all are familiar with this: You try to run a program, and a window with an error message pops up! Unfortunately, I am not going to explain you how to fix these problems. This guide is about how you can make your own Pop-ups. Enjoy!

    Getting started

    You don't have to install anything, all you need is the Notepad.
    Let's start with some simple examples: Open Notepad, and write msgbox "test". (You can replace the "test" with anything.)
    Save the file as test.vbs, and choose 'Desktop' as location. Hit the 'Save' button (Save the file under 'all files'!), and open the file on your desktop.

    [​IMG]

    Then something like this should pop up:

    [​IMG]

    Note: To change the Msgbox:
    • Right Mousbutton → Edit
    • Right Mousebutton → Open with: Notepad

    Icons

    Now we are going to add an icon and a title to the pop-up. Open a new Notepad, (or edit your previous one) and write: "test", 16, "title" (You can replace the words between the "" with anything.)
    Once again, save it as 'All Files', on your Desktop and don't forget to name it anything.vbs!

    Open it, and you should see something like this:

    [​IMG]

    The 16 represents the red warning sign. Here are a few numbers you can replace it with:

    • 32: Question mark
    • 48: Yellow triangle with a black exclamation mark
    • 68: Blue circle with an I(nformation)
    • 4096: The Pop-up stays on the foreground

    Questions
    a) Ask a question

    Open a new Notepad and write this:

    Code:
    a=inputbox("What is your name?")
    msgbox "You have a nice name, "+a
    (You can replace the words between the "" with anything.)
    Once again, save it as 'All Files', on your Desktop and don't forget to name it anything.vbs!

    Result:
    [​IMG]
    [​IMG]

    b) Polar questions (yes/no questions)

    Open a new notepad and write this:

    Code:
    if msgBox("Would you donate money to Unicef?", vbYesNo, "Question") = vbYes then
    msgbox "That's very kind of you."
    else
    msgbox "Okay, it's YOUR money..."
    end if
    (You can replace the words between the "" with anything.)
    Once again, save it as 'All Files', on your Desktop and don't forget to name it anything.vbs!

    Then you should see something like this:
    [​IMG]

    And so on.

    Funny codes

    A beep

    The following code will activate a short 'beep'. (Speakers must be on)

    Code:
    Set oWS = WScript.CreateObject("WScript.Shell")
    oWS.Run "%comspec% /c echo " & Chr(07), 0, True
    Infinite beeps (Read how to stop the script first, at the end of the guide)

    Code:
    do
    Set oWS = WScript.CreateObject("WScript.Shell")
    oWS.Run "%comspec% /c echo " & Chr(07), 0, True
    loop
    Your computer can speak!

    Code:
    Set vo = CreateObject("SAPI.SpVoice")
    vo.speak "Hello"
    (You can replace the "hello" with anything)

    Change your MSN name

    Code:
    Set WshShell = CreateObject("Wscript.shell") 
    WshShell.Run ("msnmsgr.exe") 
    Wscript.Sleep 1200 
    WshShell.sendkeys "%x" 
    WshShell.sendkeys "O" 
    WshShell.sendkeys "(Enter MSN name here)"
    Computer Disco

    The following code makes your computer Caps Lock light flashing on/out.

    Code:
    Set wshShell =wscript.CreateObject("WScript.Shell")
    do
    wscript.sleep 100
    wshshell.sendkeys "{CAPSLOCK}"
    loop
    Windows Wizard!

    Code:
    On Error Resume Next
    StrAgentName2 = "MERLIN"
    StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
    Set objAgent2 = CreateObject("Agent.Control.2")
    ObjAgent2.Connected = TRUE
    ObjAgent2.Characters.Load strAgentName2, strAgentPath2
    Set objPeter = objAgent2.Characters.Character(strAgentName2)
    ObjPeter.MoveTo 700,300
    ObjPeter.Show
    ObjPeter.Play "GetAttention"
    ObjPeter.Play "GetAttentionReturn"
    ObjPeter.Speak("Hello, I'm a wizard.")
    wscript.sleep 10000
    (You can replace the "Hello, I'm a wizard" with anything)

    Infinite message (Read how to stop the script first)

    Code:
    do 
    msgbox"You can't stop me" 
    loop
    (You can replace the "You can't stop me" with anything.)

    Shut down your computer (There is no way back, so make sure all your work is saved!)

    Code:
    Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
    for each OpSys in OpSysSet
    OpSys.ShutDown()
    next
    Important: How to stop the script:
    1. Control+Alt+Delete
    2. Task Manager
    3. Processes
    4. Search for Wscript.exe and end the process

    Afterword

    I spend quite a lot of time writing this guide, but I'm glad I did it. I would like to see some honest feedback from you, so please don't hestitate to tell me how to improve. If you have any questions, please feel free to PM me and I will get back to you as soon as possible. Thanks for reading and I hope I helped you!
     
  3. Unread #2 - Dec 29, 2010 at 2:24 PM
  4. lilpjer
    Joined:
    Jul 11, 2009
    Posts:
    2,009
    Referrals:
    3
    Sythe Gold:
    0

    lilpjer Grand Master
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Images aren't working :S Good guide though.
     
  5. Unread #3 - Jan 1, 2011 at 1:05 AM
  6. minusinc
    Joined:
    Dec 18, 2010
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0

    minusinc Newcomer

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    It's possible the user deleted the images.
     
  7. Unread #4 - Jan 2, 2011 at 12:58 PM
  8. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    I know. I'll reupload them soon. Last time I used min.us though. & Thanks.

    Nope :(
     
  9. Unread #5 - Jan 2, 2011 at 3:55 PM
  10. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    This has to be one of the best UE guides ever.
     
  11. Unread #6 - Jan 4, 2011 at 3:11 PM
  12. Desirable
    Joined:
    Nov 30, 2010
    Posts:
    102
    Referrals:
    0
    Sythe Gold:
    0

    Desirable Active Member
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Can you re-upload pictures? Thanks.
     
  13. Unread #7 - Jan 8, 2011 at 1:18 AM
  14. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Wow, thanks!

    Will do :)

    EDIT: Replaced all the screenshots.
     
  15. Unread #8 - Jan 10, 2011 at 4:46 PM
  16. xndu
    Joined:
    Jan 9, 2009
    Posts:
    176
    Referrals:
    0
    Sythe Gold:
    0

    xndu Active Member

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Great guide :) I profer to use Notepad++ it is so much cleaner, cheak it out.
     
  17. Unread #9 - Jan 10, 2011 at 5:27 PM
  18. Frenzy
    Joined:
    Dec 3, 2007
    Posts:
    5,282
    Referrals:
    6
    Sythe Gold:
    4
    Heidy (2) OG Club Brony Penguin (2) MushyMuncher Doge Bitch! Cook DIAF Spyro (2)
    Pokémon Trainer <3 n4n0 Gohan has AIDS Le Monkey Shitting Rainbow In Memory of Jon Poker Chip Extreme Homosex Lawrence Potamus

    Frenzy I <3 Roary
    Frenzyy Donor Retired Global Moderator Angelic

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    This is actually a really good guide. Tried it out and worked, thanks alot :)
     
  19. Unread #10 - Jan 10, 2011 at 5:29 PM
  20. Govind
    Joined:
    Apr 22, 2005
    Posts:
    7,825
    Referrals:
    13
    Sythe Gold:
    23
    Prove it! Trole Tier 1 Prizebox Tortoise Penis Le Monkey UWotM8? Wait, do you not have an Archer rank? Potamus

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    It's been a while since we've had new helpful, contributing programmers :)

    Keep up the great work.
     
  21. Unread #11 - Jan 11, 2011 at 12:45 AM
  22. buyingpure
    Joined:
    Jan 10, 2011
    Posts:
    150
    Referrals:
    0
    Sythe Gold:
    0

    buyingpure Active Member
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    thx very much m8 !!~~!!
     
  23. Unread #12 - Jan 11, 2011 at 7:39 AM
  24. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Thanks & I'll defintely check that out!

    Thanks, glad you liked it!

    Thanks again, SMR :)

    No problem!
     
  25. Unread #13 - Jan 19, 2011 at 3:35 AM
  26. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Bump! :)
     
  27. Unread #14 - Jan 23, 2011 at 10:18 AM
  28. Jeff 2 Nasty
    Joined:
    Feb 16, 2008
    Posts:
    611
    Referrals:
    0
    Sythe Gold:
    0

    Jeff 2 Nasty Forum Addict
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    great guide since i didnt know this was possible to begin with
     
  29. Unread #15 - Jan 23, 2011 at 1:01 PM
  30. Nyx
    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0

    Nyx SMR likes me a lot
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Thanks! :)
     
  31. Unread #16 - Feb 19, 2011 at 9:30 PM
  32. zxc10
    Joined:
    May 25, 2010
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0

    zxc10 Active Member
    Banned

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    great guide, thanks my mate
     
  33. Unread #17 - Mar 4, 2011 at 1:01 PM
  34. fbitom
    Joined:
    Feb 23, 2011
    Posts:
    204
    Referrals:
    0
    Sythe Gold:
    0

    fbitom Active Member

    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    very interesting guide, looking into it was more than appealing ! :D
     
< Viewing VPS/getting it to work | HTML: The Basics >

Users viewing this thread
1 guest


 
 
Adblock breaks this site