We'd like to remind Forumites to please avoid political debate on the Forum... Read More »
We're aware that some users are experiencing technical issues which the team are working to resolve. See the Community Noticeboard for more info. Thank you for your patience.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
help with commodore 64 basic.....
Options

Blakespops
Posts: 394 Forumite
in Techie Stuff
I am a betting man and love doing tote jackpot bets etc and am wishing to use my C64 emulator to build a programe that will take the horses I choose for each leg and sort them into lucky 64's
can anyone give me some help on how to do this?
betting online means I can not perm them as could in betting shops and short of working it out long hand this is my next thought on how to do it but having tried I keep messing up somehow as it is only listing each selection and not in sets of 6 horses. I picked 1 in one race, 2 in two races, 3 in two races and 4 in last. should be 144 sets of horses
thank you in advance
can anyone give me some help on how to do this?
betting online means I can not perm them as could in betting shops and short of working it out long hand this is my next thought on how to do it but having tried I keep messing up somehow as it is only listing each selection and not in sets of 6 horses. I picked 1 in one race, 2 in two races, 3 in two races and 4 in last. should be 144 sets of horses
thank you in advance
Only through Christ can we find freedom
0
Comments
-
I suggest you try the gambling boards... ppl with such useful apps on there I'm sure, but whether they'll share...Friendly greeting!0
-
I'd ditch using Commodore 64 emulator and download AutoIT. It's a scripting language for Windows that will let you do simple stuff like this. It's free too and has a comprehensive set of examples and documentation.
The script itself sounds simple - but I don't really understand enough about betting and horses to help!Throwing acid is bad.... in some peoples eyes...0 -
JonnyThunder wrote: »I'd ditch using Commodore 64 emulator and download AutoIT. It's a scripting language for Windows that will let you do simple stuff like this. It's free too and has a comprehensive set of examples and documentation.
The script itself sounds simple - but I don't really understand enough about betting and horses to help!
Thanks. it is easy what I want
a has 1
b has 1,2
c has 1,2
d has 1,2,3
e has 1,2,3
f has 1,2,3,4
so now working out each combination a-f can have (1,1,1,1,1,1-1,1,1,1,1,2-etc) but was hoping to do something so can input values of a-f then get variations.
I could use marcos in excel 2007 and have this already and thought if I numbered each horse this would work as I could remove combinations that have two from same race however this I have only works with 20 horses and only to quads I am lost on changing it to any number of horses I need and being singleminded would love to be able to work out all possibilities even upto larger than 20 selections. is it the sTxt(4845) I need to change?
Option Explicit
Dim Nb As Integer, NbRange As Range
Dim A As Integer, B As Integer, C As Integer, D As Integer
Dim I As Integer, J As Integer, sTxt(4845) As String
Sub Do_PTQ()
' Display all possible pairs, triples and quads
' based on a maximum of numbers
' Show Pairs
Set NbRange = Range("A2:A21")
Nb = Application.WorksheetFunction.CountA(NbRange)
Range("A1").Select
I = 1
For A = 1 To Nb - 1
For B = A + 1 To Nb
sTxt(I) = ActiveCell.Offset(A, 0).Value & "--" & ActiveCell.Offset(B, 0).Value
I = I + 1
Next B
Next A
For J = 1 To I - 1
ActiveCell.Offset(J, 1).Value = sTxt(J)
Next J
' Show Triples
I = 1
For A = 1 To Nb - 2
For B = A + 1 To Nb - 1
For C = B + 1 To Nb
sTxt(I) = ActiveCell.Offset(A, 0).Value & "--" & ActiveCell.Offset(B, 0).Value _
& "--" & ActiveCell.Offset(C, 0).Value
I = I + 1
Next C
Next B
Next A
For J = 1 To I - 1
ActiveCell.Offset(J, 2).Value = sTxt(J)
Next J
' Show Quads
I = 1
For A = 1 To Nb - 3
For B = A + 1 To Nb - 2
For C = B + 1 To Nb - 1
For D = C + 1 To Nb
sTxt(I) = ActiveCell.Offset(A, 0).Value & "--" & ActiveCell.Offset(B, 0).Value _
& "--" & ActiveCell.Offset(C, 0).Value & "--" & ActiveCell.Offset(D, 0).Value
I = I + 1
Next D
Next C
Next B
Next A
For J = 1 To I - 1
ActiveCell.Offset(J, 3).Value = sTxt(J)
Next J
End SubOnly through Christ can we find freedom0 -
danthemoneysavingman wrote: »I suggest you try the gambling boards... ppl with such useful apps on there I'm sure, but whether they'll share...Only through Christ can we find freedom0
-
If possible I would like the marcos to have range of whatever I have that week so how can I do it so the one will give me not just pairs, trios, quads, but qintets and septuplets. Thanks for your help in advanceOnly through Christ can we find freedom0
-
Hi,
I've long since forgotton C64 basic and machine language (what an intuitive language that was, NOT). However, I can usually take a fair stab at Excel macros.
Would you mind having another go at a plain english explanation of what you are trying to do? (I'm afraid I still don't understand).
With regard to the existing routine:
* Why are the variables declared globally rather than within the routine? Are other routines using them?
* How did you arrive at the upper bound figure for the string array sTxt?
* What sort of figures are we likely to be dealing with? (You may need to change the Integer variables to Long variables).«««¤ Richie ¤»»»0 -
Blakespops wrote: »As it is a programme I am doing it is tech related not gambling as this output I am after could be for any subject matterFriendly greeting!0
-
danthemoneysavingman wrote: »I never said you were on the wrong board, just would be worth trying there... they are usu very helpful folk.
Sorry did not mean to offend. I am very grateful for your help as all advice is welcome.Only through Christ can we find freedom0 -
Richie(UK) wrote: »Hi,
I've long since forgotton C64 basic and machine language (what an intuitive language that was, NOT). However, I can usually take a fair stab at Excel macros.
Would you mind having another go at a plain english explanation of what you are trying to do? (I'm afraid I still don't understand).
With regard to the existing routine:
* Why are the variables declared globally rather than within the routine? Are other routines using them?
* How did you arrive at the upper bound figure for the string array sTxt?
* What sort of figures are we likely to be dealing with? (You may need to change the Integer variables to Long variables).
Thanks for your offer of help.
The tote scoop six is a six leg accumulator. What I am wishing to do is also break them down so I can have a list of all possible permutations.
So breaking it down it is six pots all with however number of horses I choose. I am wishing to have a programme that will give me each variable.
The macro I have was given to me by someone and running it I was told just to number each horse and then I would get a list but would have to delete each one that has two from any one pot.
Race one I pick 3 horses
Race two I pick 4
Race three I pick 2
Race four I pick 2
Race five I pick 3
Race six I pick 2
That means I have 3x4x2x2x3x2 chances of picking the six winners. Total of 288 variables. And I wish to get a list of all them. But would like to have it so can change the numbers for each race every week without having to rewrite the programme. If that makes it clear for you.
Only through Christ can we find freedom0 -
Which betting site do you use , I am sure most should accept perms for scoop 6. Failing that I will have a think before Saturday. Do you have any thing like a Unix Box or Excel ( Unix would be easier or perl/python perhaps for windows my perl/python are rusty but hey I lie a challenge ... [STRIKE]esp for 10%[/STRIKE]
I know what you wan't to do but b*gg*r me putting in 100+ single occurrences of your scoop 6 means getting up early on Saturday:eek:4.8kWp 12x400W Longhi 9.6 kWh battery Giv-hy 5.0 Inverter, WSW facing Essex . Aint no sunshine ☀️ Octopus gas fixed dec 24 @ 5.74 tracker again+ Octopus Intelligent Flux leccy0
This discussion has been closed.
Confirm your email address to Create Threads and Reply

Categories
- All Categories
- 350.8K Banking & Borrowing
- 253K Reduce Debt & Boost Income
- 453.5K Spending & Discounts
- 243.8K Work, Benefits & Business
- 598.7K Mortgages, Homes & Bills
- 176.8K Life & Family
- 257.1K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.1K Discuss & Feedback
- 37.6K Read-Only Boards