Thanks for your explanations María Gómez > Date: Mon, 7 Sep 2009 15:54:12 -0700 > From: [email protected] > To: [email protected] > CC: [email protected] > Subject: Re: [Click] Script element > > I checked in the new behavior that will give you a "truly random" seed > whenever a router is configured. > > E > > > > Eddie Kohler wrote: > > María, > > > > 1: > > > > Script(print $(if_test.run 1), > > print $(if_test.run 2)); > > if_test::Script(TYPE PASSIVE, > > return $(if $(eq $1 1) "GAVE ME ONE" "GAVE ME NOT ONE")) > > > > When run this will print > > "GAVE ME ONE" > > "GAVE ME NOT ONE" > > > > > > 2: > > > > By default every Click run uses the same random seed, leading to a > > predictable > > & deterministic sequence of random values. This behavior should not be > > depended on, and in fact I will probably change it today. In the mean > > time, > > try adding a "RandomSeed" element to your configuration. When given no > > arguemnts, RandomSeed sets the random seed unpredictably on each run. > > > > E.g.: > > > > letni% click -e 'Script(print $(random), stop)' > > 1804289383 > > letni% click -e 'Script(print $(random), stop)' > > 1804289383 > > letni% click -e 'Script(print $(random), stop)' > > 1804289383 > > letni% click -e 'Script(print $(random), stop); RandomSeed' > > 530300448 > > letni% click -e 'Script(print $(random), stop); RandomSeed' > > 618331881 > > letni% click -e 'Script(print $(random), stop); RandomSeed' > > 1536646481 > > > > > > Eddie > > > > > > María Gómez wrote: > >> Hi all, > >> I have two question about some Script's handler: > >> > >> 1- Can anyone tell me how to use the if handler? Please, a example. > >> > >> 2-The random handler always return the same number, not refresh. > >> > >> Thanks. > >> > >> Regards. > >> > >> _________________________________________________________________ > >> Internet Explorer 8 más sencillo y seguro ¡Descárgatelo gratis! > >> http://events.es.msn.com/noticias/internet-explorer-8/ > >> _______________________________________________ > >> click mailing list > >> [email protected] > >> https://amsterdam.lcs.mit.edu/mailman/listinfo/click > > > > _______________________________________________ > > click mailing list > > [email protected] > > https://amsterdam.lcs.mit.edu/mailman/listinfo/click
_________________________________________________________________ Descárgate Internet Explorer 8 ¡Y gana gratis viajes con Spanair! http://www.vivelive.com/spanair _______________________________________________ click mailing list [email protected] https://amsterdam.lcs.mit.edu/mailman/listinfo/click
