#168594 - 2006-09-29 09:55 AM
Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
I'm new to kix can anyone help me with this little code. below is an example.
$CountVal = 30 For $Counter = 1 to $CountVal ? $Counter EndIf Next
but I want this code to count in letter fomat
counting from A, b, c, d, e, f, g, etc etc all the way to Z.
TIA
|
|
Top
|
|
|
|
#168595 - 2006-09-29 10:03 AM
Re: Count Letters
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
I can think of a lot of ways of doing this, depending on what you need it for.
Here is one way: Code:
For $i = 1 to 26 ""+$i+": "+Chr(Asc("A")-1+$i)+@CRLF Next
If this doesn't help, try explaining what you intend to use it for and we will suggest something more appropriate.
|
|
Top
|
|
|
|
#168596 - 2006-09-29 10:44 AM
Re: Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
thanks richard that helped. I also just done one myself by playing around.
For $Counter = 65 to 90 ? Chr($Counter) Next
Edited by 5861king (2006-09-29 10:59 AM)
|
|
Top
|
|
|
|
#168600 - 2006-09-29 06:51 PM
Re: Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
Quote:
hmm... what ya upto?
I'm makeing a bootable windows xp cd, which has been customised to run certain program and registry changes dureing the install process.
|
|
Top
|
|
|
|
#168602 - 2006-09-29 08:52 PM
Re: Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
Quote:
Why the counting from A to Z?
if some users an external cd-rom or has 1 or more CD Roms, the default cd-rom path is not allway D:, this program will serach all the drive letters looking for a paticular file, if it finds it then the cd-rom drive letter will be recorded as a varible, then my other programs will user the correct cd-rom path
|
|
Top
|
|
|
|
#168606 - 2006-09-29 10:38 PM
Re: Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
I'll remeber that for the future. got the script running now and it works a treat. so a big thanks to Witto + Richard H. I can post this script if anyone is intrested in slipstreaming and maeking their own version of a bootable DVD disk.
|
|
Top
|
|
|
|
#168607 - 2006-09-29 10:47 PM
Re: Count Letters
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Thanks, I only asked questios. Richard H. and PaulyT gave the answers. [Edit] Oh yes, it was on the AdminScriptEditor forum Help with converting .bat file to kix [edit]
Edited by Witto (2006-09-30 08:37 AM)
|
|
Top
|
|
|
|
#168608 - 2006-09-30 11:42 PM
Re: Count Letters
|
5861king
Fresh Scripter
Registered: 2006-09-28
Posts: 48
Loc: UK
|
Yep, I tried the WMI version but during the install wmi is not installed, that’s why I wanted to use this method.
Edited by 5861king (2006-09-30 11:43 PM)
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1013 anonymous users online.
|
|
|