Computers - Software Hardware : I need help with VBScripting

Discussion in 'Science and Technology' started by blazejay, May 12, 2012.

  1. blazejay

    blazejay Well-Known Member MEMBER

    Country:
    United States
    Joined:
    Apr 14, 2012
    Messages:
    239
    Likes Received:
    127
    Gender:
    Male
    Ratings:
    +165
    Hi,

    I got a question in two parts.
    First part is there anyone here that can help tutor me in scripting?

    Second part can anyone just help me understand what to do?

    I have a scripting/programming class that is a real pain.
    I read everything ask to read and follow the instructions and codes that was provided and I still have errors in completing the task.
    I was not given too much info on anything so I am basically on my own and my professor said the codes/program,etc... was correct just type it in as is.

    When I run the program it gets half of it correct but it always don't execute the other part of the program.
    To make matters worse the professor gives solutions in riddles and it's hard to figure out the solution to the problem by following his answer.
    I need this class bad and I am a few step from graduating help me please!!!!
     
  2. Shikamaru

    Shikamaru Well-Known Member MEMBER

    Country:
    United States
    Joined:
    May 7, 2011
    Messages:
    3,486
    Likes Received:
    1,965
    Gender:
    Male
    Ratings:
    +1,989
    What'cha need :)?

    I should be able to help you with your VBScripting.

    Scripting is a bit easier than programming.

    Scripts are interpreted versus programs which are complied.

    First things first. Do you understand the concept of variables, loops, conditionals, etc.?
    It helps to make your script (or program) as modular as possible with regard to its source code.

    VBScript can either be ran through a browser or command-line (Windows Script Host).

    I believe Gorilla is a programmer. He may jump in if he sees this.

    What version of Windows are you running on?
    What version of Windows Scripting Host do you have installed?
    What version of Internet Explorer do you have installed?
    The reason for this line of questioning is to ascertain your environment.

    Could you also furnish the instructions of your assignment as well as the source code that is causing you issues?
     
  3. Khasm13

    Khasm13 STAFF STAFF

    Country:
    United States
    Joined:
    Mar 26, 2003
    Messages:
    10,784
    Likes Received:
    4,235
    Gender:
    Male
    Ratings:
    +4,472
    visual basic was a breeze after messing with cobol and fortran....
    u don't know how good u have it son....

    one love
    khasm
     
  4. blazejay

    blazejay Well-Known Member MEMBER

    Country:
    United States
    Joined:
    Apr 14, 2012
    Messages:
    239
    Likes Received:
    127
    Gender:
    Male
    Ratings:
    +165
    Windows 7
    WSH version 5.8
    Latest version of IE

    I am going to provide screen shot of the instruction and source code, also the professor code.

    This is the instruction and code:


    ยท Sorry I could not paste a screen shot but here's what I was told to use that cover this task and the last:




    ' VBScript: PopuoWindow.vbs

    ' Written by: Student Name

    ' Date: Today's Date

    ' Class: COMP230

    ' Professor: Professor Name

    ' ==============================================

    'Create name and age variables

    msgStr = ""

    Set args = WScript.Arguments

    If args.Count < 2 then

    WScript.Echo "You must enter the name and age as Command Line Arguments!!"

    WScript.Sleep(5000)

    WScript.Quit

    end If

    name = args.item(0)

    ageStr = args.item(1)

    age = 0

    msgStr = msgStr & "Your name is " & vbTab & vbTab & name & vbCrLf

    msgStr = msgStr & "Your age is " & vbTab & vbTab & ageStr & vbCrLf

    age = CInt(ageStr)

    msgStr = msgStr & vbCrLf & "Your Age in 10 years will be ...... " & _

    CStr(age+10) & vbCrLf

    msgStr = msgStr & "End of Program"

    WScript.Echo msgStr

    'Pause Routine

    WScript.Sleep(6000)



    I understand the header,etc... but what I have problems with is:

    1. The instruction ask to delete a part of the code out and I am assuming from this he want us to change it.

    2. When I execute it or run it it will just output the comments,but does not give the name,age, and age calculation.

    3.The code above does not give me too much detail what to do or how to accomplish the required results he wanted.
     
  5. blazejay

    blazejay Well-Known Member MEMBER

    Country:
    United States
    Joined:
    Apr 14, 2012
    Messages:
    239
    Likes Received:
    127
    Gender:
    Male
    Ratings:
    +165
    Is there anyway to attach a file to a post? because the document I have when copy and paste keep saying error can't send a email or link when it is not a link.
     
  6. Shikamaru

    Shikamaru Well-Known Member MEMBER

    Country:
    United States
    Joined:
    May 7, 2011
    Messages:
    3,486
    Likes Received:
    1,965
    Gender:
    Male
    Ratings:
    +1,989
    Zip all the material and send it to [email protected].

    Also, I'll recommend a text editor such as ConTEXT. This can color code the language's keywords to make working with the source code easier. They should have a portable version, so you don't even need to install it.

    Be sure to turn on line numbering as well. This will aid in debugging.
     
  7. Shikamaru

    Shikamaru Well-Known Member MEMBER

    Country:
    United States
    Joined:
    May 7, 2011
    Messages:
    3,486
    Likes Received:
    1,965
    Gender:
    Male
    Ratings:
    +1,989
    I've already found (and fixed) the bug in this source code, but I'll discuss it with you as soon as you respond.
     
  8. Destee

    Destee destee.com STAFF

    Country:
    United States
    Joined:
    Jan 22, 2001
    Messages:
    34,773
    Likes Received:
    8,979
    Gender:
    Female
    Location:
    betwixt and between
    Ratings:
    +9,677

    Yes blazejay ... see the image below ... i just enabled it, but i thot it was there already for yall ... sorry.


    [​IMG]


    I'm learning too! ... YAAAAAAAAAAY USSSS ... so please do upload the images if you can, so we can all follow along!

    Thank You Shikamaru ... and all who offer their assistance! ... :teach: :teach: :teach:

    Love Yall! :grouphug:

    :heart:

    Destee
     
  9. Destee

    Destee destee.com STAFF

    Country:
    United States
    Joined:
    Jan 22, 2001
    Messages:
    34,773
    Likes Received:
    8,979
    Gender:
    Female
    Location:
    betwixt and between
    Ratings:
    +9,677

    dang ... have i missed the lesson already !!! ... :bye: ... :love:

    you're too quick teacher! ... :lol:

    :heart:

    Destee
     
  10. Destee

    Destee destee.com STAFF

    Country:
    United States
    Joined:
    Jan 22, 2001
    Messages:
    34,773
    Likes Received:
    8,979
    Gender:
    Female
    Location:
    betwixt and between
    Ratings:
    +9,677

    Ohhh blazejay ... you don't have 25 posts ... so you're not gonna be able to upload images until then ... :(

    Sorry.

    Love You though and great thread ... i hope you do well in your class! :toast:

    :heart:

    Destee
     
Loading...
Similar Threads - need help VBScripting
  1. golmash
    Replies:
    0
    Views:
    301
  2. blazejay
    Replies:
    17
    Views:
    574
  3. Heather
    Replies:
    71
    Views:
    2,539
  4. chuck
    Replies:
    0
    Views:
    303
  5. G Ali
    Replies:
    2
    Views:
    401