Skip to content
MSN

Random

A TG007 community discussion started by feroz_shamsi.

Discussion 5 posts
Page 1 of 1
Open
Topic #7270 · 5 published posts · 1,696 views

Let's Disscuss some Random ways to do a task

 

 

 

one method i know is $read(blah.txt)

 

do you know others

 

 

 

let All Experimet with this Alias only

 

 

 

 alias RandomTest { 

echo -a This is Random Test

echo -a Random word is: $read(blah.txt)

}

 

 

 

and in blah.txt lines are written as

 

A

 

B

 

C

 

D

 

 

 

so how can we echo these 4 word's in other ways i knows Random $read method what you know share it ?

 

 

alias RandomTest { 
echo -a This is Random Test
echo -a Random word is: $r(a,z)
}

Or ...

alias RandomTest { 
echo -a This is Random Test
echo -a Random word is: $read(blah.txt,* $+ $r($2,$3) $+ *)
}

Edited Aug 27, 2006 4:49 AM by X-Fusion

i experimented right now in this way

 

 alias RandomTest { 

  var %x = $r(1,4) , %y
  if (%x == 1) %y = Hello
  if (%x == 2) %y = Hi
  if (%x == 3) %y = Hey
  if (%x == 4) %y = hahaha
  echo -s 11Random Word: %y

}

 

 

 

this method Does'nt use Hard disk because $read method Always use HD

 

 

Random asking ~

are u high to start this topic ?

You could try something like this:

alias RandomTest {
  echo -a This is a random test.
  echo -a Your random word is: $gettok($1-,$r(1,$numtok($1-,32)),32)
}

This would be used in the form: /RandomTest this is a test

I don't get paid to know the answer, therefore I'm far more likely to give you a straight and honest answer.