Author | Message | ||
---|---|---|---|
Warrior n00b Posts: 18 | Need help in coding a button that scrambles a name.U input a name and then u click the button and it scramles last 4 alphabets of the name. If someone can help me a little, it will be appreciated. Thanks | ||
Mickey Ametuar Posts: 115 | If you can translate a Pascal routine to Basic I can do it in Pascal But it shouldn't be that hard if you can access characters from a string directly. You can read the desired chars generate a random sequence of numbers of 1, 2, 3, 4 and write back the read chars to string using the order you generated. Of course it can be done in different ways. It was just an example. | ||
Meka][Meka Unstopable Posts: 700 |
can you show me in en example string exactly what u want to happen in the routine ? | ||
Mickey Ametuar Posts: 115 |
If I am not wrong then: Input: "Mickey" Output: "Miykec" <<----- last 4 chars scrambled. It shouldn't be that hard to do. | ||
Meka][Meka Unstopable Posts: 700 | ok sorry i have not done vb6 for very very long time, but here this works....
just a little example ive quickly thrown together ps: in delphi wud be much easier and much quicker -/Meka][Meka | ||
Warrior n00b Posts: 18 | hehe thanks a lot.. it works..Thanks Meka and Mickey.. Thanks for your help | ||
Meka][Meka Unstopable Posts: 700 | if u want to use MekaDLL, i will put it up for download, the code will then be much simpler, and the process will be much faster n lighter....
this would be the code using my component, its written in pascal so performance is great, infact i will add it to downloads in a few hours or so... EDIT: ok uploaded, check here : http://www.meka-meka.com/forum/viewtopic.php?p=1364#1364 | ||
Warrior n00b Posts: 18 | Thanks a lot Meka... Appreciate it man |