Adblock breaks this site

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

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

  1. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    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!
     
  2. lilpjer

    lilpjer Grand Master
    Banned

    Joined:
    Jul 11, 2009
    Posts:
    2,009
    Referrals:
    3
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Images aren't working :S Good guide though.
     
  3. minusinc

    minusinc Newcomer

    Joined:
    Dec 18, 2010
    Posts:
    2
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    It's possible the user deleted the images.
     
  4. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    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 :(
     
  5. Govind

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    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
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    This has to be one of the best UE guides ever.
     
  6. Desirable

    Desirable Active Member
    Banned

    Joined:
    Nov 30, 2010
    Posts:
    102
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Can you re-upload pictures? Thanks.
     
  7. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Wow, thanks!

    Will do :)

    EDIT: Replaced all the screenshots.
     
  8. xndu

    xndu Active Member

    Joined:
    Jan 9, 2009
    Posts:
    176
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Great guide :) I profer to use Notepad++ it is so much cleaner, cheak it out.
     
  9. Frenzy

    Frenzy I <3 Roary
    Frenzyy Donor Retired Global Moderator Angelic

    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
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    This is actually a really good guide. Tried it out and worked, thanks alot :)
     
  10. Govind

    Govind The One Musketeer
    Mudkips Highly Respected Retired Administrator

    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
    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.
     
  11. buyingpure

    buyingpure Active Member
    Banned

    Joined:
    Jan 10, 2011
    Posts:
    150
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    thx very much m8 !!~~!!
     
  12. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    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!
     
  13. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Bump! :)
     
  14. Jeff 2 Nasty

    Jeff 2 Nasty Forum Addict
    Banned

    Joined:
    Feb 16, 2008
    Posts:
    611
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    great guide since i didnt know this was possible to begin with
     
  15. Nyx

    Nyx SMR likes me a lot
    Banned

    Joined:
    Dec 17, 2010
    Posts:
    480
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    Thanks! :)
     
  16. zxc10

    zxc10 Active Member
    Banned

    Joined:
    May 25, 2010
    Posts:
    123
    Referrals:
    0
    Sythe Gold:
    0
    Guide to VBScripting with Notepad (Make Pop-ups, etc)

    great guide, thanks my mate
     
  17. fbitom

    fbitom Active Member

    Joined:
    Feb 23, 2011
    Posts:
    204
    Referrals:
    0
    Sythe Gold:
    0
    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 >


 
 
Adblock breaks this site