tell me what you think of my script

Author Message
watchmen626

  • Total Posts : 4
  • Scores: 0
  • Reward points : 0
  • Joined: 4/3/2010
  • Status: offline
tell me what you think of my script Saturday, April 03, 2010 10:54 AM (permalink)
0
im new to scripting and this is a script i made in about 10 minutes it is kinda simple but i like it i want to see what you guys think of it
 
i will take ideas to add on or take off in the comments or just tell me if you like it
 
here it is:
x = msgbox("i have a few questions to ask you",1, "questions??")
x = msgbox("if you choose to answer them press ok if you dont presscancel haha",1+64,"questions??")
dname=inputbox("question #1 do you like pizza???")
x = msgbox("ok good keep going" ,1, "questions??")
fname=inputbox("question #2 have you ever eaten a turd before")
fname=inputbox("question #3 do you want to")
x = msgbox("im telling your mom thats gross" ,1, "eeeeewwww")
x = msgbox("ok i wont tell your mom only if you let me download a virus to your computer" ,1, "haha")
x = msgbox("to late downloading virus" ,1, "hahahaha")
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 im going to download a virus to your computer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
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("downloading virus . . . 20% . . . 40% . . . 60% . . . 80% . . . 100% virus downloaded")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
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("watch as I open your cd drive")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
 
Set oWMP = CreateObject("WMPlayer.OCX.7" )
Set colCDROMs = oWMP.CdromCollection
If colCDROMs.Count >= 1 then
For I = 0 to colCDROMs.Count - 1
ColCDROMs.Item(I).Eject
Next ' cdrom
End If
Wscript.Sleep 100
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("haha I will now open internet explorer")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "iexplore http://www.smouch.net/lol", 9
WScript.Sleep 10000 ' Give ie some time to load
Wscript.Sleep 100
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("haha you have just been rick rolled")
Wscript.Sleep 1000
Set objAction= objPeter.Hide
Do While objPeter.Visible = True
Wscript.Sleep 250
Loop
Wscript.Sleep 100
_________________________
important: copy and past this into notepad and save it as question.vbs or what ever you want it to be
 
 
#1
    watchmen626

    • Total Posts : 4
    • Scores: 0
    • Reward points : 0
    • Joined: 4/3/2010
    • Status: offline
    Re:tell me what you think of my script Saturday, April 03, 2010 12:06 PM (permalink)
    0
    ok i uploaded the file to megaupload it is not a virus so dowload it instead of copying and pasting it from above
    dowload link:
    http://www.megaupload.com/?d=YW06UCY2
    i am an emoskaterspartanjediassassininjavampirezombieinspace in other words im a nerdy cool kid haha
     
    #2
      ebgreen

      • Total Posts : 8227
      • Scores: 98
      • Reward points : 0
      • Joined: 7/12/2005
      • Status: online
      Re:tell me what you think of my script Monday, April 05, 2010 12:20 AM (permalink)
      0
      Ok, since you asked, here are my thoughts:

      Always start scripts with Option Explicit. It removes many potential errors in the script.

      You need more descriptive variable names. x tells you nothing about what the variable holds so if the script is even mildly complex, it makes it difficult for someone else to read.

      Only use On Error Resume Next to mask errors on specific lines, then use On Error Goto 0 to return to normal error handling after the specific lines

      This bit of code:

      StrAgentName2 = "MERLIN"
      StrAgentPath2 = "C:\Windows\Msagent\Chars\" & strAgentName2 & ".Acs"
      Set objAgent2 = CreateObject("Agent.Control.2")

      Is repeated multiple times in your script. First, if you write the same bit of code more than once that is a clear indication that it should be written as a sub or a function. Second in this case, there is no need to have that code multiple times. Just instantiate the Agent.Control object once and use it wherever you need to.


      "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
      Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
      http://www.visualbasicscript.com/m_47117/tm.htm
       
      #3
        watchmen626

        • Total Posts : 4
        • Scores: 0
        • Reward points : 0
        • Joined: 4/3/2010
        • Status: offline
        Re:tell me what you think of my script Wednesday, April 07, 2010 11:03 AM (permalink)
        0
        hey thanks man i think i might try some of that out
        i am an emoskaterspartanjediassassininjavampirezombieinspace in other words im a nerdy cool kid haha
         
        #4
          madspy

          • Total Posts : 2
          • Scores: 0
          • Reward points : 0
          • Joined: 6/28/2010
          • Status: offline
          Re:tell me what you think of my script Monday, June 28, 2010 4:16 AM (permalink)
          0
          I made a similar version of this, and you can see it in action at:


          http://www.youtube.com/watch?v=9d2pF-sIH2Q
           
          #5
            jorian

            • Total Posts : 2
            • Scores: 0
            • Reward points : 0
            • Joined: 11/11/2010
            • Status: offline
            Re:tell me what you think of my script Friday, November 12, 2010 12:20 AM (permalink)
            0
            :WARNIG-i am new to this and this is my first try:
            oke i got this thiny small small script but it giving me an error thing
             
            oke here it is
             
            x = msgbox("is this AWESOME",vbYesNO,"F Yeah!")
            If (x) = VbYes Then msgbox "Winnn",64,"yess"
            If (x) = vbYes Then strText = "win"
            Set objVoice = CreateObject("SAPI.SpVoice")
            objVoice.Speak strText
            If (x) = VbNo Then msgbox "HAHAHAHAHA",,"FAIL"
            if (x) = vbNo Then
            do
            strText = "fail"
            Set objVoice = CreateObject("SAPI.SpVoice")
            objVoice.Speak strText
            loop
             
            #6
              ebgreen

              • Total Posts : 8227
              • Scores: 98
              • Reward points : 0
              • Joined: 7/12/2005
              • Status: online
              Re:tell me what you think of my script Friday, November 12, 2010 3:30 AM (permalink)
              0
              Please post this as it's own question in the Client Side portion of the forum.
              "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
              Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
              http://www.visualbasicscript.com/m_47117/tm.htm
               
              #7

                Online Bookmarks Sharing: Share/Bookmark

                Jump to:

                Current active users

                There are 0 members and 1 guests.

                Icon Legend and Permission

                • New Messages
                • No New Messages
                • Hot Topic w/ New Messages
                • Hot Topic w/o New Messages
                • Locked w/ New Messages
                • Locked w/o New Messages
                • Read Message
                • Post New Thread
                • Reply to message
                • Post New Poll
                • Submit Vote
                • Post reward post
                • Delete my own posts
                • Delete my own threads
                • Rate post

                2000-2012 ASPPlayground.NET Forum Version 3.9