Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Need Help Writing/Understanding Several Scripts (http://www.go4expert.com/forums/help-writing-understanding-scripts-t26092/)

Aus_anon 19Jun2011 13:32

Need Help Writing/Understanding Several Scripts
 
I have a couple of questions/scripts that i need to write for hw, but so far i've had no luck getting any of them to work. They are

1.Write a script that creates a file. The script should:
  1. Ask for a folder name
  2. Ask for a filename
  3. if the file already exists, delete it
  4. ask for text to write to the file
  5. Write that text to file
  6. Save and close the file

2.Write a function that extracts and displays characters 7 to 12 of a string that is entered from the keyboard:
  1. Place this within a script
  2. If no characters are entered, the script should termiante with an error message
  3. If the user presses either ESC or Cancel from the InputBox, the script should terminate with a different error message

3.Write a script that displays an entered drive's serial number

& 4. Write a script that asks for a number:
  1. Then another number, and another number, until the user entes the word "quit"
  2. The script should then display the total of the numbers entered

Any help would be appreciated :)
I did all my other questions without any problems , but i've been having lots of problems with those

ManzZup 12Jul2011 11:53

Re: Need Help Writing/Understanding Several Scripts
 
try satrting up with the coding and post the progress so we can help
most of these are easily achievable with the given methods in vb.net

to start go on and google about the io.directory and io.file
you can do the first with thoe two

and for the second you need the substring method only

the third one is pretty basic that you should be able to do it
just have to check weather the input == "quit"


All times are GMT +5.5. The time now is 22:04.