Author |
Message |
wrathofpyro
|
Posted: Sat May 20, 2006 10:29 am Post subject: Numeric Password Generator |
|
|
This is my first program ever! It is written in turing.Although it's simple, it's rather useful. You tell it the length you want your password to be then it generates a numerical password in the length you specified!It even has a restart button at the end . Sugestions(sp?) are welcome and I would like to know how I can highlight and copy the password too.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Cervantes
|
Posted: Sat May 20, 2006 10:58 am Post subject: Re: Numeric Password Generator |
|
|
wrathofpyro wrote: I would like to know how I can highlight and copy the password too.
Use
Silly Holtsoft starting in graphics mode by default...
|
|
|
|
|
|
wrathofpyro
|
Posted: Sat May 20, 2006 11:41 am Post subject: (No subject) |
|
|
err how the hell do I use that
|
|
|
|
|
|
Cervantes
|
Posted: Sat May 20, 2006 12:12 pm Post subject: (No subject) |
|
|
Just copy and paste that code into your turing program, preferrably before you do any outputting. Your best bet is to put it at the start of your program.
|
|
|
|
|
|
wrathofpyro
|
Posted: Sat May 20, 2006 1:37 pm Post subject: (No subject) |
|
|
err it acts as if the code wasnt there at all
|
|
|
|
|
|
Cervantes
|
Posted: Sat May 20, 2006 7:01 pm Post subject: (No subject) |
|
|
That could be because you later did a
code: | View.Set ("graphics:###;###") |
Or perhaps because you opened a new window afterwards. Ideally, you should have only one View.Set line (could be a Window.Open). Stick "text" in there, separated by commas (,) from the other parts of that line.
If you can't get it to work, you've got two options:
1) Post your code
2) Give up
Edit: I thought uploading .exe's wasn't allowed?
|
|
|
|
|
|
wrathofpyro
|
Posted: Sun May 21, 2006 9:16 am Post subject: (No subject) |
|
|
code: | var win : int
win := Window.Open ("position:center,graphics:400;300")
setscreen ("graphics")
color (white)
colorback (black)
loop
cls
var mypic : int := Pic.FileNew ("coolpic.bmp")
Pic.Draw (mypic, maxx div 10000000, maxy div 60000000, 0)
var a, c, d : int
var z : char
put "This a random numeric password generator"
put "Enter the length you want your password to be." ..
get d
c := 0
put "Your " ..
put d ..
put " characters long password is : " ..
randomize
loop
randint (a, 1, 9)
c := c + 1
put a ..
exit when c = d
end loop
loop
put " "
put "Do you wish to do generate another password? ( Y / N )" ..
get z
exit when z = 'n' or z = 'y' or z = 'Y' or z = 'N'
cls
put "Invalid, please enter Y or N"
end loop
exit when z = 'n'
end loop
|
Edit: removed name.
|
|
|
|
|
|
HellblazerX
|
Posted: Sun May 21, 2006 9:55 am Post subject: (No subject) |
|
|
wrathofpyro wrote: code: |
win := Window.Open ("position:center,graphics:400;300")
setscreen ("graphics") |
That's your problem. You wanted to set the screen to text mode, but instead you setted it to graphics. Replace the word graphics with text.
Also, you won't be able to use these commands if you set the screen to text mode:
code: |
color (white)
colorback (black)
cls
var mypic : int := Pic.FileNew ("coolpic.bmp")
Pic.Draw (mypic, maxx div 10000000, maxy div 60000000, 0)
|
And what's the picture for? And why use those coordinates, when all they come out to is 0.
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
xAXISx
|
Posted: Thu Jun 29, 2006 10:02 pm Post subject: (No subject) |
|
|
If you wanted to make it include characters, make an array with the characters in the alphabet and have it include random occurances of that.
|
|
|
|
|
|
Dev!L_RoosteR
|
Posted: Sun Jul 23, 2006 11:24 pm Post subject: (No subject) |
|
|
hmmmm there seem to be an error in your program... when you enter
the number 1000000000 for how many numbers there supposed to be it
seem to go in a loop.... fascinating
just kidding real nice program... although could have been nicer if the
numbers could be on a seperate line to ease on the eyes while searching for it
but hey its nothing! good job keep up the good work
|
|
|
|
|
|
|