Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old June 16th, 2011, 07:59 PM
Registered User
 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default please help modifing .vbs

Code:
Set WSHShell = Wscript.CreateObject("WScript.Shell")       
Set FSO = Wscript.CreateObject("Scripting.FileSystemObject") 
Set EnvVar = wshShell.Environment("Process")
tBestand= EnvVar("USERPROFILE") & "\Desktop\TextNumbers.txt"
Set Bestand = fso.createtextfile(tBestand,1)
For x = 1 To 15
    Bestand.WriteLine(hex(x))
Next
Bestand.close
WScript.quit
hi guys,
I have that code and the result:
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F

but i need the result like this:

"ID NUMBER:" 1
"GROUP LIST:"
"USER NAME:"
"PASS WORD:"
"ID NUMBER:" 2
"GROUP LIST:"
"USER NAME:"
"PASS WORD:"
"ID NUMBER:" 3
"GROUP LIST:"
"USER NAME:"
"PASS WORD:"
"ID NUMBER:" 4
"GROUP LIST:"
"USER NAME:"
"PASS WORD:"

and so on ...
please help me.
Reply With Quote
  #2 (permalink)  
Old June 17th, 2011, 06:07 AM
Authorized User
 
Join Date: Jan 2011
Posts: 86
Thanks: 1
Thanked 12 Times in 12 Posts
Default

Hi,

this would be like this:
Code:
For x = 1 To 15
    Bestand.WriteLine("""ID NUMBER:"" " & hex(x))
    Bestand.WriteLine("""GROUP LIST:""")
    Bestand.WriteLine("""USER NAME:""")
    Bestand.WriteLine("""PASS WORD:""")
Next
But I get the feeling you actually would like to enumerate through a group collection and not just a number iteration from 1 to 15?
Reply With Quote
  #3 (permalink)  
Old June 17th, 2011, 03:50 PM
Registered User
 
Join Date: Jun 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

thank you very much for helping
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
.ASP and .VBS misskaos99 Classic ASP Basics 2 January 3rd, 2008 11:36 AM
VBS and FTP red4vbs VBScript 0 January 15th, 2005 12:59 PM
urgent--vbs samred Classic ASP Basics 1 January 5th, 2005 03:31 AM
HELP with .VBS file savoym VBScript 1 July 31st, 2003 08:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.