Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 2:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Bingo script
PostPosted: May 30th, 2010, 7:36 pm 
Offline

Joined: April 11th, 2010, 9:57 am
Posts: 18
Location: Amsterdam, The Netherlands
Opus: 7
OS: Windows 7
System: MacBook Pro with Parralels and bootcamp running the windows version
Hi friends,

I am a bit hopeless. I promessed my friends to make a bingo program but maybe i was shouting too hard :oops:
There is a problem that i can't solve untill now. I can generate random numbers and display them in the way i like
to do. Every number gets an MP3 file so blind people can also play bingo.
The problem is that numbers who are already choosen must be out of the range of numbers.
I think this is a script thing.
Hope some script wizzard can help me further.


Linda Danklof


For this message danklof has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Bingo script
PostPosted: May 30th, 2010, 8:13 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
I posted a script recently which could be used. viewtopic.php?f=4&t=4083&start=0
It generates a list of random numbers between X and Y. I have no idea how many numbers there are in bingo??? is it 1 to 90???
Anyway. all you would have to fo is run the function at the start. This will create a list of numbers between (1 and 90) no repeats. This is saved to an array, which you then use to call out the numbers.
I really like Irish bingo.......

0n it's own, number 17, all the twos.....twenty seven.

You can use text aloud to read the numbers. copy the number to the clippboard and it automatically reads them out, no need to sit and create 90 MP3s and all the scripting to select.

I've done a talking bar code scanner for visually impaired users which used it...it's very good value and the quality is brilliant, especially if you pay a wee bit more for an A.T & T voice.

Sandy

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Bingo script
PostPosted: May 30th, 2010, 8:41 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Linda,

I see Sandy has a solution for you. Good. In case you get stuck and want some additional info to reference...

This post discusses a very similar problem. viewtopic.php?f=4&t=3820&hilit=array+unique
Scroll down to the Osni post on Thu Nov 05, 2009 6:48 am (but of course read through the whole thing and cont'g pages -- to understand the context).

Osni shows two approaches (and thinks his 2nd one is better).

If that is too challenging to follow (or adapt), do a Search in the forum for -- random
There are ~24 posts, some with sample pubs you can download (be logged-in to see them).

Once you've chosen an approach for 'random, not-used-yet', post back with some details and we'll help you through it.

_________________
_good things come to those who wait(0)_


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Bingo script
PostPosted: May 30th, 2010, 9:10 pm 
Offline

Joined: April 11th, 2010, 9:57 am
Posts: 18
Location: Amsterdam, The Netherlands
Opus: 7
OS: Windows 7
System: MacBook Pro with Parralels and bootcamp running the windows version
Thanks Sandy, It's almost what i need. Now the result is displayed in the debug window.
How can i display or store it in a variable

Kind Regards,


Linda


For this message danklof has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: Bingo script
PostPosted: May 30th, 2010, 9:48 pm 
Offline

Joined: November 25th, 2004, 1:24 pm
Posts: 512
Location: Scotland
Opus: 9.75
OS: Win 10
System: Asus i7-7700K 16Gb
it's already stored in a variable, but an array called MyRandoms[1 to Z], where Z is the count of random numbers, or (Y-X)+1, so if you generate a list of randoms from 1 to 90, the numbers will be stored in MyRandoms[1] to My Randoms[90].

If you generate a list of randoms betewwn 15 and 23. they will be stored in MyRandoms[1], MyRandoms[2]....to MyRandoms[9]
23-15+1=9.

Normally an array starts at AnArray[0], but my one starts at [1]

If you need any more info, just post
To try and display an array value in a Text box, you need to right click on the text box, then select 'insert variable' a window will open and you choose 'constant Expression' and just put in the array element ....such as MyRandoms[1] would display the first element in the array.
You would create a loop and just run through the array selecting the next array element each pass of the loop.
Sandy

_________________
Whoever designed this, never actually used it!


For this message sandyn has been thanked by : mackavi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group