Hi
Is there a basic script out there that I can get hold of to generate random numbers where I input the starting number and finishing number. Also, would it be possible to make sure that a number isn't repeated.
Many thanks
Martyn
Scalascript casn be the simple answer.
On a page write down "!randomx" (without the "). Proceed to list view (on that page). Add a "special event". in "branch" define a variable. Write down: "randomx = Random(0,10)".
Play script. Now every second you will get a random number between the desired range of "0" to "10".
With ScalaScript and some boolean you can even tell a page not to show if a number already has been randomly selected.
Is that what you mean?
Thomas
Hi Thomas
Thanks, but I am having a problem putting it into ICD. I also would like it to select a random number on a mouse click.
Regards
Martyn
Martyn,
some more details always do help a lot. In which ICD version? What will you do exactly?
Thomas
Hi Thomas
Sorry, it will be used on ICD3, although I did a test on ICD. It is for our Christmas draw on Sunday. We have sold aroud 1300 tickets, so the idea is to randomise numbers from 1-1300 say. What I want to be able to do is to click the mouse when I am ready to pick another number.
Hope this helps.
Kind Regards
Martyn
Hi Martyn,
with a random out of 1300 I think we don't have to care much about numbers already picked, there is a chance of 1:1300 to pick a number twice ;-)
try this script:
!ScalaScript
:"nextTicket.sca"
{
Group:
Integer(randomT);
BackgroundSettings(Size(640, 480), Grid(Off, Snap(On)));
Config.SaveOpts(SaveEditable(On));
Config.SaveEncoding("Auto");
Sequence:
{
Group:
Display(Backdrop(Pen(1)), Margin(24, 24, 0, 0), Tabs(Explicit(708, 720, 728, 737, 744, 751, 760)), UserPalette(RGBPen(1, $0, $ffffff, $999999, $555555, $712068, $df449c, $dc110e, $662200, $ff5a00, $ff9c00, $ffee00, $8800, $dd00, $cccc, $66ff, $aa, $777777, $bbbbbb, $dddddd, $8fce39, $513a)));
Text(160, 110, "THE NEXT TICKET ...", Face(On, Pen(2)), Shadow(On, Pen(21)), Align(Center, None), AntiAlias(On), Update(Normal), Font("Arial Fett (Western [<Arial> 700])", 35), Justify(Center, Top), Wrap(On, Width(456)));
Pause.Milli(2000);
}
{
Group:
Display(Backdrop(Pen(1)), Margin(24, 24, 0, 0), Tabs(Explicit(708, 720, 728, 737, 744, 751, 760)), UserPalette(RGBPen(1, $0, $ffffff, $999999, $555555, $712068, $df449c, $dc110e, $662200, $ff5a00, $ff9c00, $ffee00, $8800, $dd00, $cccc, $66ff, $aa, $777777, $bbbbbb, $dddddd, $8fce39, $513a)));
Text(160, 110, "THIS TICKET NUMBER HAS WON", Face(On, Pen(2)), Shadow(On, Pen(21)), Align(Center, None), AntiAlias(On), Update(Normal), Font("Arial Fett (Western [<Arial> 700])", 35), Justify(Center, Top), Wrap(On, Width(456)));
Wait();
Sequence:
Text(160, 210, "!randomT", Wipe("ZoomUp", Direction(90)), Face(On, Pen(2)), Shadow(On, Pen(21)), Align(Center, None), AntiAlias(On), Update(Normal), Font("Arial Fett (Western [<Arial> 700])", 100), Justify(Center, Top), Wrap(On, Width(456)));
randomT = random(1,1300);
}
}
Thomas
Thanks for your patience. How do I paste this into scala mate.
Many thanks.
Sorry for being a pain.
Regards
Martyn
Well,
just copy it from "!" to last "}". Open notepad. paste it, save it as "nextTicket.sca. Run it
Cheers,
Thomas
Discussions 2005 Index |
Contact Scala about your end-to-end software solutions for creating and controlling Electronic Display Networks, whether you call it Dynamic digital signage, Narrowcasting, Captive Audience Networks, Kiosks, Point-of-Purchase Displays, Digital In-Store Merchandising, Out-of-Home Media Networks, Place-based Advertising, Display Marketing, Retail Digital Media Networks, Datacasting, Electronic Billboards, The Outernet or any of the other terms in use today. Scala conducts business through a worldwide network of Value Added Resellers. For more information on what this emerging industry is coming to be named, you can see how other people found this page. ©1993-2008 Scala, Inc. Scala, InfoChannel, and the Exclamation Point Logo are registered trademarks of Scala, Inc. All other trademarks are the property of their respective organizations. To see all the content on our Website, click Sitemap or check our blog for the latest updates. Read our Privacy Policy.